Lesson 4 of 9
Interference is the whole trick
Explain how a quantum algorithm cancels the wrong answers instead of checking them.
01 · Learn · the idea
Sixteen closed boxes, one key, no clues. An ordinary search opens about eight. This finds it in three moves and opens none.
How it works
- Start with all 16 answers at the same amplitude 0.25 each — pure ignorance
- MARK: flip the sign of the right answer invisible on its own — squaring kills the sign
- REFLECT: flip every amplitude about their average the negative one dragged the average down
- The odd one out jumps up; the other fifteen sag
- Repeat about π/4 × √N times — and then STOP
In numbers
Chance the search returns the right box, after each move
It peaks at three and then falls off a cliff. Six moves is worse than never running it — the rotation went straight past the answer.
Side by side
Two ways to arrive at an answer
The common misread
That the machine checks all sixteen boxes at once and reports the winner. Nothing is checked. If it were checking, running longer could not make the answer LESS likely — and it does.
The words
- mark
- flip the sign of the right answer's amplitude, without reading anything
- reflect about the average
- flip every amplitude across their mean, which lifts the odd one out
Carry this
Not everything that converges was decided. The wrong answers were never rejected; the whole arrangement was tilted until one was left standing.
Full lesson
Sixteen boxes and one key
There are sixteen closed boxes in front of you. One holds a key. There is no clue, no order, nothing to reason from — the only way to learn anything is to open a box and look.
An ordinary search opens boxes one at a time. On average you find the key after about eight, and in the worst case you open all sixteen. There is no cleverness available. The information simply is not there until you look.
A quantum machine finds it in three moves, and it never opens a wrong box.
What a move actually does
The machine starts with all sixteen possibilities carrying the same amplitude. With sixteen answers that amplitude is a quarter — 0.25 each — so squaring gives a 6.25% chance of each, which is exactly the ignorance you started with.
Then it repeats a pair of operations. Neither of them opens a box.
One — mark the right answer. A test flips the sign of the right answer’s amplitude, from +0.25 to −0.25, and leaves the other fifteen alone. This is the part that sounds impossible, and it is worth being precise about why it is not. The machine is not being told which box is right. It is applying a rule — “does this box satisfy the condition?” — to all sixteen at once, and the rule’s only effect is a minus sign. Nothing has been read out. Measure now and you learn nothing at all: squaring −0.25 gives the same 6.25% as squaring +0.25.
Two — reflect everything about the average. Take the average of all sixteen amplitudes and flip each one across it. Because one amplitude is now negative, the average has been dragged down slightly. Flipping across a dragged-down average pushes the odd one out sharply upward and everything else slightly down.
Watching it run
Here is what those two operations do, step by step, with sixteen boxes:
- Start: right answer 6.2%, each wrong answer 6.2%
- After 1 move: right answer 47.3%, each wrong answer 3.5%
- After 2 moves: right answer 90.8%, each wrong answer 0.6%
- After 3 moves: right answer 96.1%, each wrong answer 0.3%
Three moves. Sixteen boxes. Not one opened.
Notice what did not happen. The machine never tested a wrong box and discarded it. The wrong boxes were never candidates that got eliminated. Their amplitude was quietly drained away into the right one, because amplitudes can subtract and the choreography was arranged so they would.
The part that surprises everyone
Keep going and it falls apart:
- After 4 moves: right answer 58.2%
- After 5 moves: right answer 12.5%
- After 6 moves: right answer 2.0% — worse than doing nothing
This is not a flaw or a leak. It is the same mechanism running past its mark. Each move rotates the state by a fixed angle towards the answer. Once you are pointing at it, the next move keeps rotating, straight past.
So a quantum program has a correct number of repetitions, and it is computed in advance from the size of the problem — roughly π/4 times the square root of the number of boxes, which for sixteen is 3.14, and hence three. Run it longer and you cancel the answer you built.
That square root is also the honest measure of the gain. A million boxes take about a thousand moves, not half a million looks. Real, valuable, and nothing like the “instantly checks everything” of the headlines.
The shape underneath
An ordinary search is subtractive: gather candidates, rule them out one by one, see what survives. Interference is not that at all. Nothing is ruled out. The whole arrangement is tilted until the answer is the only thing left standing, and the wrong answers were never rejected because they were never separately considered.
It is a different way for a system to arrive at an outcome, and once you have seen it you start noticing where else it applies — in how a crowd settles on a direction nobody chose, or a market on a price no one set. Not everything that converges was decided.
02 · Try · the lab
03 · Check · quick quiz
1. During the search, the machine flips the sign of the right answer's amplitude. Why does measuring at that moment tell you nothing?
- Squaring −0.25 gives the same chance as squaring +0.25
- The sign flip is too small to detect
- Measurement always destroys the answer before it can be read
- The machine has not yet been told which answer is right
Answer
Squaring −0.25 gives the same chance as squaring +0.25 — Chance is amplitude squared, and squaring kills the sign. The mark is invisible on its own — it only does work once the reflection step turns it into a difference in size.
2. You run the sixteen-box search for six moves instead of three. What happens?
- The right answer falls to about 2% — worse than not running it at all
- It stays at about 96%; extra moves are simply wasted
- It climbs above 99%, just slowly
- The machine errors, because the answer was already found
Answer
The right answer falls to about 2% — worse than not running it at all — Each move rotates by a fixed angle towards the answer. Past the mark it keeps rotating, straight past. A quantum program has a correct number of repetitions, worked out in advance.
3. What actually happened to the fifteen wrong answers?
- Their amplitude was drained into the right one; none was ever tested
- Each was checked and eliminated, but very quickly
- They were checked in parallel and discarded simultaneously
- They were never in the machine in the first place
Answer
Their amplitude was drained into the right one; none was ever tested — Nothing was ruled out. The arrangement was tilted until one answer was left standing — which is why the gain is a square root and not a free lunch.