Grover's Search
Watch quantum interference find a needle in a haystack in βN steps. See amplitudes build iteration by iteration β then deliberately overshoot to witness the quantum oscillation that proves this is real.
Classical search
Check one item at a time. Average N/2 queries, worst case N. No parallelism possible for unstructured data.
Quantum superposition
Start with all N items having equal amplitude 1/βN. The oracle marks the target by flipping its amplitude's sign.
One Grover iteration
Oracle (phase flip target) + Diffusion (inversion about mean). Target grows by ~1/βN per iteration.
βN iterations
After βΟ/4Β·βN iterations, target probability β 1. Overshoot beyond that and probability falls β the quantum resonance.
Step 1 β Classical Sequential Search
Step 2 β Create Equal Superposition
Step 3 β Grover Iterations
Step 4 β The Overshoot Curve
Success probability β 99%+
Success probability β near 0%!
π§ What you actually learned today
- Classical unstructured search: O(N) queries average. No classical algorithm can do better β provable lower bound.
- Grover's setup: H gates on all qubits create equal superposition with amplitude 1/βN per item.
- Grover iteration = Oracle (phase flip target) + Diffusion (inversion about mean). Target amplitude grows by ~2/βN per step.
- Optimal iterations: Ο/4Β·βN. After this many steps, target probability β 1. Stop here and measure.
- Overshoot: running more iterations than optimal causes the probability to oscillate and fall. This is quantum resonance β a uniquely quantum signature.
Grover's Search Badge!
You mastered quantum search β βN queries for any unstructured database!
Optional. Stays on this device only β not sent to WhizzStep.
Key Concepts from Q11
π The quantum advantage
Classical needs N/2 average queries. Grover needs Ο/4Β·βN. For N=10ΒΉΒ², that's 500B vs ~785K β a factor of 636,000 fewer queries.
π The overshoot
Grover is a precise resonance instrument. Too few or too many iterations both fail. Success peaks sharply at the optimal iteration count β a quantum signature.
π Breaking AES
Grover's algorithm threatens symmetric encryption. A 256-bit AES key would need ~2ΒΉΒ²βΈ classical queries but only ~2βΆβ΄ quantum queries. This is why post-quantum symmetric keys are doubled.
β‘ Subroutine use
Grover is widely used as a subroutine in quantum optimisation, Monte Carlo simulation speedup, and collision-finding algorithms. The βN idea extends far beyond simple search.
About this lab
Learning objective: Explore amplitude amplification and the quadratic query advantage Grover's algorithm offers for idealised unstructured search.
What this simplifies: This is a local browser simulation, not access to real quantum hardware.
Privacy: No learner input leaves the device.
Teacher prompt: Ask the class why this simulation might mislead someone who takes it too literally.
Reflect: What is one thing this activity showed you that you did not expect?
β Back to all Labs