- #26

- 212

- 30

"Thus you have to ask your questions in a very special manner, to allow superpositions to be used during calculations, but not in your answer." Please could you explain how these superpositions are used? I feel like I will not understand quantum computers until I understand how this occurs.

A simple algorithm to start with to get a feeling for what's going on, is the Deutsch-Jozsa algorithm. Explained in a handwaving (and wrong, but just to get a feeling for things) manner, consider a function f, that can be either even or odd, meaning given f(x) the function can either return +0.5 for both positive and negative values, or +0.5 for positive and -0.5 for negative, and your task is to determine which it is.

Classically, you would have no choice but to compute the function twice, for both positive and negative inputs, and then check whether they are the same or not. There is no other way. Using quantum superposition states however, we can simple compute the function for a superposition of a positive and negative value, and let the answer of our algorithm correspond to , say, the sum of the outputs (i.e. either +0.5 +0.5=1 for even, or +0.5-0.5=0 for odd function). We now see that even though the answer is only one single bit (1 or 0) we gain information about a global property of the whole function by only one single evaluation.

This is what I meant with "you have to ask the questions in s special manner". By using a quantum algorithm, we don't perform the two computations faster, but rather we rephrase the question to take advantage of the superpositions (and entanglement) in order to obtain the answer to the originial question in the different, more efficient way.