Skip to main content
← back

Hamiltonians Explorer

The Hamiltonian defines what a quantum computer measures — while the ansatz defines how. This page explores how molecular Hamiltonians are built, compressed, and how they transform as you stretch a chemical bond.

What is a Hamiltonian?

A quantum chemistry Hamiltonian encodes a molecule's energy structure as a sum of Pauli operators. Building one is a four-stage pipeline: from atoms, through electron integrals, to qubit operators, to a circuit you can run.

PySCFJordan-WignerCompileHHRyMoleculeH₂ at R ÅIntegrals1- & 2-electronHamiltonian6 Pauli termsCircuitRy + CNOT
Think of it as a recipe. The Hamiltonian tells the quantum computer what energy to measure. Each Pauli term is an ingredient — Z terms, X terms, Y terms — and the coefficients (g0, g1, ...) are the amounts. Change the bond distance, and the recipe changes: different amounts of each ingredient produce a different dish.

Anatomy of H

The 2-qubit H Hamiltonian at R=0.735 Å has six Pauli terms. Bars grow left (negative) or right (positive). Hover a term to highlight it. This chart is linked to the bond-stretching slider below.

0I-0.3211Energy offsetZ₀+0.3979Qubit 0 occupationZ₁-0.3979Qubit 1 occupationZ₀Z₁+0.0000Qubit correlation (Z)X₀X₁+0.0905Exchange interactionY₀Y₁+0.0905Exchange interactionIdentityZ-diagonal (easy measurement)Entangling (basis rotation needed)
Measurement channels. Z terms are the easy station — just read each qubit directly in the computational basis. XX and YY require tuning the radio: you rotate into a different measurement basis (Hadamard for X, S+Hadamard for Y) before reading. Those extra gates are why entangling terms contribute more noise on real hardware.

From 4 Qubits to 2

H in the STO-3G basis has 4 spin-orbitals, giving a 4-qubit Hamiltonian via the Jordan-Wigner transform. Symmetry reduction (parity, spin, particle number) compresses it to just 2 qubits — no information lost.

1sαoccupied1sβoccupied2sα2sβ4 spin-orbitalsJordan-Wigner + Tapering±Parity↑↓Spin2Nₑq₀HF: |1⟩q₁HF: |0⟩2 qubits4x smaller
Translation + Compression. Jordan-Wigner is translation — converting from the language of electrons (creation/annihilation operators) to the language of qubits (Pauli matrices). Tapering is compression — symmetries let you zip the file smaller without losing the music. Every symmetry you exploit halves the Hilbert space. For H, three symmetries turn 16 dimensions into 2.

Stretching the Bond

Drag the slider to stretch the H bond from 0.3 to 3.0 Å. Watch how the Hamiltonian coefficients, energy landscape, and correlation energy all transform in real time. Three views, one control.

FCI: -1.1373 HaHF: -1.1170 HaCorrelation gap: 12.7 kcal/molOptimal θ: -0.1118
HHEquilibriumR = 0.73 Å

Hamiltonian Coefficients

-0.321I+0.398Z₀-0.398Z₁+0.000Z₀Z₁+0.090X₀X₁+0.090Y₀Y₁

Energy Landscape E(θ)

chemical accuracyFCIHF-π/20π/2πθ (rad)-1.0-0.50.00.5Energy (Ha)
E(θ) ideal
FCI = -1.1373 Ha
HF = -1.1170 Ha
A dial on nature. Turn the slider and watch the molecule's quantum fingerprint transform in real time. At small R, Z terms dominate (g 0.8) and the energy curve is nearly flat — easy optimization but kinetic energy amplifies Z-measurement noise. At large R, XX/YY grow (g 0.15) and the minimum shifts — harder optimization, and Hartree-Fock completely fails. The correlation energy (12.7 kcal/mol at R=0.73) is the gap HF can't see: the classical approximation misses the dance between electrons.

Beyond H

H is the simplest molecule. Bigger molecules explode in complexity. Each doubling of qubits roughly quadruples the number of Pauli terms.

H₂

Solved
Raw qubits: 4
Tapered: 2
Pauli terms: 6

HeH⁺

Solved
Raw qubits: 4
Tapered: 2
Pauli terms: 6

LiH

Challenging
Raw qubits: 12
Tapered: 4
Pauli terms: 631

H₂O

Hard
Raw qubits: 14
Tapered: 8
Pauli terms: 1,086

N₂

