Quantum Gap AI
Back to all posts

VQE step-by-step for non-chemists: finding a molecule's ground state

June 6, 2026·10 min read

Most "intro to VQE" articles assume you remember undergraduate quantum chemistry. This one doesn't. We'll walk through what the algorithm is actually doing, why it's the canonical "first useful" quantum algorithm, and what the bond-length knob on the Quantum Gap AI VQE tool actually changes when you twist it.

The problem: what's the ground state?

Every molecule has a configuration of electrons in which its total energy is lowest. That configuration is the ground state. Almost everything chemistry cares about — bond energies, reaction rates, stability — flows from knowing it. Classical methods can solve for the ground state of small molecules to high precision; medium molecules to medium precision; and big molecules they can't solve at all, because the Hilbert space of electron arrangements grows exponentially with the number of electrons. That exponential blowup is exactly where a quantum computer has a shot.

The VQE recipe

VQE does the following loop:

  1. Encode the molecule as a Hamiltonian — a mathematical object whose lowest eigenvalue IS the ground-state energy. For chemistry, this is the second-quantised electronic Hamiltonian mapped onto qubits via Jordan-Wigner or Bravyi-Kitaev.
  2. Pick a parametrised quantum circuit — a "trial wavefunction" with knobs (angles you can rotate). The most common choice is UCCSD (Unitary Coupled-Cluster Singles and Doubles).
  3. Pick initial angles. The Hartree-Fock state is the usual starting point.
  4. Measure the Hamiltonian on the resulting state. This is the energy of the current trial wavefunction.
  5. Adjust the angles using a classical optimiser (Nelder-Mead, COBYLA, SPSA) to make the measured energy lower.
  6. Repeat until the energy stops dropping.

The final measured energy is the algorithm's estimate of the ground-state energy. The quantum computer's job is step 4 — measuring an exponentially-large Hamiltonian expectation cheaply. The optimiser is classical because it's a small-dimensional optimisation that classical algorithms handle fine.

Why this is a "hybrid" algorithm

The quantum computer doesn't solve the whole problem. It does the part classical machines struggle with (measuring a high-dimensional expectation), and the rest stays classical. This hybrid pattern is the design template for most useful quantum algorithms in the NISQ era. We wrote more about where this pattern works and doesn't: quantum + AI: potential advantage.

What the bond-length knob actually does

On the Quantum Gap AI VQE tool, when you change the bond-length parameter, you're not changing the algorithm — you're changing the molecule's geometry. Different geometry → different Hamiltonian → different ground-state energy. Sweeping bond length while running VQE at each point gives you the molecule's potential energy curve. The minimum of that curve is the equilibrium bond length; the depth of the well is the binding energy.

For H₂ specifically:

  • Bond length ~ 0.74 Å: minimum energy of about −1.137 Hartree. That's the textbook H₂ ground state.
  • Stretch to 2.0 Å: energy rises to about −1.0 Hartree.
  • Push past 3.0 Å: the molecule effectively dissociates; energy asymptotes near the sum of two individual hydrogen atoms.

Reproducing this curve on the platform takes 10 runs and ~5 minutes on the simulator (free). Doing the same on ibm_fez gives you a noisy version of the curve that still recognisably has the same shape — that's the "same conclusion, device-characteristic noise" pattern in action.

UCCSD vs other ansatzes

The choice of ansatz (trial wavefunction shape) matters. UCCSD is the chemistry-motivated choice — it includes single and double electronic excitations from the Hartree-Fock reference. It's expensive (many gates) but accurate. Hardware-efficient ansatzes (HEA) use fewer gates but lose physical interpretability and can get stuck in barren plateaus during optimisation.

For Quantum Gap AI's 24-molecule library, UCCSD is the default because it's the one that benchmarks consistently against published quantum-chemistry references. If you're doing research, you might want HEA for speed; if you're doing calibration, UCCSD is the right control.

What VQE can't do (yet)

VQE is limited by the number of qubits the hardware has and by gate fidelity. The largest molecules currently tractable on Heron at chemical accuracy are around 8-12 electrons. Bigger molecules require more qubits, deeper circuits, lower error rates — all of which is where the roadmap leads, but isn't where we are.

That said: doing VQE on a 12-electron molecule, against published references, on real hardware, with the full audit report, is something that's now operationally cheap. The whole VQE curve for any of 24 molecules is one click away.

Open the catalog on Quantum Gap AI and run VQE on H₂. Sweep the bond length. Watch the curve. It's the single best way to understand the algorithm in your hands.

Try the tools.

Simulator runs are free. Hardware runs are $5/QPU-second and never expire.

Get started free