05 · Search
Grover
Mark one item with a minus, invert about the mean, repeat. Four items, one iteration, certainty. More iterations overshoot. That is amplitude amplification, not magic parallelism.
In English
You have a list of four names and a buzzer that beeps on the right one. Classically you may need three peeks. Grover flips the sign on the winner, then rotates everything toward that winner. One rotation, four items, you are done. Two rotations and you overshoot.
- Try this
- Pick which item is marked. Hit Iterate once — the winner’s bar should jump to ~100%. Hit it again and watch it fall. Stop at the peak.
- Keep this
- Grover amplifies the marked item. More is not better — you can walk past it.
Lab · four items, one mark
Click the item the oracle marks. Superpose, then iterate: flip the marked amplitude, invert about the mean. N=4 wants one iteration. Two is too many.
H⊗H · uniform · P(marked) 25%
|00⟩0.525%|10⟩0.525%|01⟩0.525%|11⟩0.525%
The optimal number of iterations is about π√N / 4. For N=4 that is 1, and the geometry is a 2D rotation that lands on the marked axis. Iterate past that and you rotate away again — Grover is not “run until you feel done.”
Quadratic speedup is real and, for unstructured search, optimal. It does not eat cryptography the way Shor does. Use it when the database has no structure. If it has structure, a classical algorithm probably already knows.