Quantum Approximate Optimization Algorithm
The Quantum Approximate Optimization Algorithm is the sharpest test case for the promise of near-term quantum computing: can a shallow, noisy, gate-based circuit solve combinatorial optimization problems better than a classical machine? Introduced by Edward Farhi, Jeffrey Goldstone and Sam Gutmann in 2014, QAOA belongs to the family of variational quantum algorithms — a parameterized quantum circuit prepares a trial state, a measurement estimates the expected cost, and a classical optimizer nudges the parameters in a feedback loop. What sets QAOA apart from a generic variational ansatz is that its structure is not arbitrary: it is a Trotterized, bang-bang caricature of quantum annealing, in which the smooth adiabatic schedule that slowly turns a mixer into a cost Hamiltonian is chopped into alternating maximal pulses whose durations become the variational parameters. Concretely one encodes a classical objective over bitstrings into a diagonal cost operator with , and pairs it with a non-commuting mixer that hops amplitude between neighbouring strings. The depth- state is built by alternately applying and to the uniform superposition, and the classical loop maximizes over just angles. Two theorems anchor the whole subject. First, an adiabatic limit: as the ansatz can reproduce slow annealing, so the optimal converges to the true maximum. Second, locality: at fixed each edge's expectation depends only on a radius- neighbourhood, which makes shallow QAOA analytically tractable on bounded-degree graphs and, at the same time, provably blind to global structure. This article develops the formalism, derives the MaxCut result that gives the celebrated guarantee, and lays out both the promise and the known obstructions.
- QAOA is a hybrid quantum–classical algorithm: it prepares by alternating a cost unitary and a mixer unitary for rounds from , then classically optimizes the angles to maximize .
- The objective is encoded in a diagonal Ising-type cost operator ; for MaxCut counts cut edges, and its largest eigenvalue is the optimum.
- At on 3-regular MaxCut, QAOA provably reaches approximation ratio , beating the random-guess value ; as the ansatz recovers the adiabatic theorem and converges to the exact optimum.
- Locality gives a light cone: each edge term spreads only to graph-distance , so shallow QAOA is analytically computable on small subgraphs — but also cannot "see" the whole graph, which is the root of its worst-case obstructions.
- The catch is the classical outer loop: the landscape is non-convex and can suffer barren plateaus, so "deeper is better" holds for the ideal optimum, not for a fixed optimizer budget on hardware.
- Key idea: QAOA replaces the smooth adiabatic schedule of quantum annealing with a finite bang-bang sequence of alternating cost and mixer unitaries whose pulse durations are variational parameters — turning an analog control problem into a low-dimensional classical optimization over angles while retaining a provable adiabatic limit.
Where this lives today
QAOA is the most-run optimization algorithm on today's quantum hardware because its circuits are shallow and structured. Superconducting and trapped-ion processors implement the cost layer natively — the diagonal terms map onto two-qubit entangling gates — and groups at Google, IBM, IonQ and QuEra have executed QAOA on tens to low hundreds of qubits as a stress test for gate fidelity, connectivity and error mitigation. Two research fronts dominate. The first is constrained QAOA: the Quantum Alternating Operator Ansatz swaps the -mixer for constraint-preserving mixers (XY-mixers that conserve Hamming weight) so the state never leaves the feasible subspace, handling Max--Vertex-Cover, cardinality-constrained portfolios and routing without exploding penalty terms. The second is the advantage question: for MaxCut on high-girth regular graphs the overlap-gap property provably caps constant-depth QAOA, and strong classical algorithms (Goemans–Williamson at ) remain hard to beat at accessible depths. QAOA is also the canonical laboratory for barren plateaus, parameter concentration (good angles transfer across instances, so one can pre-train) and noise resilience — feeding the broader case for fault tolerance and magic-state distillation at scale.
The physical picture
Start with the uniform superposition , equal amplitude on every one of the candidate bitstrings. The cost layer is diagonal: it stamps each bitstring with a phase proportional to its objective value, separating good and bad solutions in phase but not yet in probability. The mixer then makes those phases interfere by hopping amplitude between strings that differ by one bit flip. Choose the angles well and the interference is constructive on high-value strings and destructive on low-value ones; sampling the final state returns good solutions with boosted probability. QAOA is, in one line, a machine for turning objective-value phases into measurable amplitude. The deeper reading is bang-bang control of an annealer. Quantum annealing prepares the easy ground state of and then slowly turns off and on; go slowly enough and it ends in the ground state that encodes the optimum. QAOA chops that smooth schedule into alternating full-strength pulses and lets a classical optimizer choose their durations. The first figure contrasts the two schedules and shows how a QAOA layer is exactly one Trotter step of the anneal.
Locality is both the secret to analytic tractability and the source of the deepest limitation. Because and are sums of geometrically local terms, after layers the Heisenberg-evolved operator spreads only to qubits within graph-distance of the edge. So splits into independent local contributions computable on small subgraphs — but by the same token, constant- QAOA cannot distinguish two graphs that look identical within radius , which is exactly what obstruction results exploit. The payoff of the local calculation is a hard number: the second figure shows how the achievable approximation ratio climbs from the random-guess floor at through the Farhi–Goldstone–Gutmann guarantee at up toward the exact optimum as .
The core equations
The whole algorithm is one state and one number to maximize. The state is built by alternating two unitaries generated by non-commuting Hamiltonians, starting from the uniform superposition, and the number is the expected cost of that state.
where: — number of alternating layers, the circuit-depth parameter; — diagonal cost Hamiltonian, ; — mixer, standardly ; — the real variational angles; — the uniform superposition, ground state of . Read it right-to-left: phase by cost, mix, repeat times. The classical outer loop maximizes the expected cost of this state over the angles. Because is diagonal, this expectation is just the average objective value weighted by the measured output distribution.
where: — expected cost, the function the classical optimizer climbs; — the optimal angle set found by a routine such as gradient ascent, COBYLA, or Nelder–Mead. Estimating needs many circuit repetitions and measurements; updating the angles is classical. For the canonical benchmark, MaxCut, the cost operator counts the edges that a bit assignment cuts. Each edge contributes a projector that reads when its endpoints disagree and when they agree.
where: — edge set, one term per edge; — Pauli- on qubit , eigenvalue for bit and for bit ; — the cut projector, if endpoints differ. The largest eigenvalue of equals the size of the maximum cut. Since is just one state in Hilbert space, its expected cost can never exceed the largest eigenvalue — the variational (Rayleigh-quotient) bound. Dividing by that optimum defines the figure of merit.
where: — the true optimum, the largest eigenvalue of ; — largest eigenvalue; — approximation ratio, , with iff the trial state is the optimal eigenstate. Equality in the bound holds only at the true optimum, which QAOA reaches only as . The mixer acts qubit-by-qubit as a rotation about the -axis, and the exponential of a Pauli collapses to a simple cosine–sine form because squares to the identity.
where: — mixer angle; — Pauli-, the bit-flip generator. This is (up to a global convention) the single-qubit rotation ; it is what physically hops amplitude between neighbouring bitstrings. At depth one the expectation of each edge, computed in the Heisenberg picture, closes into an elementary trigonometric formula that depends only on the local graph. For a -regular triangle-free graph it is a single term.
where: — common degree of the endpoints; the exponent counts the other neighbours of each endpoint, whose incident cost terms each contribute a factor . The per-edge cut value is , and maximizing it drives the guarantee.
The goal is to prove that the best achievable QAOA objective converges to the true maximum, as . The strategy is to exhibit one particular family of angles — not necessarily the optimal one — that makes the QAOA circuit approximate the slow adiabatic evolution from the mixer to the cost Hamiltonian. Since the adiabatic theorem guarantees that slow evolution ends in the ground state that encodes the optimum, and since the QAOA optimizer can only do at least as well as any specific angle choice, the boxed limit follows. The result is what makes QAOA a principled ansatz rather than an arbitrary circuit, and it is also why QAOA is universal for quantum computation in the unbounded-depth limit.
Result. .
Step 1. Define the interpolating Hamiltonian for . At its ground state is , exactly the QAOA initial state; at its extremal eigenstate of encodes the optimal bitstring. Why: this straight-line path connects the state we can easily prepare to the state we want, with and as its two endpoints — the same two operators QAOA alternates.
Step 2. Invoke the adiabatic theorem: if is traversed over a total time that is large compared with , where is the smallest spectral gap along the path, the system stays in the instantaneous ground state and ends at the optimum. Why: slow driving forbids transitions across an open gap, so the final state is the encoded solution — this is the entire logic of quantum annealing.
Step 3. Trotterize the time-ordered evolution into short steps of size , giving . This is precisely the QAOA layer structure under the identification and . Why: a first-order product formula turns the continuous schedule into exactly the alternating cost-then-mixer pulses QAOA applies, so annealing is a special angle assignment inside the QAOA family.
Step 4. Conclude by nesting the inequalities. The optimal QAOA value is at least the value at these annealing-derived angles, , and the right side tends to as and grow together with the gap kept open; since always, the limit is exactly . Why: the variational optimizer can only improve on any fixed schedule, so QAOA inherits the annealer's asymptotic optimality — and, because arbitrary time evolution can be Trotterized this way, universality too. *Why both errors vanish: the Trotter error scales as and the adiabatic error as , so in the joint limit both go to zero, confirming the convergence to .*
Go deeper · Derivation B · 2 minThe p = 1 MaxCut edge expectation on a triangle-free graph
The goal is to compute one edge's contribution to for MaxCut and recover the Farhi–Goldstone–Gutmann formula for a -regular triangle-free graph. The method is to move the operator into the Heisenberg picture, conjugating first by the mixer and then by the cost layer, and to use locality — the light cone reaches only nearest neighbours at — to keep the bookkeeping finite. Evaluating the resulting operator on and discarding every term with a leftover (which averages to zero) leaves the single surviving trigonometric product, whose maximization gives the celebrated ratio for .
Result. for a -regular triangle-free graph.
Step 1. Conjugate by the mixer. Each rotates within its own algebra, , so becomes . Why: only and act non-trivially on , so this step is exact and touches only the two endpoints — locality at work.
Step 2. Conjugate by the cost layer. The pure- pieces commute with the diagonal and pass through untouched, while each factor is rotated by every cost term sharing its qubit, picking up a factor per incident edge; triangle-freeness means and share no neighbour, so there are no cross-terms. Why: a on qubit fails to commute with the term of every neighbour , and the exponential of that mismatch is exactly a weight — this is where the graph degree enters.
Step 3. Evaluate on . Since and but , every surviving term must reduce to -type operators on the initial state; the only such survivor is the cross term with one and one endpoint. Why: the uniform superposition is the eigenstate of every , so it filters the operator down to its -aligned part and kills the rest.
Step 4. Collect the surviving factors: from the two endpoints combines as (doubled by the two symmetric cross terms into ), from the endpoint edge, and from the other neighbours of each endpoint, giving . The per-edge cut value is then . Why: assembling the weights reproduces the FGG edge formula, and maximizing the cut over at yields the number quoted in every QAOA paper. *Why the number is : at , maximizing gives at ; with the cut fraction is , so .*
Go deeper · Derivation C · 2 minThe light cone — why shallow QAOA is local
The goal is to show that conjugating a two-qubit operator by QAOA layers spreads its support only to qubits within graph-distance of the edge, so that each term of is computable on a bounded subgraph. The method is to track operator support layer by layer: the mixer never enlarges support because it is single-qubit, while each cost layer can grow support by exactly one graph step through its two-qubit terms. Iterating times confines the Heisenberg-evolved operator to a radius- ball. This single fact is double-edged — it makes shallow QAOA analytically and classically tractable on bounded-degree graphs, and it is simultaneously the mechanism behind the algorithm's worst-case obstructions.
Result. , the radius- balls around the endpoints.
Step 1. One mixer layer, , rotates each qubit's operator inside its own single-qubit algebra without touching any other qubit. Why: is a sum of commuting single-qubit terms, so it can rotate locally but can never create a new multi-qubit correlation — support is unchanged.
Step 2. One cost layer, , can grow the support of an operator on qubit to also cover qubit whenever the edge appears in . Why: the term fails to commute with a , and conjugation produces a term acting on both and — support advances by one graph step per cost layer.
Step 3. Iterate alternations. Support grows by at most one graph step per cost layer, so after layers it is contained in . Why: the mixer never spreads support and each cost layer spreads it by one, giving a strict light cone of radius — a discrete Lieb–Robinson bound for finite-depth circuits.
Step 4. Read off both consequences. On a bounded-degree graph the ball has size independent of , so depends only on the local subgraph's degrees and cycle counts and can be evaluated exactly; but two graphs identical within radius are indistinguishable to depth- QAOA. Why: the same locality that lets you compute the expectation on a laptop also blinds constant-depth QAOA to global structure, which is what obstruction theorems exploit. *This finite-depth light-cone argument has two faces: the tractability side reproduces the FGG local-subgraph computation, and the limitation side underlies the Bravyi–Kliesch–Koenig–Tang and overlap-gap obstructions for low-depth QAOA on random instances.*
Limiting cases
QAOA is sharply characterized in a handful of regimes that bracket everything between the trivial floor and the exact ceiling.
| Case | Result | Meaning |
|---|---|---|
| (no layers) | The uniform superposition gives the random-assignment average; for MaxCut this is , approximation ratio . | |
| (adiabatic limit) | Trotterized slow annealing recovers the exact optimum; QAOA becomes universal and asymptotically exact. | |
| Fixed , bounded degree | set by the radius- subgraph of edge | Locality and concentration: expectations are computable on local neighbourhoods and often concentrate across instances. |
| , 3-regular MaxCut | approximation ratio | The original Farhi–Goldstone–Gutmann worst-case guarantee for the simplest nontrivial instance class. |
| High girth, low | capped below by the overlap-gap property | Local view cannot exploit global structure of hard spin-glass instances; a genuine obstruction, not a numerical artefact. |
Worked examples
1 · MaxCut on the 6-cycle at p = 1 (fully worked)
Take the ring graph — six vertices in a cycle, so every vertex has degree and there are no triangles. Run QAOA at depth . Find the optimal angles, the best expected cut , and the approximation ratio.
Step 1. Fix the target. is bipartite, so the maximum cut colours the ring alternately and cuts every edge: . This is the denominator for the approximation ratio.
Step 2. Write the per-edge expectation. With , equation (6) gives . The per-edge cut value is , and every one of the six edges is equivalent by symmetry, so .
Step 3. Optimize the angles. is largest when is most negative, i.e. . Take and . Then , so each edge is cut with value .
Step 4. Assemble. cut edges, and the ratio is . A brute-force simulation over the full grid confirms at these angles — the closed form is exact. Optimal γ = π/4, β = 3π/8, F₁ = 4.5, r = 0.75, a clear jump over the p = 0 floor of 0.5.
2 · The 0.6924 guarantee for 3-regular MaxCut (fully worked)
On any 3-regular triangle-free graph, run QAOA at . Show the worst-case per-edge cut fraction is at least , and hence .
Step 1. Specialize equation (6) to : . The per-edge cut value is , and every edge sees the same local structure, so maximizing one edge maximizes the total.
Step 2. Separate the two angles. The factor ranges over , so its optimal magnitude is ; the whole problem reduces to maximizing over .
Step 3. Maximize . Setting gives , so , , and .
Step 4. Convert to a cut fraction. Choosing makes , so each edge is cut with fraction . Because , the expected cut divided by the true optimum satisfies . Thus r ≥ 0.6924 at p = 1 — the Farhi–Goldstone–Gutmann bound, comfortably beating random guessing (0.5) but still short of the classical Goemans–Williamson 0.878.
Physics of the portrait
QAOA is where quantum complexity theory, condensed-matter physics and hands-on device engineering meet — and it carries the fingerprints of one group that spent two decades asking whether adiabatic ideas could be made practical.
Origins · 1 minEdward Farhi and how this was discovered
Edward Farhi began in high-energy theory — quark jets, the Standard Model, the early universe — before turning to quantum computation in the late 1990s. With Jeffrey Goldstone, Sam Gutmann and Michael Sipser he proposed adiabatic quantum computation in 2000: solve hard problems by preparing the easy ground state of a mixer Hamiltonian and slowly deforming it into a problem Hamiltonian whose ground state encodes the answer. That analog paradigm ran into the hard question of spectral gaps, but it planted the seed. In 2014, again with Goldstone and Gutmann, Farhi distilled the idea into a gate-model recipe built for shallow, imperfect hardware: QAOA. Unusually, the paper proved a concrete worst-case guarantee — the ratio for 3-regular MaxCut at depth one — giving the field a hard number to beat. Farhi and Aram Harrow then argued that even low-depth QAOA sampling is classically intractable under plausible assumptions, sharpening the advantage stakes. As director of MIT's Center for Theoretical Physics and later at Google, Farhi made QAOA the standard testbed for near-term optimization. His signature is to take a grand analog idea and compile it into something you can run on the machines that exist.
Going further
References. Farhi, Goldstone, Gutmann, A Quantum Approximate Optimization Algorithm, arXiv:1411.4028 (2014) · Preskill, Quantum Computing in the NISQ era and beyond, Quantum 2, 79 (2018) · Nielsen and Chuang, Quantum Computation and Quantum Information, 10th Anniv. Ed., Ch. 4 (Pauli algebra) and Ch. 6 · Kitaev, Shen, Vyalyi, Classical and Quantum Computation, AMS (2002), adiabatic and Hamiltonian complexity · Hadfield et al., From the QAOA to a Quantum Alternating Operator Ansatz, Algorithms 12, 34 (2019) · Bravyi, Kliesch, Koenig, Tang, obstructions to variational optimization from symmetry and locality (2020). The key checkpoints across this article are: the triangle-free edge expectation , with at confirming ; the result giving ; the worked example with , , , ; the mixer identity from the series; the adiabatic/Trotter convergence argument; the radius- light-cone bound for finite-depth circuits; and the variational inequality , the Rayleigh-quotient bound.
Prerequisites. Pauli Operators and the Computational Basis · Quantum Adiabatic Theorem and Quantum Annealing · Variational Principle and Expectation Values · Trotter–Suzuki Decomposition. Leads to. Measurement-Based Quantum Computation · Magic State Distillation · Topological Quantum Computation.
Ask the tutor: Ask me to run the edge calculation on your own graph, or to show exactly where the overlap-gap property caps shallow QAOA.
Is QAOA the same thing as quantum annealing?
They are close cousins with an important difference. Quantum annealing is an analog protocol: you physically prepare the ground state of a mixer Hamiltonian and then continuously deform it into the cost Hamiltonian over some schedule, hoping the adiabatic theorem keeps you in the ground state. QAOA is a digital, gate-model recipe that Trotterizes that schedule into discrete alternating pulses and — crucially — lets a classical optimizer choose the pulse durations rather than fixing them by a predetermined schedule. So annealing is one particular point inside the QAOA family (Derivation A makes this precise), but QAOA's freedom to pick bang-bang controls means that at small it can outperform a naive linear anneal of the same resource. QAOA also runs on error-correctable gate hardware, while annealing is typically analog.
Why start in the state |+⟩ rather than |0⟩?
Because is the extremal eigenstate of the mixer , and the adiabatic-limit argument requires beginning in an eigenstate of : the interpolation starts at in the mixer's ground state. It is also the least-biased starting point — equal amplitude on all candidate bitstrings, so no solution is favoured before optimization. Starting in , an eigenstate of rather than , would break the annealing correspondence and make a poorer ansatz. The uniform superposition is prepared trivially by one layer of Hadamard gates.
Does adding more layers always give a better answer in practice?
In theory yes, in practice not necessarily. The best possible value never decreases with , because a deeper circuit can always reproduce a shallower one by zeroing the extra angles. But the value you actually achieve depends on whether your classical optimizer finds that global maximum, and the landscape is non-convex, dotted with local optima, and prone to barren plateaus where gradients shrink exponentially with system size. With a fixed optimization budget the achieved ratio can plateau or even drop as grows and the parameter space balloons. This gap between the theoretical monotonicity and the practical result is one of the central open challenges of the field, and it motivates tricks like parameter transfer and warm-starting.
What is a barren plateau and why does it threaten QAOA?
A barren plateau is a region of the variational landscape where the objective's gradient is exponentially small in the number of qubits, so the cost surface looks essentially flat almost everywhere. A gradient-based optimizer then has no signal to follow: it would need exponentially many measurement shots just to resolve which way is uphill, wiping out any speedup. Plateaus arise from over-expressive or highly entangling ansätze and from noise. QAOA's structured, problem-informed ansatz is somewhat protected compared with hardware-efficient random circuits, and good angles often concentrate across instances so they can be reused — but plateaus remain a real obstruction at large depth and width, and diagnosing when a problem class is safe is an active research question.
How does QAOA compare with the best classical algorithm for MaxCut?
For MaxCut the classical bar is high. The Goemans–Williamson semidefinite-programming algorithm guarantees a cut of at least times the optimum on any graph — well above QAOA's at depth one. To beat Goemans–Williamson, QAOA needs larger , and here the news is mixed: on some instances moderate depth suffices, but on high-girth regular graphs the overlap-gap property provably caps constant-depth QAOA below the optimum, and matching or beating strong classical methods has not been demonstrated at experimentally accessible depths and sizes. So QAOA at is a clean provable improvement over random guessing, not a claim of classical supremacy. Whether some depth and problem class yields a genuine, scalable quantum advantage for optimization is the open question the whole subject orbits.
Why is the light cone both a blessing and a curse?
The light cone says that after layers an edge operator only "feels" the graph within distance of its endpoints. On the blessing side, this makes shallow QAOA tractable: on a bounded-degree graph you can compute each edge's expectation exactly on a small fixed subgraph, independent of the total qubit count — which is how the bound is proved with pen and paper. On the curse side, constant-depth QAOA is literally unable to distinguish two graphs identical within radius , so if the optimal solution depends on global structure beyond that radius, shallow QAOA cannot find it. Obstruction results like the overlap-gap property turn this locality into a provable performance ceiling for low-depth circuits on certain random instances.