QAOA and Quantum Optimization
An alternating circuit that tilts a superposition toward good cuts of a graph. Whether it can ever beat classical optimisers is — honestly — still unknown, and knowing exactly why is the real lesson.
Before this: NISQ Algorithms and VQE
In this lesson you’ll learn
- State MaxCut and encode it as a diagonal cost Hamiltonian whose extreme eigenstate is a classical bit string
- Describe the alternating cost/mixer ansatz and what each of the two layers contributes
- Explain the p-depth trade-off: the fixed-p locality obstructions, the empty p → ∞ guarantee, and why NISQ noise caps p
- State honestly why quantum advantage in optimisation remains unproven as of 2026, and where QAOA genuinely might matter
MaxCut, and how a graph becomes a Hamiltonian
The poster problem for quantum optimisation is MaxCut. Take a graph — vertices, edges — and paint every vertex one of two colours. An edge is "cut" when its endpoints get different colours, and the task is to choose the colouring that cuts the most edges. It looks like a puzzle and it is a monster: MaxCut is NP-hard, it shows up wherever something must be split into two groups with maximum disagreement across the boundary — circuit layout, spin glasses, clustering — and nobody expects any algorithm, classical or quantum, to solve every instance efficiently.
The encoding into quantum mechanics is almost embarrassingly direct. Give each vertex a qubit and read colour off the computational basis: |0⟩ is one side of the cut, |1⟩ the other. For an edge (i, j), the operator (1 − Z_iZ_j)/2 evaluates to 1 when the endpoints differ and 0 when they agree — check it on the four basis combinations, it is a one-line calculation. Summing over the edges gives the cost Hamiltonian C = Σ_{(i,j)} (1 − Z_iZ_j)/2, whose eigenvalue on any basis state is exactly the number of edges that colouring cuts. The best cut is the highest-eigenvalue eigenstate.
Pause on a structural point that separates this from the VQE chemistry problem you already know. C is diagonal in the computational basis. Every eigenstate is a plain classical bit string; the answer we want is not an entangled state, it is a colouring you could write on paper. Nobody needs a quantum computer to REPRESENT a cut, or to evaluate one — counting cut edges is instant. The only possible quantum contribution is to the SEARCH: arranging interference so that a measurement lands on a good bit string more often than blind luck would.
One more piece of vocabulary and the classical bar it sets. An algorithm has approximation ratio α if it always delivers at least α times the optimal cut. Painting vertices at random cuts half the edges on average, which already guarantees ratio 1/2 on any graph. The classical algorithm to beat is Goemans–Williamson (1995), a semidefinite-programming rounding scheme with a proven ratio of about 0.878 on every graph — and under a standard complexity conjecture, doing better than that in the worst case is NP-hard for any algorithm whatsoever, quantum ones included. Whatever QAOA is for, it is not for breaking that barrier.
Predict before you read on
C is diagonal: every computational basis state is a candidate cut, and its energy is that cut's size. Prepare the uniform superposition over all 2ⁿ colourings — every cut "present at once", as the headlines would put it — and measure every qubit. What do you get?
Commit to an answer — the next section is the payoff.
The rest of this lesson is part of the Advanced track
You have read the opening of QAOA and Quantum Optimization, and 9 more sections are waiting — the part where the idea actually gets built. The Advanced track picks up exactly where Quantum Foundations stops, and Pro opens all of it.
- The other three Advanced lessons — error correction, VQE, and quantum cryptography
- Certification for the Advanced track, with a shareable certificate
- Runs on real IBM Quantum hardware, not just the simulator
- The live Claude-powered tutor, on every lesson and every circuit
The whole Quantum Foundations course stays free, forever, with no account required.