Making It Compute

Where the Speed Comes From

8 min

Here is the smallest possible demonstration of the entire idea. It takes ten seconds.

Take a qubit that is a plain 0. Apply H — now it is an even mixture. Apply H again. You would expect it to get more mixed up.

It does not. You get a plain 0 back. Every single time.

Two Hadamards cancel
q₀HHsplitrecombinealways 0Amplitude arriving at each outcome|0⟩path A path B P = 1|1⟩path A path B −½P = 0
H sends |0⟩ to an equal superposition; a second H sends it straight back to |0⟩. The |1⟩ paths arrive with opposite signs and cancel. This cancellation — not parallelism — is where quantum speedups come from.

Follow the two routes

There are two ways to get from the start to each possible answer: through the 0 branch and through the 1 branch.

For the answer 0, both routes arrive as . Add them: 1. Dead certain.

For the answer 1, one route arrives as and the other as −½. Add them: 0. It never happens.

That is the trick. Not "trying both paths" — an ordinary coin-flipping machine tries both paths too. The difference is that quantum routes can arrive with minus signs, so they can destroy each other.

Quantum computing is not about doing lots of things at once. It is about arranging for the things you do not want to cancel themselves out.

Every famous algorithm is doing exactly this

Once you see it, they stop being magic:

  • Grover puts a minus sign on the answer you want, then does something that makes it grow while everything else shrinks.
  • Shor feeds a repeating pattern into a machine where every wrong guess about the pattern cancels, and the right one survives.
  • Deutsch–Jozsa arranges things so one particular result is either dead certain or completely impossible, and which one tells you the answer.

Different problems. Same move every time.

Worth remembering

  • Two H gates in a row return a plain 0, because the two routes to 1 cancel.
  • Quantum routes can carry minus signs, so they can subtract. Ordinary chances only add.
  • Every real quantum speed-up is wrong answers cancelling themselves out.
  • Noise scrambles the signs, which is exactly what the whole method depends on.