QAOA — Quantum Approximate Optimization Algorithm

qc/algorithms

A variational algorithm for combinatorial optimization (TSP, Max-Cut, scheduling, …), not chemistry — same classical-optimizer-in-the-loop pattern as VQE, but instead of a general-purpose hardware-efficient ansatz, QAOA uses a problem-specific fixed structure: alternating layers of a cost unitary and a mixer unitary. Key insight: the problem itself becomes the ansatz — you don’t design a generic trial state and hope it can represent the ground state, you build a circuit whose repeated structure is literally “apply the cost function, then stir,” and let depth (how many times you alternate) trade circuit cost for solution quality.

Encoding the problem

Combinatorial problems are first written as QUBO (Quadratic Unconstrained Binary Optimization): binary variables , a cost function to minimize, plus penalty terms enforcing any constraints (e.g. “each city visited exactly once” for TSP). QUBO converts to an Ising Hamiltonian via the substitution

turning the classical cost function into a diagonal Hamiltonian built entirely from and Pauli terms — a real quantum operator whose ground state is the optimal solution. For TSP specifically this blows up fast: encoding cities takes qubits (one per city-timestep pair), so 10 cities already means 100 qubits.

The circuit

  • Cost unitary — encodes the objective; since is diagonal in the computational basis, this is just a phase applied to each basis state, proportional to that state’s cost.
  • Mixer unitary , typically — spreads amplitude across bitstrings, letting the optimizer explore rather than getting stuck.
  • Classical outer loop (COBYLA, Powell, …) adjusts to push amplitude toward low-cost bitstrings, exactly VQE’s measure→optimize→repeat loop, just with a combinatorial cost instead of a molecular energy.
  • Depth is the real knob: on a worked 4-city TSP instance, ground-state (optimal-tour) probability rose from 0.15 at to 0.44 at to 0.54 at — deeper circuits track the true optimum more closely, at the cost of more gates.
  • Warm-starting: rather than optimizing each depth from scratch, interpolate the converged from depth as the starting point for depth — a real, named refinement that speeds up the optimization loop noticeably.

QAOA as discretized adiabatic annealing

QAOA isn’t an arbitrary circuit template — it’s the Adiabatic Theorem, discretized. The theorem says: if a system starts in the ground state of and is perturbed slowly enough into , the system stays in the ground state throughout — ending in the ground state of , i.e. the optimal solution. Adiabatic annealing implements this as one continuous evolution

with decreasing from large to zero and increasing from zero to large — “slowly enough” being the catch, since the runtime needed scales with the inverse of the minimum spectral gap the system passes through.

QAOA discretizes this schedule into alternating steps: each pair is one “time slice” of , and increasing is literally slowing down the annealing schedule to make the approximation to true adiabatic evolution more accurate — this is why trades circuit cost for solution quality, not just an empirical observation. QAOA can even outperform true adiabatic annealing for subexponential runtimes, since the variational optimizer can find shortcuts (deliberately diabatic transitions) through the minimum-gap bottleneck that a strictly-adiabatic schedule can’t take.

Warm-starting, in full

Rather than starting QAOA from the equal superposition , warm-starting biases the initial state toward a classically-obtained approximate solution. Given a QUBO, relax the binary constraint to get a continuous Quadratic Program (efficiently solvable classically since convex QPs with PSD have no combinatorial hardness), producing a fractional solution . Prepare the initial state as

and pair it with a modified mixer whose ground state is exactly (rather than the standard mixer’s ground state ). This works because already overlaps the true optimum more than an equal superposition does, and it’s still the correct ground state for the (modified) mixer Hamiltonian the algorithm needs. On a portfolio-optimization QUBO, warm-start QAOA reached a much higher probability of sampling the optimal solution than standard QAOA at the same depth, with the gap being largest at low — exactly where circuit-cost pressure is highest.

Because and act simply (diagonal phase, per-qubit rotation) on a computational-basis state, QAOA can be prototyped entirely in classical linear algebra — no quantum circuit needed at all — by applying the cost phase as elementwise multiplication and the mixer as an -rotation amplitude mix directly on the statevector array. This is a deliberate transparency/speed trade-off for exploration and small instances, not how QAOA runs on real hardware.

QAOA vs. quantum annealing

Both target the same class of problems (find the ground state of an Ising-type Hamiltonian), but QAOA is gate-based and gives explicit, tunable control over discrete layers, while quantum annealing (D-Wave-style) continuously interpolates from a simple Hamiltonian to over one long analog evolution — different hardware, different tuning knobs, same underlying optimization target.

Self-Check

  • Why does QAOA use a problem-specific alternating cost/mixer circuit instead of a generic hardware-efficient ansatz like VQE does?
  • What does increasing depth actually buy you, and what does it cost?
  • How does the QUBO→Ising substitution turn a classical cost function into something a quantum computer can act on?
  • In what precise sense is QAOA “discretized adiabatic annealing,” and why can it sometimes outperform true adiabatic annealing?
  • What does warm-starting actually change about the initial state and the mixer, and why does that improve low-depth performance specifically?