VQE H2 Ground State — Peruzzo et al. 2014
- First-ever experimental VQE on a photonic quantum processor
- Finds the ground-state energy of molecular hydrogen (H2)
- Reproduces the dissociation curve from Figure 3 of the original paper
- Demonstrates the hybrid classical-quantum optimization paradigm that underpins all modern variational quantum algorithms
| Property | Value |
|---|---|
| Level | Advanced |
| Estimated Time | 60-90 minutes |
| Qubits | 2 |
| Framework | Qiskit |
| Category | Research Reproduction |
| Gates | X, RY, CX |
| Circuit Depth | 3 |
Prerequisites
Before tackling this circuit, you should be comfortable with:
- VQE fundamentals: Complete the H2 Ground State (intermediate VQE) circuit first
- Quantum chemistry basics: Hamiltonian mapping, Jordan-Wigner transformation, basis sets
- Variational algorithms: Cost function landscapes, parameter optimization, barren plateaus
- Linear algebra: Pauli operators, expectation values, tensor products
The Idea
In 2014, Alberto Peruzzo and collaborators at the University of Bristol demonstrated that a quantum computer could solve a real chemistry problem — finding the ground-state energy of the hydrogen molecule. This was not just a toy demonstration; it introduced the Variational Quantum Eigensolver (VQE), an algorithm specifically designed for the noisy, limited quantum hardware available today.
The key insight was elegantly simple: instead of requiring deep quantum circuits that would accumulate too many errors, use a shallow parameterized circuit and let a classical optimizer tune the parameters. The quantum processor only needs to prepare trial states and measure energies — the hard optimization work happens classically. This hybrid approach sidesteps the coherence-time limitations that make fault-tolerant algorithms impractical on near-term devices.
The original experiment used a custom silicon photonic chip with two photonic qubits, encoding quantum information in the path degree of freedom of single photons. Phase shifters controlled rotations, and a directional coupler provided the entangling interaction. Despite operating with just two qubits and a three-gate circuit, the experiment achieved chemical accuracy — an error of less than 1.6 milliHartree (1 kcal/mol), the threshold required for useful chemical predictions.
How It Works
The reproduction follows the same four-step VQE protocol as the original paper:
-
Map the molecule to qubits: The H2 electronic Hamiltonian in the minimal STO-3G basis is transformed to a 2-qubit Pauli operator using the Jordan-Wigner encoding. This yields five terms: II, IZ, ZI, ZZ, and XX+YY.
-
Prepare a trial state: The UCCSD (Unitary Coupled-Cluster Singles and Doubles) ansatz creates a parameterized quantum state. For H2 in minimal basis, the entire ansatz reduces to a single parameter theta:
- Start with the Hartree-Fock reference state |01> (X gate on qubit 0)
- Apply RY(theta) on qubit 1 to create a superposition
- Entangle with a CNOT gate
CODE+---+ q_0: | X |──────────X─── +---+ +-------+| q_1: ─────-| RY(θ) |X─── +-------+ -
Measure the energy: Evaluate the expectation value <psi(theta)|H|psi(theta)> by measuring each Pauli term of the Hamiltonian. In simulation, this is done via exact statevector computation; on hardware, it requires multiple measurement bases.
-
Optimize classically: Sweep theta across [-pi, pi] to find the angle that minimizes the energy. The original paper used a Nelder-Mead simplex optimizer; this reproduction uses a grid search for transparency and reproducibility.
The full dissociation curve is obtained by repeating this process at multiple bond lengths (0.3 to 3.0 angstrom), computing the Hamiltonian coefficients at each geometry.
The Math
The H2 molecular Hamiltonian in second quantization, after Jordan-Wigner transformation to the minimal 2-qubit space, takes the form:
H = g_0 * I + g_1 * Z_0 + g_2 * Z_1 + g_3 * Z_0 Z_1 + g_4 * (X_0 X_1 + Y_0 Y_1)
At equilibrium bond length R = 0.74 angstrom (STO-3G basis):
| Coefficient | Value (Ha) | Physical meaning |
|---|---|---|
| g_0 | -1.0523 | Nuclear repulsion + constant electronic energy |
| g_1 | +0.3979 | Orbital energy (qubit 0) |
| g_2 | -0.3979 | Orbital energy (qubit 1) |
| g_3 | -0.0112 | Electron-electron correlation (ZZ) |
| g_4 | +0.1809 | Exchange interaction (XX + YY) |
The UCCSD ansatz prepares the state:
|psi(theta)> = cos(theta/2) |01> + sin(theta/2) |10>
The energy as a function of theta is:
CODEE(theta) = g_0 + g_1 * cos(theta) - g_2 * cos(theta) + g_3 * cos(theta)^2 + 2 * g_4 * sin(theta)
Minimizing E(theta) yields the ground-state energy. The variational principle guarantees E(theta_opt) >= E_exact, with equality when the ansatz is expressive enough (which it is for this 2-qubit system).
Expected Output
Dissociation Curve
| Bond Length (angstrom) | VQE Energy (Ha) | Exact FCI (Ha) | Error (mHa) |
|---|---|---|---|
| 0.30 | ~-0.20 | -0.23 | ~30 |
| 0.50 | ~-0.91 | -0.95 | ~40 |
| 0.74 | ~-1.137 | -1.1373 | <1.6 |
| 1.00 | ~-1.07 | -1.101 | ~30 |
| 1.50 | ~-0.98 | -1.015 | ~35 |
| 2.00 | ~-0.95 | -0.978 | ~28 |
Key Metrics
- Equilibrium energy: -1.1373 Ha (exact FCI in STO-3G)
- Chemical accuracy: Error < 1.6 mHa at equilibrium (1 kcal/mol)
- Optimal theta: ~3.14 radians at equilibrium geometry
- Verification: 4 automated checks (chemical accuracy, variational bound, dissociation shape, parameter physicality)
Note: Errors are larger away from equilibrium because the Hamiltonian coefficients use a simplified 1/R scaling approximation. At equilibrium, the exact Jordan-Wigner coefficients are used, matching the paper.
Running the Circuit
Quick Start
PYTHONfrom circuit import run_circuit # Reproduce the full dissociation curve (Figure 3) result = run_circuit( bond_lengths=[0.3, 0.5, 0.74, 1.0, 1.5, 2.0, 2.5, 3.0], n_steps=50 ) # Print results for r, data in result["bond_length_scan"].items(): print(f"R = {r:.2f} angstrom: E = {data['energy']:.6f} Ha") print(f"\nChemical accuracy: {result['chemical_accuracy']}")
Run Verification
PYTHONfrom circuit import run_circuit result = run_circuit(n_steps=50) verification = result["verification"] print(verification["summary"]) for name, check in verification["checks"].items(): status = "PASS" if check["passed"] else "FAIL" print(f" [{status}] {name}: {check['detail']}")
From the Command Line
BASHcd circuits/advanced/research_reproductions/vqe_h2_peruzzo/ python circuit.py
On QubitHub
BASHqubithub execute qubithub/vqe-h2-peruzzo
Try It Yourself
-
Increase grid resolution: Change
n_stepsfrom 30 to 200 and observe how the energy converges more precisely to the exact value. Plot E(theta) to visualize the energy landscape — it should have a single clear minimum. -
Compare basis sets: The STO-3G minimal basis used here is the simplest possible. Research how the Hamiltonian coefficients change with larger basis sets (6-31G, cc-pVDZ) and how many more qubits would be needed.
-
Add shot noise: The current implementation uses exact statevector simulation. Modify
compute_expectation()to use finite shots (e.g., 1024, 4096, 8192) and observe how statistical noise affects the energy estimate and chemical accuracy. -
Implement a real optimizer: Replace the grid search with
scipy.optimize.minimizeusing Nelder-Mead (as in the original paper) or COBYLA. Compare the number of circuit evaluations needed vs. the grid search approach. -
Extend to LiH or HeH+: Molecular hydrogen is the simplest case. Research how VQE scales to 4-qubit molecules like lithium hydride (LiH) — what changes in the ansatz, Hamiltonian, and classical optimization?
What's Next
After mastering this reproduction, explore these related circuits:
- LiH Ground State — Extend VQE to a 4-qubit molecular system
- QAOA MaxCut (Farhi 2014) — Another landmark variational algorithm paper
- Hardware-Efficient Ansatz — Modern ansatz designs that go beyond UCCSD
Applications
The VQE algorithm introduced in this paper has become foundational across quantum computing:
- Drug discovery: Simulating molecular interactions for pharmaceutical design (estimating binding energies, reaction barriers)
- Materials science: Predicting properties of novel materials (band gaps, magnetic ordering, superconductivity)
- Catalyst design: Optimizing catalytic reaction pathways by computing transition state energies
- Quantum chemistry benchmarking: VQE serves as the standard benchmark for comparing quantum hardware capabilities
- Algorithm development: The hybrid classical-quantum paradigm inspired QAOA, VQC, quantum kernel methods, and the entire field of variational quantum algorithms
References
-
Peruzzo, A. et al. "A variational eigenvalue solver on a photonic quantum processor." Nature Communications 5, 4213 (2014). DOI: 10.1038/ncomms5213 | arXiv: 1304.3061
-
McClean, J. R. et al. "The theory of variational hybrid quantum-classical algorithms." New Journal of Physics 18, 023023 (2016). DOI: 10.1088/1367-2630/18/2/023023 | arXiv: 1509.04279
-
O'Malley, P. J. J. et al. "Scalable quantum simulation of molecular energies on a superconducting qubit processor." Physical Review X 6, 031007 (2016). DOI: 10.1103/PhysRevX.6.031007 | arXiv: 1512.06860
-
Tilly, J. et al. "The Variational Quantum Eigensolver: a review of methods and best practices." Physics Reports 986, 1-128 (2022). DOI: 10.1016/j.physrep.2022.08.003 | arXiv: 2111.05176