Variational Algorithms: VQE and QAOA
Variational algorithms pair a small parameterized quantum circuit with a classical optimizer: the quantum processor prepares trial states, measurement samples estimate a cost, and the classical loop adjusts the circuit's rotation angles to push that cost down. They are the algorithms most often run on today's hardware — and, as of 2026, none has demonstrated an end-to-end advantage over the best classical methods.
Why do today's algorithms need a classical partner?
The algorithms earlier in this course — Grover, phase estimation, Shor — assume a clean machine that can run long circuits without mistakes. Real devices are noisy: every gate (an operation on qubits, the quantum analogue of a logic-gate step) has some probability of error, so after a few dozen operations the computation degrades into static. Variational algorithms are the pragmatic response: keep the quantum circuit short, put tunable knobs in it, and outsource the hard thinking to a classical computer.
The loop has four steps, repeated until it converges. (1) A classical optimizer picks values for the knobs — angles of rotation gates. (2) The quantum processor runs the short circuit at those angles, preparing a trial state. (3) The circuit is run many times (shots) and measured, and the sampled bitstring counts are turned into a single number, the cost — designed so that better solutions score lower. (4) The optimizer looks at the cost and picks new angles. The two famous members of this family are VQE (Variational Quantum Eigensolver — cost is the estimated energy of a molecule or material) and QAOA (Quantum Approximate Optimization Algorithm — cost is the quality of a candidate solution to a combinatorial problem such as splitting a graph). Structurally they are the same animal: quantum makes a trial state, classical steers.
You’ve read the opening of chapter 10 — 7 more sections follow, with worked examples and circuits you can run on the page. A free account unlocks every chapter of every course (paid plans aren’t live yet — early readers get everything free).