Frontier physics
Quantum algorithms (Shor, Grover)
Illustrate Grover's algorithm: amplitude amplification of a target state among items. Watch the state vector rotate in a two-dimensional plane and verify the optimal iteration count .
Equipment
- Model of the state vector rotating in a 2D plane
- Sliders for size N and iteration count k
- Display of target amplitude/probability per iteration
Procedure
Set the problem size
Drag the "Size N" slider to choose the number of items in the simulated database (e.g. N = 25). Look at the initial state axis: the target amplitude starts at — small for large N. Compare with classical search, which needs on average trials.
Increase the iteration count
Step the "Iterations" slider and watch the state vector rotate toward the target axis: each Grover iteration adds an angle with . Read the probability of measuring the target after k iterations: .
Find the optimal iteration count
For each N, scan k for the maximum probability and compare with . Push past the optimum to see the probability fall again — the vector overshoots the target. Try a large N (e.g. 100) and repeat: grows as , not .