Quantum Search Visualization
Visualization setup:
The vertical axis (y) represents the marked state |w⟩ (the value we want to measure).
The horizontal axis (x) is the projection of all other states combined (real values only).
The uniform superposition state |s⟩ is at x = y (the green vector).
Each Grover iteration consists of two real reflections:
- Oracle reflection (purple): reflects the state vector over the y axis (marked state).
- Diffusion reflection (red): reflects the state vector over the x=y axis (uniform superposition).
After about √N steps, the final vector is almost aligned with the y axis, maximizing the probability of measuring the marked state.
Set N and click Visualize. The animation will show the two-step real reflection (oracle and diffusion) at each Grover iteration.