MIVORA Start learning free

Variational Algorithms (VQE & QAOA)

Let a shallow quantum circuit make a tunable guess and a normal computer improve the knobs — the trick that squeezes value from today’s noisy machines.

Quantum Computing · Lesson 25 · 10 min read

Phase estimation and Shor are gorgeous — and useless on today’s hardware, because they need long, error-corrected circuits we don’t have yet (lesson 16, the NISQ era). So is quantum computing just waiting a decade for good machines? Not entirely. There’s a clever family of algorithms designed to get real work out of noisy, shallow circuits right now by teaming a small quantum circuit with an ordinary computer. Understanding them explains almost everything happening in practical quantum computing today. Hold the question: how do you do something useful when your quantum circuit can only run for a few steps before noise ruins it?

A shallow circuit as a tunable guess machine

The core idea: build a short quantum circuit with adjustable knobs — gates whose rotation angles you can dial (lesson 7, gates as tunable rotations). Different knob settings prepare different quantum states. So the circuit is a guess machine: feed it knob values, it produces a candidate answer state, and you measure how good that state is (e.g., how low its energy is, or how well it solves your problem). Because the circuit is short, it finishes before noise wrecks it — which is exactly why this fits today’s machines.

A classical optimizer turns the knobs

Now the “variational” part. You don’t know the best knob settings, so you let an ordinary classical computer search for them: try some knobs, the quantum circuit reports a score, the classical optimizer nudges the knobs to improve the score, repeat. It’s a hybrid loop — quantum machine as the evaluator, classical machine as the tuner — climbing toward the best answer. This is the same “try, measure, adjust, repeat” shape as training in machine learning, and as the agent loop you may have seen elsewhere: the quantum part only ever does one short job, scoring a guess.

Worked example
The loop in motion (VQE for a molecule’s energy):
• Goal: find a molecule’s lowest energy state.
• Quantum circuit with knobs prepares a guess state; measuring it estimates that state’s energy.
• The classical optimizer sees the energy, tweaks the knobs to lower it, and asks again.
• After many rounds the knobs settle where the energy is lowest — an estimate of the molecule’s ground energy, obtained with only short quantum runs.

What they’re for — and the honest caveats

Two headline members: VQE (variational quantum eigensolver) estimates lowest energies — useful for chemistry and materials — and QAOA (quantum approximate optimization algorithm) hunts for good solutions to optimization problems. Both are NISQ-friendly because the quantum circuit stays short. But keep the track’s honesty: it’s unproven that these beat the best classical methods on real problems at useful scale — they’re promising, heavily researched, and not a guaranteed win. They can get stuck (the classical search can plateau), and noise still limits them. Variational algorithms are the honest face of quantum-computing-today: genuine effort to extract value from imperfect machines, with the big, certain wins still waiting on error correction.

An everyday analogy

It’s a piano tuner working with an apprentice who has perfect pitch but a very short attention span. The apprentice (the noisy quantum circuit) can only listen for a second before getting distracted — but in that second they can tell you how far off a note is (the score). The tuner (the classical computer) can’t hear the subtle pitch themselves, but they can turn the pegs. So they loop: the tuner adjusts a peg, the apprentice gives a quick “sharp” or “flat,” the tuner adjusts again — slowly homing in on perfect tuning. Neither could do it alone; the short-attention expert plus the patient tuner get there together.

Worked example
Why this fits today when Shor doesn’t:
1. Shor/phase estimation need long, coherent circuits → they die on noisy hardware (lesson 16).
2. A variational circuit is deliberately short — it just scores one guess — so it finishes before noise dominates.
3. All the heavy, repeated searching is offloaded to a reliable classical computer.
4. So you get some quantum contribution now, without waiting for error correction — the pragmatic bridge between today’s machines and tomorrow’s. (Just don’t oversell it: beating classical methods isn’t proven.)

This is the reading. The interactive version — active-recall quiz, a hands-on experiment you run in your own AI, and an earned mastery check — is free in the app.

Start this lesson free →