QAOA

Also known as: Quantum approximate optimization algorithm

On this page 7

QAOA, the quantum approximate optimization algorithm, is a hybrid quantum-classical method that searches for good approximate solutions to combinatorial optimization problems by applying alternating layers of a problem-dependent cost operator and a mixing operator to a register of qubits. Among quantum algorithms, it was introduced in 2014 by Farhi, Goldstone and Gutmann as a candidate for near-term quantum computing hardware, because its circuits can be kept shallow.

QAOA belongs to the family of variational quantum algorithms: a classical optimizer tunes a small set of angles, while the quantum processor prepares and samples the trial state. It can be viewed as a discretized, trainable version of adiabatic quantum computation, and with infinitely many layers it recovers that adiabatic limit.

How QAOA builds its trial state

QAOA starts by encoding the problem as a cost Hamiltonian C that is diagonal in the computational basis, so each bit string z has energy C(z) equal to its objective value. The register is first prepared in the uniform superposition |+⟩ of all n-bit strings by applying a Hadamard gate to every qubit.

The algorithm then applies p layers, each consisting of two unitaries. The cost unitary exp(−iγC) imprints phases that depend on the objective value, and the mixer unitary exp(−iβB), with B the sum of Pauli X operators, moves amplitude between neighboring bit strings. The 2p angles (γ1…γp, β1…βp) are the variational parameters.

  1. Prepare |+⟩ on all n qubits.
  2. For each layer k, apply exp(−iγk·C) and then exp(−iβk·B).
  3. Measure all qubits in the computational basis many times.
  4. Estimate the expected cost ⟨C⟩ from the samples and pass it to a classical optimizer.
  5. Update the angles and repeat until the expected cost stops improving, then keep the best sampled bit string.

Key components and parameters of QAOA

Each component of QAOA involves a design choice that strongly affects performance. The table summarizes the main parameters and the typical settings used in practice.

ParameterRoleTypical choice
Depth pNumber of cost and mixer layers1 to 10 on current devices
Cost Hamiltonian CEncodes the objective as Pauli Z termsIsing or QUBO form
Mixer BExplores the solution spaceTransverse field, sum of X operators
Angles γ and βControl phase and mixing strength2p real values, often warm-started
Shots per evaluationStatistical precision of ⟨C⟩Hundreds to tens of thousands
Classical optimizerUpdates the anglesCOBYLA, SPSA, Nelder–Mead or gradient methods
Main QAOA design parameters

A cost term such as z_i·z_j for an edge maps to a ZZ interaction, implemented with two CNOT gates around an Rz rotation. As a result, the two-qubit gate count per layer grows with the number of terms in the cost function, and hardware connectivity often forces extra SWAP gates.

Problems QAOA is applied to

QAOA targets problems that can be written as quadratic unconstrained binary optimization, or QUBO, which covers a wide range of NP-hard tasks. Constraints are handled either by penalty terms in the cost Hamiltonian or by a constraint-preserving mixer.

ProblemEncodingComment
MaxCutOne qubit per vertex, ZZ term per edgeStandard benchmark, guarantee of 0.6924 at p = 1 on 3-regular graphs
Max-k-SATClause penalties as multi-qubit Z termsHigher-weight terms deepen circuits
Portfolio selectionBinary asset choice with budget penaltyPenalty weights need tuning
Graph coloringOne-hot qubits per vertex and colorXY mixers keep valid assignments
SchedulingTime-slot variables with conflict penaltiesQubit count grows quickly
Typical problem classes and their encoding

The original analysis showed that at depth p = 1, QAOA on MaxCut for 3-regular graphs achieves an approximation ratio of at least 0.6924. The classical Goemans–Williamson algorithm reaches about 0.878 on general graphs, so low-depth QAOA does not beat the best classical guarantee in this setting.

QAOA is closely related to several other optimization approaches, and the comparison clarifies where it fits. The table highlights the main differences.

MethodModel of computationMain difference from QAOA
Quantum annealingAnalog, continuous evolutionFixed schedule rather than trained discrete angles
Adiabatic computationSlow continuous interpolationQAOA approximates it with p layers
Variational quantum eigensolverGate-based hybrid loopGeneral ansatz for ground states, not tailored to diagonal costs
Grover-based searchGate-based, fault-tolerantProvable quadratic speedup but deep circuits
Classical heuristicsSimulated annealing, Goemans–WilliamsonMature, scalable and often equal or better today
QAOA and neighboring methods

The quantum alternating operator ansatz, which shares the QAOA acronym, generalizes the mixer to respect problem constraints. Many papers use the name for both, so the choice of mixer should always be stated explicitly.

Limitations and open questions

QAOA has no proven quantum advantage for practical optimization, and several obstacles stand in the way. Low-depth circuits suffer from locality limits: at small p, each qubit only feels a bounded neighborhood of the graph, which caps achievable quality on some instances.

  • Training difficulty: the cost landscape is non-convex, and noise and shot error flatten gradients, sometimes producing barren plateaus.
  • Noise sensitivity: deeper circuits improve the ideal ratio but accumulate gate errors faster on current hardware.
  • Overhead of routing: dense problem graphs on sparse chips require many SWAP gates.
  • Classical competition: tensor network simulation and tuned heuristics often match results for current problem sizes.

Practical mitigations include angle transfer between similar instances, interpolation strategies that initialize depth p + 1 from depth p, and warm starts from classical solutions. Researchers also observe parameter concentration, meaning optimal angles are similar across random instances of the same family, which reduces training cost.

In simple terms

QAOA is a way to use a quantum computer to look for good answers to hard puzzles, such as splitting a network into two groups with as many links between them as possible. It does not test every answer one by one.

Instead, it repeatedly nudges all possible answers at once, making good ones more likely and bad ones less likely. A normal computer adjusts the size of each nudge after every attempt. The result is a good answer, not a guaranteed best one, and today classical methods are often just as good.

A practical example

A logistics research group wants to split a delivery network of 16 depots into two zones while maximizing the number of routes that cross between them, a MaxCut problem. They map each depot to one qubit on a superconducting processor and each route to a ZZ term in the cost Hamiltonian.

Starting at depth p = 1, they optimize two angles with COBYLA, using 4,000 shots per evaluation, then use the result to initialize depth p = 3. The best sampled partition cuts 92 percent of the optimal number of routes, which a classical solver confirms in under a second. The team concludes that the experiment validates the workflow, but that the instance is too small to show any advantage over classical optimization.