Overview
Given a black box that recognises solutions, exactly when is a solution, how many calls does it take to find one among candidates? Classically about calls are needed when candidates are solutions and nothing else is known. Grover found a quantum algorithm that needs only about . Bennett, Bernstein, Brassard and Vazirani proved that no quantum algorithm can do better than for a single solution, and Boyer, Brassard, Høyer and Tapp extended the bound to for solutions. The speed-up is quadratic, not exponential, but it applies to any problem whose solutions can be checked efficiently.
Brassard, Høyer, Mosca and Tapp showed that the same mechanism boosts the success probability of any quantum subroutine (amplitude amplification) and, combined with phase estimation, estimates it with quadratically fewer repetitions than sampling (amplitude estimation). These two tools are among the most used subroutines in quantum algorithms.
Intuition
Start from the uniform superposition over all strings. It has a small component along the normalised superposition of solutions and a large component along the non-solutions. Two reflections act inside this plane: the oracle flips the sign of the solution component, and the diffusion step reflects about . Two reflections compose to a rotation by twice the angle between their mirrors, here . Each Grover iteration therefore turns the state by toward the solutions, and about iterations bring it close to them.
Classically, each query rules out one candidate; quantumly, each query adds an amplitude of order , and amplitudes add linearly while probabilities are their squares. That is also why one cannot do better: the lower bound shows that a query can change the state by only about on average over the possible positions of the solution. The lesson Grover search walks through the geometry with explicit vectors.
Prerequisites
The circuit model and oracles (phase kickback); reflections and rotations in a real plane. Phase estimation for the amplitude estimation part.
Theorems
Let be defined by , and write
Define the amplitude amplification operator . Then for every integer ,
so measuring after iterations succeeds with probability . With the success probability is at least , and . On the plane spanned by and , acts as a rotation by angle ; its eigenvalues there are .
This is Theorem 2 and Lemma 1 of Brassard, Høyer, Mosca and Tapp; the choice of and the bound appear in Boyer, Brassard, Høyer and Tapp for search. Grover's algorithm is the case , the projector onto marked strings.
- is a unitary on a finite-dimensional space with a distinguished initial state ; is an orthogonal projector (the good subspace).
- ; the cases are trivial.
- Exact reflections and are available.
Proof · Proof of the amplitude amplification theorem
Write . The vectors and are unit vectors (by the choice of ), orthogonal (one lies in the range of , the other in its kernel), and , .
The two reflections. acts on the plane as , . Next, because is unitary, , so
which maps to itself and every vector of orthogonal to to its negative. Both operators map into itself, hence so does .
is a rotation by on . Use coordinates , so that . Then : the reflection of the angle about . The map restricted to is the reflection about the line through , which sends to . (Check: , and by the identities and .) Composing,
Iterating. By induction on , , which is the claimed formula. The probability that a measurement of succeeds is .
Number of iterations. Let . Then , so and . Therefore . Finally gives .
Eigenvalues. In the basis the map is the real rotation matrix by angle , whose eigenvalues are with eigenvectors up to phase. These eigenvalues are what amplitude estimation measures.
The argument is that of section 2 of Brassard, Høyer, Mosca and Tapp, written with an explicit angle parametrisation.
Suppose a quantum algorithm making queries outputs, for every , the value with probability at least when run with the oracle . Then
so . The same bound holds for the bit oracle , which is equivalent to up to one ancilla.
This is the theorem of Bennett, Bernstein, Brassard and Vazirani, who used it to show that, relative to a random oracle, is not contained in . Boyer, Brassard, Høyer and Tapp sharpened the constant, and Zalka proved that Grover's algorithm is exactly optimal: no algorithm with fewer queries achieves the same success probability. The constant above is not tight: the standard hybrid argument already gives , and Grover search uses about queries.
- Query model - the algorithm is a sequence of fixed unitaries interleaved with calls to the oracle; only oracle calls are counted.
- For the oracle multiplies the query basis state by and acts as the identity on all other query states and on the workspace.
Proof · Proof of the search lower bound (hybrid argument)
Setup. The algorithm acts on a query register with basis and a workspace. With oracle it produces for fixed unitaries . Write for the state just after when the oracle is , and for the same with every oracle call replaced by the identity. Let , so that , and put ; .
One query moves the state little. Since and ,
Hence .
Summing over the marked position. For each , , so by Cauchy–Schwarz . Therefore
Success forces movement. Let be the probability that the final measurement outputs on the state (empty oracle). Since , at most indices have , so at least indices satisfy . For each of these, the outcome has probability at least on and at most on . The difference of the probabilities of one outcome is at most the trace distance of the two states, which for unit vectors is (because ). Hence for at least values of , and
Dividing by gives .
Bit oracle. With an ancilla prepared in , the bit oracle acts as on the remaining registers; conversely is the bit oracle conjugated by fixed gates on an ancilla. Any algorithm for one oracle is thus an algorithm for the other with the same number of queries, and the bound transfers.
This is the hybrid argument of Bennett, Bernstein, Brassard and Vazirani; section 6.6 of Nielsen and Chuang gives a closely related version for the exact case.
Run phase estimation with grid points on the operator and the input , obtain an integer , and output . Then for every integer ,
with probability at least when and greater than when . The procedure uses exactly evaluations of the oracle defining (counting each application of once, as in the source). If then with certainty, and if and is even then with certainty.
The reason is that lies in the plane on which has eigenvalues with ; phase estimation returns an estimate of , and both signs give the same . An additive error therefore costs applications of , against samples for estimating by repeated measurement of .
This is Theorem 12 of Brassard, Høyer, Mosca and Tapp, which also derives quantum counting (estimating the number of marked items) as a corollary. The proof combines the eigen-decomposition in the proof of amplitude amplification with the phase estimation tail bounds and the inequality ; it is not reproduced here.
- The setting of amplitude amplification - a unitary , a good-subspace projector , and .
- Exact controlled applications of ; is a positive integer (a power of 2 for the QFT-based circuit).
Worked Examples
Three qubits, one solution
, : , rad. The prescribed number of iterations is . The success probability after iterations, , is
| iterations | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| success probability | 0.1250 | 0.7813 | 0.9453 | 0.3301 |
After two queries the solution is found with probability ; a classical algorithm with two queries succeeds with probability if it simply checks two candidates, or if it also guesses a third unchecked one. A third Grover iteration overshoots and the probability falls to .
A million candidates
, : and . The failure probability after 804 iterations is , within the guaranteed bound . A classical search needs about queries on average.
Algorithms and Implementations
Input. The phase oracle on qubits; the number of solutions.
Procedure. Let satisfy and .
- Prepare .
- Repeat times: apply , then the diffusion operator .
- Measure in the computational basis and output the result (optionally check with one more query).
Guarantee. With and the projector onto marked strings, and is the operator of amplitude amplification (the sign convention gives exactly ). Hence after iterations the probability of measuring a marked string is , and for the chosen it is at least . The number of oracle queries is .
Cost. oracle calls plus diffusion steps; each diffusion is two layers of Hadamards and a reflection about , which is an -controlled conjugated by gates: elementary gates with ancillas. Total queries and further gates.
Remarks. If is unknown, running with a random number of iterations drawn from a range that grows geometrically finds a solution in expected queries (Boyer, Brassard, Høyer and Tapp). Iterating past is harmful: the probability oscillates with period about iterations.
The algorithm is due to Grover; the exact analysis with is from Boyer, Brassard, Høyer and Tapp, and section 6.1 of Nielsen and Chuang gives a textbook account.
- Access to through the phase oracle (obtainable from the bit oracle with one ancilla in ).
- The number of marked items satisfies and is known; for unknown see the remarks.
Fixed-point and oblivious variants
Unknown success probability. Standard amplitude amplification overshoots when the number of iterations is wrong, so it needs (or ) in advance; the randomized schedule of Boyer et al. and amplitude estimation are two remedies. Fixed-point search is another: Grover (2005) replaced the reflections by phase shifts of , giving an iteration that converges monotonically toward the target but loses the quadratic speed-up. Yoder, Low and Chuang (2014) gave the first fixed-point amplitude amplification that keeps the scaling: given only a lower bound on and a target failure probability, a sequence of generalised reflections with chosen phases guarantees that bound over the widest possible range of for its number of queries. Their construction is an early example of the phase-sequence methods developed in quantum signal processing.
Oblivious amplitude amplification. Amplitude amplification reflects about the initial state , which is impossible when part of that state is an unknown input . Berry, Childs, Cleve, Kothari and Somma (2014) showed that when a unitary satisfies with unitary, independent of , and having no component on in the ancilla, the reflection about on the ancilla alone suffices, and the iterates rotate by exactly as in the standard theorem for every input . This is what turns a probabilistic linear-combination-of-unitaries circuit into a deterministic one in Hamiltonian simulation.
Applications
- Searching the solution space of any problem in : a brute-force search over assignments drops to oracle calls.
- Boosting any bounded-error subroutine whose success can be recognised: instead of repetitions.
- Amplitude estimation and quantum counting, the basis of proposed quadratic speed-ups for Monte Carlo estimation.
- Oblivious amplitude amplification inside Hamiltonian simulation and quantum singular value transformation.
Limitations and Common Pitfalls
- Quadratic speed-ups are fragile in practice. Each oracle call must be implemented as a reversible circuit, typically far more expensive than one classical evaluation, and on error-corrected hardware every logical operation is slow. Babbush et al. (2021) computed runtimes under surface-code assumptions and concluded that quadratic speed-ups will not give an advantage on early fault-tolerant devices without significant improvements in error correction, while quartic speed-ups look much more practical.
- The oracle is not a database. "Searching an unsorted database" requires loading the data into a quantum-accessible memory, which costs at least as much as reading it classically unless a QRAM is assumed.
- Do not over-iterate. The success probability oscillates; more iterations can make it worse.
- Lower bounds are for unstructured problems. For problems with structure, classical algorithms may beat brute force and the relevant comparison is with the best classical algorithm, not with queries.
Related Research
Quantum phase estimation for amplitude estimation, quantum signal processing and quantum singular value transformation for the polynomial view in which Grover search is one example, and quantum complexity theory for oracle separations.