Variational quantum eigensolver

Also known as: VQE

On this page 7

The variational quantum eigensolver (VQE) is a hybrid quantum-classical algorithm that estimates the lowest eigenvalue of a Hamiltonian, typically the ground-state energy of a molecule or material. A quantum processor prepares a trial state with a parameterized circuit, measures its energy, and a classical optimizer adjusts the parameters to drive that energy down.

Among quantum algorithms, VQE is the best-known member of the variational quantum algorithm family and was designed for noisy intermediate-scale hardware in quantum computing. It trades the long, coherent circuits of quantum phase estimation for short circuits repeated many times, which makes it feasible on today’s devices but also introduces serious practical limits.

How VQE finds a ground-state energy

VQE rests on the Rayleigh–Ritz variational principle: for any normalized trial state |ψ(θ)⟩, the expectation value ⟨ψ(θ)|H|ψ(θ)⟩ is never lower than the true ground-state energy. Minimizing this expectation over the parameters θ therefore yields an upper bound that approaches the ground-state energy as the trial state improves.

The algorithm runs as a loop. The Hamiltonian is first written as a weighted sum of Pauli strings, for example through the Jordan–Wigner or Bravyi–Kitaev mapping of fermionic operators to qubits. The quantum processor estimates each term by repeated measurement, and the classical computer combines the terms into an energy and proposes new parameters.

StepWhere it runsWhat happens
State preparationQuantum processorThe ansatz circuit U(θ) prepares the trial state
MeasurementQuantum processorPauli terms are measured over many shots
Energy estimateClassical computerWeighted term averages are summed
Parameter updateClassical computerAn optimizer proposes new values of θ
Convergence testClassical computerThe loop stops when energy changes become small
The steps of one VQE iteration

Choosing the ansatz

The ansatz is the parameterized circuit that defines which states VQE can reach. A good ansatz must be expressive enough to contain a state close to the true ground state, yet shallow enough to run before noise destroys the result. This tension is the central design problem of the algorithm.

The table compares the main ansatz families used in practice.

AnsatzOriginStrengthWeakness
UCCSDChemistry (coupled cluster)Physically motivated, preserves particle numberDeep circuits, many CNOT gates
Hardware-efficientNative device gatesShallow and easy to runProne to barren plateaus
ADAPT-VQEOperators added one by oneCompact circuits tailored to the problemMany extra measurement rounds
Symmetry-preservingConserved quantitiesAvoids unphysical statesHarder to design for each system
Common ansatz families for VQE

The initial state also matters. Chemistry applications usually start from the Hartree–Fock state, which is easy to prepare and often captures most of the energy, so the circuit only needs to add the correlation energy.

Measurement cost and classical optimization

VQE replaces circuit depth with sampling. Each energy estimate has statistical error that shrinks only as one over the square root of the number of shots, so reaching chemical accuracy of about 1.6 millihartree can require millions to billions of measurements for molecules of modest size.

Practitioners reduce this cost by grouping commuting Pauli terms so they can be measured together, by classical shadow techniques, and by allocating more shots to terms with large coefficients. The optimizer choice is equally important, because energy estimates are noisy.

OptimizerTypeBehavior under shot noise
COBYLAGradient-freeRobust for few parameters, slow for many
SPSAStochastic gradient approximationTwo evaluations per step regardless of size
Parameter-shift gradientExact analytic gradientAccurate but costs two circuits per parameter
Adam and variantsFirst-order gradient methodWorks well when gradients are reliable
Classical optimizers often paired with VQE

VQE occupies a different point in the accuracy-versus-hardware trade-off than its neighbors in the field of quantum algorithms. The comparison below highlights where each approach fits.

ApproachCircuit depthAccuracy guaranteeHardware target
VQEShallow, repeatedVariational upper bound onlyNoisy devices
Quantum phase estimationDeep and coherentPrecision set by ancilla bitsFault-tolerant machines
QAOAShallow, layeredApproximation ratio, problem dependentNoisy devices
Quantum annealingAnalog evolutionDepends on gap and scheduleSpecial annealing hardware
VQE compared with related approaches

QAOA can be viewed as a VQE variant with a fixed ansatz built from a cost and a mixer Hamiltonian, aimed at combinatorial optimization rather than chemistry. Quantum phase estimation remains the long-term method of choice for high-precision energies once error-corrected hardware exists.

The two methods can also work together. A VQE result can serve as a high-overlap initial state for phase estimation, because the success probability of phase estimation depends on how strongly the input state overlaps with the true ground state. Extensions such as variational quantum deflation and subspace-search VQE further adapt the same loop to compute excited-state energies.

Limitations and open problems

VQE has shown clear demonstrations on small molecules, yet no convincing quantum advantage over classical chemistry methods has been established. Several obstacles explain why.

  • Barren plateaus: for deep or random ansatzes, gradients vanish exponentially with qubit count, leaving the optimizer without direction.
  • Measurement overhead: the number of shots can grow faster than classical methods scale for the same accuracy.
  • Hardware noise: gate errors bias the energy, so results usually need error mitigation such as zero-noise extrapolation.
  • Local minima: the energy landscape is non-convex, and the optimizer can stall far from the ground state.
  • Classical competition: methods such as coupled cluster and DMRG already handle many target systems accurately.

The variational bound also has a weakness: a low energy does not prove that the prepared state is close to the true ground state, so results should be checked against known reference values whenever possible.

The idea in brief

Nature prefers low energy, and the lowest energy of a molecule decides much of how it behaves. VQE searches for that lowest energy by guessing and improving. A quantum chip builds a candidate arrangement of the electrons and measures its energy. An ordinary computer then turns the knobs of the circuit a little and asks for a new measurement.

It works like tuning an old radio by ear: each small turn either reduces or increases the noise, and you keep the turns that help. The answer can only approach the true value from above, so a lower result is always a better one.

A practical scenario

A university chemistry group wants the energy curve of the lithium hydride molecule as the bond is stretched. Using a frozen-core approximation and qubit tapering, the problem shrinks to about six qubits. The group runs VQE on a superconducting processor with a compact ADAPT-style ansatz, starting from the Hartree–Fock state.

Each energy point uses roughly 100,000 shots per measurement group and about 60 optimizer iterations with SPSA. Raw results sit several millihartree above the exact values because of gate noise, but after zero-noise extrapolation most points fall within chemical accuracy. The group publishes the curve as a hardware benchmark, while noting that a laptop computes the same molecule exactly in seconds.