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.
- Prepare |+⟩ on all n qubits.
- For each layer k, apply exp(−iγk·C) and then exp(−iβk·B).
- Measure all qubits in the computational basis many times.
- Estimate the expected cost ⟨C⟩ from the samples and pass it to a classical optimizer.
- 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.
| Parameter | Role | Typical choice |
|---|---|---|
| Depth p | Number of cost and mixer layers | 1 to 10 on current devices |
| Cost Hamiltonian C | Encodes the objective as Pauli Z terms | Ising or QUBO form |
| Mixer B | Explores the solution space | Transverse field, sum of X operators |
| Angles γ and β | Control phase and mixing strength | 2p real values, often warm-started |
| Shots per evaluation | Statistical precision of ⟨C⟩ | Hundreds to tens of thousands |
| Classical optimizer | Updates the angles | COBYLA, SPSA, Nelder–Mead or gradient methods |
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.
| Problem | Encoding | Comment |
|---|---|---|
| MaxCut | One qubit per vertex, ZZ term per edge | Standard benchmark, guarantee of 0.6924 at p = 1 on 3-regular graphs |
| Max-k-SAT | Clause penalties as multi-qubit Z terms | Higher-weight terms deepen circuits |
| Portfolio selection | Binary asset choice with budget penalty | Penalty weights need tuning |
| Graph coloring | One-hot qubits per vertex and color | XY mixers keep valid assignments |
| Scheduling | Time-slot variables with conflict penalties | Qubit count grows quickly |
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 compared with related approaches
QAOA is closely related to several other optimization approaches, and the comparison clarifies where it fits. The table highlights the main differences.
| Method | Model of computation | Main difference from QAOA |
|---|---|---|
| Quantum annealing | Analog, continuous evolution | Fixed schedule rather than trained discrete angles |
| Adiabatic computation | Slow continuous interpolation | QAOA approximates it with p layers |
| Variational quantum eigensolver | Gate-based hybrid loop | General ansatz for ground states, not tailored to diagonal costs |
| Grover-based search | Gate-based, fault-tolerant | Provable quadratic speedup but deep circuits |
| Classical heuristics | Simulated annealing, Goemans–Williamson | Mature, scalable and often equal or better today |
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.