Guided Build
Build Grover's Algorithm, Step by Step
A scaffolded walkthrough of how Grover's Algorithm finds a marked item among 4 possibilities using interference, rather than checking each one individually.
Amplitude of each possible state (★ = the marked item we're searching for)
Step 1: The problem (1 of 6)
Imagine searching for one specific item among 4 unsorted possibilities, labeled 00, 01, 10, 11. Classically, you'd check items one by one — averaging 2.5 checks, worst case 4.
We'll use 2 qubits to represent these 4 possibilities (2² = 4 states) and build Grover's Algorithm to find the marked item faster.
Why this matters beyond search
The oracle-and-diffusion pattern you just walked through — marking a target with a phase flip, then amplifying it through reflection — is called amplitude amplification, and it's one of the most reused design patterns in quantum computing. It underlies Quantum Counting, Quantum Amplitude Estimation, and several other algorithms covered in our Algorithm Design Patterns article.