What Does a Quantum Computer Actually Do?
A quantum computer does not try every possible answer at once. It sets up a superposition, then applies a carefully designed sequence of gates so that wrong answers cancel each other out and the right answer is left standing when you measure. That cancellation is called interference, and it is the actual trick.
The popular version of the story is intuitive and misleading. This article explains why it fails, shows interference happening in a two-gate circuit you can check by hand, and says what that means for how quantum algorithms are built.
Why "it tries every answer" fails
You will often hear that a quantum computer tries all possible answers to a problem simultaneously, then picks the right one. The framing is popular because it is easy to picture, and it is wrong in a way that matters. If a quantum computer really computed every answer in parallel and you then read one out, you would get a random answer, not necessarily the right one. Superposition alone does not hand you the correct result.
Interference is the real mechanism
A quantum algorithm starts with a superposition across many possible states. It then applies gates so that the different paths through that superposition interfere, like overlapping ripples on water. Paths that lead to wrong answers cancel each other (destructive interference), and paths that lead to the right answer add up (constructive interference). Only then is the qubit measured, and by that point the odds are stacked heavily toward the correct answer.
You can watch this happen with the smallest possible example. Start with a qubit in state 0 and apply the Hadamard gate, which creates an equal superposition. Apply it a second time and the qubit returns to exactly 0, with no chance at all of measuring 1. The two paths to the outcome 1 have opposite signs and cancel:
If the qubit had simply been "0 or 1, we don't know which" after the first gate, the second gate could not bring it back to a certain 0. Interference is the only explanation.
What an algorithm does, step by step
- Prepare. Put the qubits into a superposition that covers the possibilities of interest.
- Shape. Apply a designed sequence of gates so the amplitudes of wrong answers cancel and the amplitude of the right answer grows.
- Measure. Read out the qubits. The result is probabilistic, so the whole circuit is repeated many times to confirm the answer.
Why writing a good quantum algorithm is hard
Designing the interference pattern correctly for a specific problem is the real intellectual work, and it is why only a handful of problems have a known quantum algorithm that beats the best classical approach. The quantum algorithm explainer lists them. It is also why "just add more qubits" does not automatically make a computation faster. The algorithm has to be built so that interference works in your favor, and the hardware has to be clean enough to preserve it. Noise destroys interference, which is why error correction matters so much.
Quantum Evolution shows how gates change a qubit's state step by step, with interactive simulations. New to qubits? Start with the free Quantum States course first.
Explore the Quantum Evolution courseSee an interference pattern build up in the Simulations gallery, or run the two-Hadamard circuit yourself in the Circuit Builder.