Quantum approximate optimization algorithm
A parameterized circuit family alternating cost-dependent and mixing unitaries for combinatorial optimization.
Also called QAOA
On this page
Definition and significance
QAOA encodes a classical objective in a diagonal operator C and alternates evolution under C with a noncommuting mixer. A classical routine chooses the angles to improve the expected objective or another specified criterion. The circuit samples candidate solutions rather than certifying that a sampled solution is globally optimal.
The term p denotes the number of alternating layers. Ideal optimum performance is nondecreasing when a larger parameter family contains the smaller one, but actual training can fail and hardware noise can worsen results with depth. These different statements should never be merged.
Mechanism and mathematical treatment
For unconstrained binary optimization, a common initial state is |+>^n and a common mixer is B=sum_j X_j. One convention defines |gamma,beta>=exp(-i beta_p B)exp(-i gamma_p C)...exp(-i beta_1 B)exp(-i gamma_1 C)|+>^n. State preparation, objective sign and order must be explicit.
For MaxCut, C=sum_(u,v)(I-Zu Zv)/2 counts cut edges on computational-basis states. Each cost term is diagonal and commuting, while mixer terms are single-qubit X rotations. Constraints may require a different mixer and initial feasible state.
Fully worked reference example
For a graph with one edge, C=(I-Z0 Z1)/2 and p=1. In the chosen sign convention, the exact expected cut is 1/2+(1/2)sin(4beta)sin(gamma). At beta=pi/8 and gamma=pi/2, it equals 1, so only 01 and 10 are sampled, each with probability 1/2.
A direct derivation starts from equal amplitudes. The cost phase multiplies 01 and 10 by exp(-i gamma), leaving 00 and 11 unchanged. The mixer exp(-i beta X) on both qubits combines these amplitudes. Their final ZZ expectation is -sin(4beta)sin(gamma); inserting it into (1-<ZZ>)/2 gives the stated result. Changing the sign of either unitary convention changes the angle formula, not the underlying optimization problem.
Limitations and common misconceptions
A one-edge result does not predict performance on large hard graphs. Fixed-depth guarantees depend on graph families and objectives. Classical heuristics, semidefinite relaxations, tensor-network simulation and specialized solvers are relevant comparators. Training evaluations, shots and circuit compilation belong in an end-to-end resource account.
Scientific relationships
Alternating cost and mixer layers form a specific parameterized family.
The diagonal cost operator can encode a binary objective.
Historical source context
Farhi, Goldstone and Gutmann submitted the original QAOA preprint on 14 November 2014. Later variations of mixers, constraints and optimization procedures should retain separate citations rather than silently changing the original algorithm definition.
A triangle instance with a complete output distribution
Take MaxCut on a triangle with vertices zero, one and two. The objective C is zero on 000 and 111 and equals two on each of the other six bit strings. No assignment cuts all three edges, so the optimum is two. Use the convention |gamma,beta>=exp[-i beta(X0+X1+X2)]exp(-i gamma C)|+++>. The cost operation multiplies the six cut strings by exp(-2i gamma), leaving the two uniform strings unchanged.
At gamma=pi/4 and beta=pi/8, direct multiplication gives probability 1/32 for each of 000 and 111 and probability 5/32 for each of the six optimal strings. The expected cut is 6(5/32)(2)=15/8. The probability of obtaining an optimal cut in one sample is 15/16. Those are different performance measures: the expectation is 1.875 edges, while the success probability is 0.9375.
With independent samples from the same ideal circuit, the probability of seeing at least one optimal cut after k samples is 1-(1/16)^k. Two samples succeed with probability 255/256. Each sampled string can be checked classically by evaluating its three edge contributions. This verification certifies the sampled objective value; proving global optimality here uses the separate elementary observation that an odd cycle cannot have every edge cut.
Deriving the expectation from the symmetry-reduced state
Permutation symmetry and global bit-flip symmetry imply that all six cut strings have equal amplitudes and that the two uniform strings have equal amplitudes. It is enough to compute the amplitude of 000. Let c=cos(beta), s=sin(beta), and z=exp(-2i gamma). The mixer contributes c for a bit that remains unchanged and -i s for a flipped bit. Summing the eight possible initial strings gives a_000=[c^3+i s^3-3z(s^2 c+i s c^2)]/sqrt(8).
The total probability of a zero cut is 2|a_000|^2. Every other outcome has cut value two, so the expectation is 2[1-2|a_000|^2]. Simplifying yields 3/2+(3/4)sin(4beta)sin(2gamma)-(3/2)sin^2(2beta)sin^2(gamma). Substitution of the chosen angles gives 15/8. This calculation uses all triangle edges jointly and includes the correction caused by their shared vertices.
Simply adding three independent one-edge formulas would miss that correction. The cost terms commute, but their neighborhoods overlap and the mixer couples their effects. Commutation simplifies implementation of the cost layer; it does not make the optimized outcome statistics independent across edges. This is one reason a successful isolated-edge demonstration does not predict performance on a graph with cycles.
Parameter families, signs and objective choice
The state family contains the uniform distribution at beta=0 or gamma=0. Its expected triangle cut is then 3/2, since each edge is cut with probability one-half. A circuit with an additional QAOA layer can reproduce the one-layer state by setting its new angles to zero. Therefore the best exact expectation over the larger parameter family cannot decrease. A particular optimizer or noisy device can still return a worse result, because that statement concerns the mathematical optimum over parameters.
Maximizing expected cost need not maximize the probability of sampling a specific optimum on a general graph. Two distributions can have the same mean but different tails and different best-of-k performance. For the triangle, every nonoptimal outcome has value zero and every optimal outcome has value two, so expectation and optimal-sample probability are proportional. This convenient relation is special to the two-valued objective spectrum.
Changing the cost-unitary sign sends gamma to -gamma in the displayed formulas. Changing the mixer convention from exp(-i beta X) to R_X(beta) introduces a factor of two in its angle. Both conventions can describe the same physical family, but copying the numerical angles without conversion produces a different state. The derivation fixes these choices explicitly so that an implementation can be checked against exact probabilities.
Sources
Verification scope
Selected source text checked ·
Primary formal source anchor; original worked examples independently derived, not reported experiments.