What are Variational Quantum Algorithms?
Track: Variational & NISQ Algorithms · Difficulty: Intermediate · Est: 12 min
What are Variational Quantum Algorithms?
Overview
Variational quantum algorithms exist because near-term quantum hardware is powerful enough to run small circuits, but too noisy to run very deep, fully fault-tolerant algorithms.
A variational algorithm reframes “solve a hard problem” as:
- choose a parameterized quantum circuit (a controllable family of circuits)
- measure a quantity that tells you how good the current parameters are
- use a classical optimizer to update parameters
- repeat
This hybrid approach is a practical fit for NISQ devices because it can use:
- relatively shallow circuits
- repeated sampling (shots)
- classical computation to steer the search
Intuition
Variational means “optimization,” not magic
“Variational” here means we search over a family of candidate solutions.
- The quantum computer generates candidates (via a parameterized circuit).
- The classical computer decides how to change the parameters.
It’s similar in spirit to tuning a control knob:
- turn knobs → run experiment → observe outcome → adjust knobs → repeat
The hybrid loop
A useful mental model is a feedback loop:
- Quantum step: prepare a state using parameters
- Measurement step: estimate a score (cost) from repeated measurements
- Classical step: update to improve the score
The quantum computer is not “doing the optimization.” It is producing measurement data that the classical optimizer uses.
Difference from gate-based “one-shot” algorithms
Many textbook quantum algorithms (like the Deutsch family or Grover) are:
- a fixed sequence of gates
- one final measurement
- a direct interpretation of the output
Variational algorithms are different:
- they are iterative
- they rely on noisy estimates (shot noise)
- the final output is often an estimated quantity or best-found parameter set
Formal Description
A variational algorithm can be described by three ingredients.
1) An ansatz (a parameterized circuit)
You choose a circuit family . Running on a simple initial state (often ) produces a state that depends on parameters .
The ansatz is your “search space.”
2) A cost function
You define a real-valued objective that you want to minimize (or maximize). In variational quantum settings, is often defined via expectation values measured from the circuit.
3) A classical optimizer
A classical algorithm proposes parameter updates:
- choose
- repeat: measure and propose
The key constraints in NISQ:
- you only observe through noisy sampling
- each evaluation of costs circuit executions
Worked Example
Imagine you want a circuit to produce a state that makes measuring 1 on a particular qubit likely. Define a simple cost:
If is high, the cost is low.
Workflow:
- pick an initial
- run the circuit many shots to estimate
- compute
- update to try to reduce
This toy example captures the variational pattern without needing a specific named algorithm.
Turtle Tip
A variational algorithm is a feedback loop: quantum circuits generate data, and a classical optimizer uses that data to tune parameters.
Common Pitfalls
- Thinking “variational” means the quantum computer is solving the whole optimization. The optimizer is classical.
- Expecting a single run to produce the answer. Variational methods require repeated evaluations.
- Ignoring noise sources: shot noise, gate noise, and readout noise all affect the cost estimate.
Quick Check
- What are the three core ingredients of a variational algorithm?
- Why are variational methods a good fit for NISQ hardware?
- In one sentence, how do variational methods differ from fixed gate-based algorithms?
What’s Next
Next we zoom in on the quantum side of the loop: parameterized quantum circuits (PQCs). We’ll discuss what the parameters mean, why ansatz choice matters, and the tradeoff between expressivity and trainability.
