Molecular Hamiltonians as Paulis
We can finally assemble the object a quantum computer actually consumes: a qubit Hamiltonian, a weighted sum of Pauli strings. We build it for the simplest interesting molecule, molecular hydrogen , in the minimal STO-3G basis.
From integrals to Pauli strings
The recipe chains together everything from this module:
- Pick a geometry and basis set; a classical package computes the molecular integrals and .
- Assemble the second-quantized Hamiltonian .
- Apply Jordan–Wigner (or Bravyi–Kitaev): each , becomes a Pauli operator, and products of them expand into Pauli strings.
- Collect like terms. The result is
For in STO-3G there are 4 spin-orbitals, so the raw Jordan–Wigner Hamiltonian acts on 4 qubits and has 15 Pauli terms.
Reducing to two qubits
The 4-qubit Hamiltonian has symmetries — conservation of total electron number and of spin — that let us taper away two qubits. After this reduction the equilibrium Hamiltonian collapses to a compact two-qubit operator (coefficients in Hartree, after O'Malley et al. 2016):
The diagonal terms set the energies of the basis states; the off-diagonal and terms mix and , which is what lets the true ground state be a superposition rather than a single Hartree–Fock configuration.
Reading off basis-state energies
For any computational basis state the off-diagonal terms vanish, and each contributes its eigenvalue: when the qubit is , when it is . So the diagonal energy of a basis state is
The Hartree–Fock state for in this encoding is (one electron pair in the bonding orbital). Its diagonal energy is the Hartree–Fock energy — a good starting estimate, but above the true ground state because it ignores the mixing from and .
Try it
Using the two-qubit Hamiltonian above, compute the energy of the Hartree–Fock state . Only the diagonal , , , terms contribute; the and terms have zero diagonal matrix element. Return the energy as a number.
This Hartree–Fock energy is the baseline that VQE will lower toward the true ground state.
Sign in on the full site to ask questions and join the discussion.