QCQI – Chapter 8 Detailed Summary: Grover Search & Amplitude Amplification
Learning Objectives¶
Implement the Grover iterate where marks “good” states and is diffusion.
Explain the two-dimensional geometry (good/bad subspace), derive the optimal iteration count, and quantify success.
Generalize to amplitude amplification with arbitrary state-preparation and reflection operators.
Understand amplitude estimation / quantum counting at a high level.
Build small oracles and diffusion circuits and explore multiple-solution cases.
Problem Statement & Oracle¶
Unstructured search: given with , find any with .
Oracle acts as a phase flip on marked basis states:
Eureka! Phase oracles are lossless: a global phase on marked states becomes actionable after interference via the diffuser.
State Decomposition & Geometry¶
Let (good) have size ; define and . Initialize with .
Eureka! Grover is a planar rotation in span by angle each iterate.
Grover Iterate¶
Oracle reflects across (phase flip on ). Diffusion reflects across . Therefore is a rotation by . After iterations,
Optimal count. Choose . Success .
Eureka! Quadratic speedup: queries vs. classical .
Diffusion Operator Circuits¶
Using , Implement by an -controlled- (phase flip on ), e.g., for : –CCX– on the last qubit with appropriate conjugations to retarget.
Eureka! “Reflect about ” reflect about in the Hadamard basis.
Multiple Solutions & Overshoot¶
With , increases; over-iterating rotates past the target. Use the same formula with known or guessed (or use fixed-point search variants to avoid overshoot).
Amplitude Amplification (General Form)¶
Given (any preparation), define reflections Then the iterate rotates by in the same two-dimensional subspace.
Eureka! Grover is just with the good-subspace projector defined by .
Amplitude Estimation & Counting (Idea)¶
Combine QPE with the Grover iterate to estimate (or ) without scanning : phase of ’s eigenvectors is . Quantum counting estimates .
Worked Nuggets¶
Mark a single item. Conjugate an -controlled- with on bits where the target has 0.
Diffuser for . .
General success curve. ; the first maximum is near .
Pseudo-code Aids¶
Pseudocode — Grover (one marked string, small)
Input: , marked bitstring , iterations Prepare Repeat times: Oracle: for each bit with apply on ; apply -controlled-; undo the ’s Diffuser: apply ; ; -controlled-; ; Measure in computational basis
Pseudocode — Optimal iteration estimate
Input: , guess ;
Pseudocode — Amplitude amplification (general)
Input: state-prep , projector Set , Iterate for steps; measure
Schematics¶
Grover Iterate (concept)¶
2D Rotation Picture¶
Hands-on Notebook (Multi-Backend)¶
Run: L10
In the first cell set backend to one of: cirq, pennylane, braket, pyquil, or qiskit.
Mini-Lab Ideas¶
For , mark one string and plot success vs. iterations to observe the sine-squared curve.
Mark strings; compare measured with theory using .
Replace by a biased (e.g., rotate first qubit) and verify amplitude amplification still performs planar rotations.