QuantumAtlas

Algorithms

Variational Quantum Algorithm

A hybrid method that tunes the parameters of a short quantum circuit with a classical optimizer to minimize a cost function.

Definition

A variational quantum algorithm is a recipe for getting something useful from today's small, noisy quantum computers. You write a short quantum circuit with adjustable knobs, run it, measure how good the result is by some cost, and let an ordinary computer turn the knobs to improve the cost. Repeat until the cost stops improving. VQE for chemistry and QAOA for optimization are the best-known examples.

In depth

The appeal of the approach is that it works with shallow circuits. Instead of long, precise computations, it uses many short runs and lets classical optimization absorb some hardware imperfections. The cost can often be written as the expectation of a Hamiltonian, as in VQE, or as the average value of a cut or objective, as in QAOA. Many variants exist, including quantum neural networks and variational linear solvers.

Serious difficulties have appeared. Barren plateaus, discovered by McClean and coauthors in 2018, are regions of the parameter landscape where gradients vanish exponentially with the number of qubits, which makes training infeasible for deep or random circuits and for global cost functions. Noise can also flatten the landscape. Measurement cost is another problem: estimating each expectation value to useful precision takes thousands of shots, and an optimizer may need thousands of iterations.

Theory has also raised questions about advantage. Cerezo and coauthors argued that circuits designed to avoid barren plateaus often have structure that makes them classically simulable, which would remove the case for quantum hardware. No variational algorithm has yet shown a clear advantage over classical methods on a practical problem, and the field is shifting toward fault-tolerant algorithms while using variational methods as testbeds.

Technical Definition

A variational quantum algorithm defines a parameterized unitary U(theta), a cost function C(theta) equal to the expectation value of an observable in the state U(theta) applied to a reference state, and a classical optimizer that updates theta using measured values of C and sometimes its gradients. Shallow circuits are chosen to fit the coherence limits of near-term hardware.

Visual Explanation: An Analogy

Think of tuning a radio by turning a dial and listening for the clearest signal. You do not know the right setting in advance, so you adjust, listen, and adjust again until the sound is as clear as it gets.

Key facts

ItemDetail
ComponentsParameterized circuit, cost function, and classical optimizer
ExamplesVQE, QAOA, variational linear solvers, quantum neural networks
Main obstacleBarren plateaus, where gradients vanish exponentially
Gradient methodParameter-shift rule, two circuit runs per parameter
StatusNo clear practical advantage demonstrated

Where the idea comes from

Peruzzo and coauthors introduced the variational eigensolver in 2014, and Farhi, Goldstone, and Gutmann's QAOA followed that year. Interest peaked around 2018 to 2021 and has since been tempered by trainability and classical simulability results.

Real-World Use Cases

  • Finding ground-state energies of small molecules.
  • Approximate optimization of combinatorial problems.
  • Training quantum machine learning models.
  • Testing hardware and error mitigation techniques with a common workflow.

How it differs from related ideas

  • Phase estimation gives guaranteed accuracy but needs deep circuits, while variational methods use shallow circuits with no guarantee.
  • Quantum annealing runs an analog protocol, while variational algorithms use gate-based circuits.
  • Classical machine learning optimizes a model on classical hardware, and a variational algorithm optimizes a quantum circuit with classical help.

Common Misconceptions

  • Variational does not mean better. It means adaptable to noisy hardware.
  • The optimizer cannot rescue an ansatz that cannot represent the answer.
  • Passing the problem to a quantum computer does not remove the classical cost, which can dominate.

Frequently asked questions

What is a variational quantum algorithm?

A hybrid algorithm that adjusts the parameters of a short quantum circuit using a classical optimizer to minimize a cost function.

What is a barren plateau?

A region where gradients become exponentially small, making training impossible.

Do variational algorithms beat classical ones?

Not on practical problems so far, and some designs may be classically simulable.

Related Terms

Keep exploring

← Back to the dictionary