# If superposition is just uncertainty, then how come quantum computers work? [closed]

If superposition is just uncertainty due to a particle changing on observation and not literally 2 things at once, how come quantum computers work while having qubits that are literally 1 and 0 at the same time? (sorry if this is a dumb question)

• Superposition is literally two things at once. – Abhay Hegde Jun 20 at 18:26
• But how? how can electron be spinning up and down at the same time? i thought all superposition was just heisenberg uncertainty principle like when u observe electron it acts as a particle and if u dont it acts as a wave – Octavylon Jun 20 at 22:38
• It is not spinning up and down at the same. This is a limited analogy but you can think of this as follows: You can only measure (or “see” it) up or down, but it is spinning “sideways”. It is not strictly accurate to think of it that way but it is more accurate than thinking of it as spinning up and down at the same time. – ZeroTheHero Jun 21 at 13:20

Superposition is NOT uncertainty. The state \begin{align} \vert +;\hat x\rangle = \frac{1}{\sqrt{2}}\vert +;\hat {z}\rangle +\frac{1}{\sqrt{2}}\vert -;-\hat{z}\rangle. \tag{1} \end{align} will certainly be detected with its spin up along $$\hat x$$. It is however a superposition of states with spins along $$\hat z$$, and the probability of detecting the spin in the $$+\hat z$$ direction is $$1/2$$.

Thus, superposition is a concept that is tied to a choice of basis states, of operators having these states as eigenstates, and of the measurements associated with these operators.

It is a convenient semantics shortcut (or trickery?) to suggest that the state (1) is in the spin-up and spin-down states (for quantization along $$\hat z$$) “at the same time”; it does correctly imply that measurements in that basis will yield more than one possible outcome, but clearly this is dependent on choosing the basis $$\vert \pm; \hat z\rangle$$ to write any state.

The situation is a little more subtle for $$\vert 0\rangle$$ and $$\vert 1\rangle$$ since there is a “natural” (aka standard) basis to make measurements in quantum computation, but basically the same logic applies: a linear combination of $$\vert 0\rangle$$ and $$\vert 1\rangle$$ is simply a state where there is more than one possible outcome for a measurement done in the standard basis. If one could implement operators at will, then once provided with an arbitrary superposition it would be possible to design a measurement scheme where the number of possible outcomes of this measurement would be 1.

In the middle of a quantum algorithm there are indeed superpositions involving a large number of terms. But then we do an interference effect in which all these terms come together and interfere with one another, some reinforcing and some cancelling out. It is this reinforcement and cancelling which is doing a major part of the whole computational process. At the end you typically still have a superposition (though this does not have to be the case) but it is one involving fewer terms, and typically they all have something in common. For example, the output of the computation might be the answer to the question "are the terms in the final superposition all even numbers or all odd numbers"? So then when you measure the state, you don't know which particular number it will be, but if they are all even then it is guaranteed to be even. In other words in this case there is no randomness in the answer to the computation.

More generally, superposition and randomness are very different things.