VQE explained: the variational principle
Why any state’s energy is an upper bound on the ground energy, and how VQE exploits that.
8 min read · reviewed December 2026
The goal
The Hamiltonian H of a system lists the energy of every state. The ground state is the state with the lowest energy, and finding it is central to chemistry and materials science. For n qubits the matrix has 2ⁿ rows, so exact methods get expensive quickly.
The variational principle
For any normalised state |ψ⟩, the average energy ⟨ψ|H|ψ⟩ is never below the lowest energy of H. So if you try many states and keep the lowest energy, you approach the ground energy from above. The lab’s tests checked this for several models, sizes and depths: no energy ever fell below the exact value.
E(θ) = ⟨ψ(θ)| H |ψ(θ)⟩ ≥ E₀
The VQE loop
- Write H as a sum of Pauli strings such as Z⊗Z and X⊗I.
- Prepare |ψ(θ)⟩ with a parameterised circuit, the ansatz.
- Measure each Pauli term and add them up with their coefficients to get E(θ).
- Update θ to lower E, and repeat.
The two models in the lab
- Transverse-field Ising chain: H = −Σ Z·Z − h Σ X. With two qubits the lab’s test confirms the exact energy −√(1 + 4h²).
- Heisenberg chain: H = Σ (X·X + Y·Y + Δ Z·Z). With two qubits and Δ = 1 the exact energy is −3, and the four-qubit chain gives −6.4641, which equals −(3 + 2√3).
Molecules
Chemistry applications write the molecule’s electrons as qubits and the energy as a Pauli sum. This lab does not include a molecule, because the coefficients depend on the geometry and the basis set and must be taken from a chemistry package, not typed from memory. See the site’s chemistry pages for context.
Try it
Questions
Does VQE find the true ground state?
Only if the ansatz can represent it and the optimiser reaches it. Otherwise it gives an upper bound.
Why is the energy never below the exact value?
That is the variational principle: no state can have lower average energy than the ground state.
How is the energy measured on a real device?
Each Pauli term is estimated from repeated measurements in a suitable basis, so the result has shot noise.
Read next
Sources and further reading
- E. Farhi, J. Goldstone and S. Gutmann, “A Quantum Approximate Optimization Algorithm” (2014)
- A. Peruzzo et al., “A variational eigenvalue solver on a photonic quantum processor” (2014)
- A. Kandala et al., “Hardware-efficient variational quantum eigensolver for small molecules and quantum magnets” (2017)
- J. McClean et al., “Barren plateaus in quantum neural network training landscapes” (2018)
- J. Preskill, “Quantum computing in the NISQ era and beyond” (2018)
- K. Mitarai et al. (2018) and M. Schuld et al. (2019) on analytic gradients of quantum circuits
Check the original sources for exact citations.