|q⟩ Bad Qubits

intermediate · Programming · Amplitude Amplification

Applications in Speedups

Amplitude amplification is not a one-trick algorithm. The same pair of reflections that finds a marked item in an unstructured list reappears across a surprisingly wide range of computational problems. This lesson surveys the most important applications and explains precisely where the quadratic (or greater) speedup comes from in each case.

The common thread

Every application below reduces to the same abstract question: given a quantum circuit A\mathcal{A} that produces a superposition, and a predicate ff that marks some outputs as "good," how quickly can we find — or count — the good outputs?

The answer, via amplitude amplification, is always O(1/p)O(1/\sqrt{p}) applications of A\mathcal{A}, where pp is the fraction of good outcomes. Classically you need O(1/p)O(1/p) repetitions. The speedup is quadratic: O(1/p)O(1/\sqrt{p}) vs O(1/p)O(1/p).

Unstructured database search

The simplest application is searching a list of NN items for one that satisfies a Boolean predicate. No structure (sorting, hashing) can be assumed.

This is provably optimal for quantum computers; no algorithm can do better than Ω(N)\Omega(\sqrt{N}) queries against an unstructured oracle.

Satisfiability and constraint solving

Many hard combinatorial problems (SAT, graph coloring, scheduling) ask: "does any assignment of nn Boolean variables satisfy this formula?" A brute-force classical search checks up to 2n2^n assignments.

Grover's algorithm reduces this to roughly 2n=2n/2\sqrt{2^n} = 2^{n/2} evaluations of the formula. This does not push SAT into polynomial time — the speedup is still exponential in nn — but it halves the exponent. For a problem requiring 2602^{60} classical steps, a quantum machine needs roughly 2302^{30} steps.

Collision finding

Given a function f:{0,,N1}{0,,N1}f : \{0,\ldots,N-1\} \to \{0,\ldots,N-1\}, a collision is a pair xyx \ne y with f(x)=f(y)f(x) = f(y). Collision finding underpins many cryptographic hash attacks.

The quantum algorithm combines amplitude amplification with a birthday-paradox sampling strategy: store a random set of N1/3N^{1/3} function values, then run a Grover search over the remaining inputs to find a match. The result is a speedup to O(N1/3)O(N^{1/3}) — better than the naïve quadratic improvement because the birthday paradox already brings the classical cost to O(N)O(\sqrt{N}).

Amplitude estimation and counting

Recall from earlier in this module that amplitude estimation turns a single real number pp (the success probability of A\mathcal{A}) into a quantum measurement that yields an estimate p^\hat{p} with additive error ε\varepsilon in only O(1/ε)O(1/\varepsilon) applications of A\mathcal{A}. Classically, achieving the same precision by sampling requires O(1/ε2)O(1/\varepsilon^2) repetitions — a quadratic gap.

Counting solutions is a direct corollary: if MM of NN items satisfy a predicate, the quantum count can be estimated as M^=Np^\hat{M} = N \hat{p} with constant relative error in O(N/M)O(\sqrt{N/M}) oracle calls. For precision ε\varepsilon (relative), the cost scales as O(N/M/ε)O(\sqrt{N/M}/\varepsilon) — still a quadratic improvement over classical sampling.

Quantum optimization via Grover-style search

Optimization problems ask for the best solution, not just any solution. A standard quantum heuristic works as follows:

  1. Pick a random item; record its objective value vv.
  2. Run amplitude amplification to find an item that scores better than vv.
  3. Update vv and repeat.

Each amplification phase takes O(N/k)O(\sqrt{N/k}) calls where kk decreases as the threshold tightens. The total query count across all phases is O(N)O(\sqrt{N}), matching Grover and matching the theoretical lower bound for unstructured optimization.

Minimum finding

A special case of optimization: find the smallest element of an unsorted list of NN items. Classically this costs Θ(N)\Theta(N) comparisons. The quantum minimum-finding algorithm (Durr and Hoyer, 1996) uses amplitude amplification to find the minimum in expected O(N)O(\sqrt{N}) oracle calls.

Where amplification does not help

Knowing the limits is as important as knowing the wins. Amplitude amplification does not help when:

Summary

| Problem | Classical complexity | Quantum complexity | |---------|---------------------|--------------------| | Unstructured search | O(N)O(N) | O(N)O(\sqrt{N}) | | Satisfiability (brute force) | O(2n)O(2^n) | O(2n/2)O(2^{n/2}) | | Collision finding | O(N)O(\sqrt{N}) | O(N1/3)O(N^{1/3}) | | Amplitude estimation | O(1/ε2)O(1/\varepsilon^2) | O(1/ε)O(1/\varepsilon) | | Minimum finding | Θ(N)\Theta(N) | O(N)O(\sqrt{N}) |

The pattern is consistent: amplitude amplification converts a probability pp of finding a good answer into a query count of O(1/p)O(1/\sqrt{p}), delivering a quadratic speedup over every algorithm that simply repeats a classical subroutine. The next lesson shows how to wrap a custom oracle into this framework so you can apply the speedup to your own problems.

Sign in on the full site to ask questions and join the discussion.