Skip to main content
← zooGrover's SearchP(target) = 12.5%

Step Through

Step 0 / 8 | Iteration 0

Qubits

8 states, optimal = 2 iterations

Target: |101⟩

How it works

1. Start with uniform superposition (all equal)

2. Oracle: flip the sign of the target state

3. Diffusion: reflect all amplitudes about the mean

4. Repeat ~π/4 · √N times for maximum probability

About Grover's Algorithm

Grover's algorithm finds a marked item in an unsorted database of N items using only √N queries — a quadratic speedup over the classical O(N) search. It works by repeatedly applying two operations: an oracle that flips the phase of the target state, and a diffusion operator that amplifies the marked amplitude while suppressing the rest.

Each iteration (called a "Grover step") rotates the state vector slightly toward the target. After approximately π/4 × √N iterations, the target state's probability is near 100%. Crucially, too many iterations overshoot — the probability starts decreasing, making timing essential.

This interactive lets you choose the number of qubits and target state, then step through the oracle and diffusion operations one at a time, watching amplitude amplification unfold in the probability histogram.