CHAPTER 11
Grover search and amplitude amplification
Learning goals. Implement two reflections, derive the two-dimensional rotation, choose iteration counts, and include oracle and sampling costs.
11.1 The search problem
A predicate marks M of N candidates. We can coherently implement for marked x and otherwise. For simplicity let and prepare
One measurement of this state succeeds with probability M/N. Grover’s algorithm increases that probability using the oracle and the diffusion operation
D is a reflection: it keeps and reverses components orthogonal to it. It is unitary because . It can be implemented using Hadamards and a phase operation on , up to global phase.
For amplitudes , define their mean . Then
The “reflection about the mean” description refers to amplitudes, which may be complex; it does not reflect probabilities.
11.2 Four-item worked example
Let N=4 and mark 10. Start with amplitudes . The oracle gives
Diffusion maps an unmarked amplitude to , and the marked one to . Thus one iteration gives exactly. This special small case illustrates interference but is not the general iteration count [15].
11.3 Rotation in a two-dimensional subspace
Define normalized uniform marked and unmarked states . Then
The oracle reverses the good component. Diffusion reflects about . Their product rotates the state in this plane by toward the marked subspace. After k iterations,
Choose a nonnegative integer k near and compare the neighboring integer values. When , this is approximately iterations. Additional iterations can rotate past the target and reduce success.
For N=8,M=1, after one iteration
so . After two, . The algorithm does not monotonically improve forever.
11.4 General amplitude amplification
Suppose an algorithm A prepares . Replace the uniform-state reflection by . Alternating it with a phase flip of successful outcomes amplifies the initial success amplitude. The cost includes calls to both A and as well as the success test [16].
Unknown M complicates choosing k. Randomized iteration schedules, counting methods, or fixed-point variants can address this, with their own guarantees and costs. Applying the known-M formula to an unknown success rate is not an exact algorithm.
11.5 What the speedup does and does not establish
Grover achieves a quadratic improvement in black-box query complexity and is optimal in that setting [17]. A practical runtime includes preparation, reversible predicate computation, workspace, fault tolerance, and repetitions. Searching an ordinary database is not automatically one cheap quantum query: data access must be defined.
For an n-bit key with an efficient verification predicate, unstructured quantum search has the query scale . That observation is not a complete cryptanalytic resource estimate. Parallelism, oracle circuits, reversible memory, and error-correction overhead affect the physical cost.
Grover also does not solve NP-complete problems in polynomial time in general. Replacing a exhaustive search by remains exponential in n. Structure-specific classical or quantum algorithms may perform differently; the black-box lower bound does not apply to every structured task.
Laboratory L15 — Amplitude amplification. Choose register size, marked items, iterations, shots, and seed. Inspect signed amplitudes after each iteration and the complete success curve. Deliberately over-rotate.
11.6 Exercises
11.1. For N=4,M=1, calculate success after two iterations.
Show solution / guidance
, so . The second iteration undoes the perfect success of the first.
11.2. For M=N/2, does the ordinary iteration improve success?
Show solution / guidance
, so for every integer k. This reflection schedule cannot improve it.
11.3. Prove D preserves the vector norm.
Show solution / guidance
Let , with . Then .
11.4. A state preparation costs 100 gates, its inverse costs 100, and a success oracle costs 500. Estimate gate work for 20 amplification iterations, excluding reflection overhead.
Show solution / guidance
gates, plus the initial preparation and omitted reflections. Counting only 20 oracle queries would conceal most details.
11.5. With independent success probability P per run, how many runs make failure at most ?
Show solution / guidance
Failure is . For , choose and round up. Verification of the proposed answer must also be included.