Frontier
Raw qubits: 20
Tapered: 10
Pauli terms: 2,951
The exponential wall. H has 6 terms on 2 qubits. N has nearly 3,000 terms on 10 qubits. Each measurement term requires separate circuit runs. Tapering isn't a nicety — it's the difference between tractable and impossible. This is why the ansatz matters so much: you need a circuit expressive enough to capture the physics, but shallow enough to survive hardware noise.

Key Terms

See the full glossary for more definitions.

Hamiltonian

The operator encoding a system’s total energy. In quantum chemistry, H = ∑ gᵢ Pᵢ where Pᵢ are Pauli strings and gᵢ are real coefficients derived from electron integrals.

Pauli Operator

One of {I, X, Y, Z} acting on a qubit. Multi-qubit Pauli strings like X₀X₁ describe correlated measurements on multiple qubits simultaneously.

Jordan-Wigner Transform

Maps fermionic creation/annihilation operators to qubit Pauli operators. Preserves anti-commutation relations at the cost of O(N) Pauli weight (long Z-strings).

Bravyi-Kitaev Transform

An alternative fermion-to-qubit mapping with O(log N) Pauli weight. More efficient than Jordan-Wigner for large systems, but the resulting terms are harder to interpret physically.

Qubit Tapering

Uses molecular symmetries (parity, spin, particle number) to eliminate qubits. Each Z₂ symmetry halves the Hilbert space. H₂ goes from 4 qubits to 2.

Full Configuration Interaction

FCI — the exact solution within a given basis set. Exponentially expensive classically. For H₂/STO-3G, FCI = -1.1373 Ha at equilibrium.

Hartree-Fock

A classical mean-field approximation that treats electrons independently. Misses correlation energy. The gap between HF and FCI is exactly what VQE must capture.

Bond Dissociation

Stretching a bond until it breaks. At large R, electrons become strongly correlated, HF fails catastrophically, and quantum advantage is most pronounced.

Spin-Orbital

A spatial orbital combined with a spin label (α or β). H₂ in STO-3G has 2 spatial orbitals × 2 spins = 4 spin-orbitals.

Expectation Value

⟨ψ|H|ψ⟩ — the average energy measured when running the circuit. VQE minimizes this over parameters θ. Each Pauli term requires separate measurement circuits.

Chemical Accuracy

1 kcal/mol (1.6 mHa) — the precision threshold needed for quantum chemistry to predict reaction outcomes. Our best hardware result is 4.1 kcal/mol on Tuna-9.

Correlation Energy

E_FCI - E_HF: the energy that mean-field theory misses. Grows dramatically during bond dissociation. For H₂ at R=3.0Å, it reaches 174 kcal/mol.

References

Quantum Chemistry

[C1]

S. McArdle, S. Endo, A. Aspuru-Guzik, S.C. Benjamin, X. Yuan, “Quantum computational chemistry,” Rev. Mod. Phys. 92, 015003 (2020).

arXiv:1808.10402 ↗
[C2]

A. Szabo & N.S. Ostlund, Modern Quantum Chemistry: Introduction to Advanced Electronic Structure Theory, Dover (1996).

[C3]

S. Bravyi, J.M. Gambetta, A. Mezzacapo, K. Temme, “Tapering off qubits to simulate fermionic Hamiltonians,” arXiv:1701.08213 (2017).

arXiv:1701.08213 ↗

Our Replications

[R1]

Sagastizabal 2019H₂ VQE with symmetry verification. 6.2 kcal/mol on Tuna-9 (3/4 claims pass)

View replication →
[R2]

Peruzzo 2014HeH⁺ VQE bond sweep (first VQE paper). Emulator PASS, IBM 91 kcal/mol (3/5 pass)

View replication →
[R3]

Kandala 2017H₂ PES with hardware-efficient ansatz. 10/10 chemical accuracy on emulator (3/3 pass)

View replication →

Explore More

About Molecular Hamiltonians

To simulate a molecule on a quantum computer, its Hamiltonian (energy operator) must be decomposed into a sum of Pauli operators — tensor products of I, X, Y, and Z matrices. Each Pauli term can then be measured on quantum hardware, and their weighted sum gives the total energy.

For hydrogen (H₂), the Hamiltonian has 5 Pauli terms whose coefficients change as the bond stretches. At equilibrium (0.735 Å), the molecule sits at the bottom of its potential energy surface. Stretching the bond raises the energy until the atoms dissociate. The full configuration interaction (FCI) energy is the exact answer; Hartree-Fock is the best classical single-determinant approximation.

This interactive shows how the Pauli decomposition coefficients evolve with bond distance, and how VQE results from real quantum hardware compare to the exact energy curve.