05 / Algorithms · LESSON 12 / 27 · 20 MIN
Amplitude amplification and Grover's search.
Follow the oracle's marking step and the inversion about the mean.
Uniform → mark |11⟩ phase → diffusion → |11⟩
Mark without measuring
With four candidates, H on both qubits yields amplitudes [1/2,1/2,1/2,1/2]. A phase oracle for 11 flips the sign of that amplitude only, giving [1/2,1/2,1/2,−1/2]. The probability bars have not moved yet.
Inversion about the mean
The diffuser D=2|s⟩⟨s|−I sends every amplitude a to 2ā−a, where ā is the arithmetic mean of all amplitudes. After 11 is marked the mean is 1/4, so the unmarked amplitudes become 0 and the marked one becomes 1.
Avoid overshooting
For one marked item among N, about (π/4)√N queries are needed. Extra iterations rotate the state past the target and away again. Building the oracle and fault-tolerant overheads are costs separate from this ideal query count.
LIVE EXPERIMENT / 1 OF 4
Initialize the register
Every qubit starts in zero.
TEST YOURSELF
Lesson quiz
Get all 2 questions right to pass. Retry as often as you like.
0/2 answered
Sign in with email or a wallet to check your answers and keep your lesson progress in sync.