BasQ Qiskit Fall Fest 2026 · Challenge 1 · Beginner track
The simplest molecule with a lopsided bond, from exact maths to a noisy quantum chip.
HeH⁺ is a helium atom and a proton sharing two electrons. We trace its energy as the two nuclei are pulled apart, using the variational quantum eigensolver (VQE), and check every step: exact references, a noiseless quantum simulation, a realistic noisy one, and real hardware. This page is a short visual tour; the notebook has the full story.
Visuals on the left, the exact notebook code on the right. 1 Ha (Hartree) ≈ 27.2 eV; chemical accuracy = 1.6 mHa.
Section 1
Two qubits are enough
Two electrons in two orbitals, each with a spin-up and a spin-down slot, is 4 qubits. But the number of spin-up and spin-down electrons never changes, so two qubits only ever store values we already know. We delete them.
- 27 → 9 Pauli terms to measure, same exact energy.
- H₂ goes to 1 qubit, HeH⁺ stops at 2. H₂ is symmetric (two identical atoms), which is one more symmetry to remove. HeH⁺ is not.
Section 2
Trust, but verify
Before believing any quantum number, we compared Qiskit's exact answer with an independent chemistry code (PySCF) at every distance. They agree to 10⁻¹⁵ Ha. We also caught a trap from the tutorial.
Section 3
The energy curve
Squeeze the nuclei and they repel; pull them apart and the bond breaks. The lowest point is the bond length. VQE (dots) lands exactly on the exact curve everywhere; Hartree-Fock, which ignores how electrons dodge each other, sits slightly above.
- Breaks into He + H⁺: helium holds its electrons far more tightly than hydrogen does.
- Bond energy 1.49 eV in this small basis (real value 2.04 eV).
Section 4
The real error is the basis set
STO-3G describes each atom with the bare minimum of functions. Bigger basis sets move the bond length from 0.91 Å to the true 0.774 Å. That error is about 100,000× larger than VQE's, so the quantum algorithm is not the bottleneck here.
STO-3G 0.914 Å · 6-31G 0.769 Å · 6-31G** 0.776 Å · cc-pVDZ 0.790 Å · cc-pVTZ 0.776 Å · cc-pVQZ 0.775 Å. cc-pVQZ would need 118 qubits; classically it takes seconds.
Optimisers under shot noise
On hardware every energy is a noisy estimate. Worst error from 6 noisy runs:
Section 5
Fitting it onto a real chip
On IBM's heavy-hex chips, qubits only talk to neighbours, so circuits get rewritten. The tapered circuit compiles to a handful of gates; the 4-qubit version balloons. Then we pick the physical qubits with the best calibration.
Section 6
Removing noise by adding more
Zero-noise extrapolation: run the circuit with its noise deliberately tripled and quintupled, see how the error grows, and draw the line back to zero noise.
Section 7
Ready for real hardware
The whole IBM job is built: 3 distances × 3 noise levels in one submission, 32,768 shots each. We did not get real-QPU time, so we ran the identical job on the fake device with real measurements. That adds two things the exact-average simulation hides: readout error and shot noise.
- Readout error adds ~3 mHa, and ZNE can't remove it: folding amplifies gate noise, not measurement errors. On a real device TREX readout mitigation is designed to handle that part.
- Shot noise sets the error bars (±2–6 mHa). Confirming chemical accuracy at equilibrium would need ~12× more shots.
- One command away:
RUN_HARDWARE = Truesubmits the identical job toibm_fez.
Section 8
Where the error comes from
Every error source at the equilibrium distance, side by side on a log scale. The algorithm is essentially perfect; noise and shot noise cost a few mHa each; the small basis costs more than everything else together.
Takeaways
Small molecule, honest numbers.
- Symmetry first. Removing two known qubits turned 45 two-qubit gates into 2, the difference between 121 mHa and 7.7 mHa of error.
- VQE is exact when noiseless, so the basis set, not the algorithm, limits accuracy.
- Mitigation works, partly. A good qubit choice and ZNE bring gate noise to 1.4–2.6 mHa, near chemical accuracy. Readout error (~3 mHa) needs its own fix.
- Shot noise is the next wall. At 32,768 shots one energy wobbles by ~4.5 mHa; optimising on hardware would also need noise-robust optimisers such as SPSA.