The Quantum Engineer

48. Quantum Chemistry

48.1Molecular Orbitals

The chemist's reduction: solve the electrons-in-orbitals problem. Hartree–Fock gives a mean-field approximation (a single Slater determinant — one fermionic basis state!); the correlation energy — the difference between HF and the true ground state — is exactly what quantum computers target, and what makes chemistry hard classically (it's the strongly entangled part, no coincidence). Basis sets (STO-3G minimal → cc-pVTZ accurate) trade qubits for fidelity: each basis function is a spin-orbital, each spin-orbital is one qubit after encoding. The classical pre-processing — integrals, geometry optimization — is mature software (PySCF, Psi4); your quantum program consumes its output as the hₖ coefficients of 47.2.

48.2Second Quantization

The bookkeeping formalism: a molecular state = occupation vector (n₁, n₂, …, nₘ), nᵢ ∈ {0,1} per spin-orbital (Pauli exclusion makes the bits binary — fermions are made of classical information, a lovely irony). Operators become a†ᵢaⱼ terms (hop an electron), with the Hamiltonian H = Σ hᵢⱼ a†ᵢaⱼ + Σ hᵢⱼₖₗ a†ᵢa†ⱼaₖaₗ — the h's are the classical integrals. The full electron number constraint (all valid states have Σnᵢ = N electrons) means the real Hilbert space is much smaller than 2ᵐ — classical codes exploit this with particle-number symmetries; quantum encodings are only starting to. Your H₂ experiment lives entirely inside this formalism before any qubit exists.

48.3Fermions

The algebra that mappings must preserve: {aᵢ, aⱼ†} = δᵢⱼ, {aᵢ, aⱼ} = 0 — anticommutation, the source of both the Pauli exclusion principle and the encoding headache. Why the headache: qubit operators from different sites commute (they're tensor products), so no naive "one qubit per orbital with a†ᵢ ↦ σ⁺ᵢ" assignment preserves anticommutation — the sign structure is lost. All encodings are tricks to smuggle the sign through: strings (JW), trees (BK), or parity qubits (parity mapping). The test of any mapping: the Hamiltonian's matrix elements in the qubit basis must equal the fermionic ones — a property you can and will verify numerically on H₂ (12-element matrices — hand-checkable).

48.4Jordan–Wigner Transformation

The classic mapping (1928, older than quantum computing): a†ᵢ ↦ (Σₖ<ᵢ Zₖ) · σ⁺ᵢ where σ⁺ = (X+iY)/2. The Z-string enforces the anticommutation sign — orbitals ordered along a line, each operator carrying the parity of everything before it. Consequence: local fermionic terms become non-local qubit terms; the hopping term a†ᵢaⱼ+1 gets a Z-string of length (j−i−1) — long-range chemistry terms blow up gate counts. Implementations are 20 lines; test against the exact H₂ Hamiltonian. JW's virtue: locality is transparent, sparse Hamiltonians stay sparse, and it's the baseline every other mapping is measured against. Its vice: O(m) strings on the worst terms — hence 48.5.

48.5Bravyi–Kitaev Transformation

The tree fix: store partial parities on each qubit (each qubit holds the parity of a logarithmic block of orbitals), so any string is recovered from O(log m) qubits — encoding locality replaces string locality. Cost: more two-qubit gates per local fermionic term in the generic case, but asymptotically better strings, and empirically better on real molecules for some circuit metrics. Also meet its cousins in the same family: parity mapping (dedicated parity qubits, then tapering) and the symmetry-reduction trick all modern pipelines use — freezing chemically inert core orbitals and exploiting particle-number/spin symmetries to delete qubits outright (H₂ drops from 4 qubits to 1!). Qiskit Nature implements all of this; your job is to benchmark JW vs BK vs parity on the same molecule and see the tradeoffs rather than recite them.

48.6Hamiltonian Construction

The assembly line, concretely (Qiskit Nature + PySCF): geometry → driver (PySCFDriver(atom='H 0 0 0; H 0 0 0.735', basis='sto3g')) → ElectronicStructureProblem → JordanWignerMapper() → SparsePauliOp. Output: H as Pauli strings with real coefficients — inspect them; H₂'s 15-term Hamiltonian fits on a page and is the bestRosetta stone in the field (each term interpretable: nuclear repulsion, hopping, Coulomb). Pipeline hygiene: freeze core orbitals, taper symmetries, and validate the mapped Hamiltonian classically first — compute its ground energy by exact diagonalization (n≤12) and compare to PySCF's FCI value. If the mapping is wrong, nothing downstream matters; if it's right, your chemistry is certified before any quantum hardware is involved.

48.7Variational Methods

NISQ's answer to deep circuits: don't implement e^(−iHt) or QPE — search for the ground state with a parameterized circuit (Ch. 49's VQE) whose energy you minimize classically. Variational principle: E(θ) ≥ E₀ always, so lower is better and any circuit depth gives an upper bound. This reshapes the resource story: shallow circuits, noisy-tolerant (somewhat), hardware-efficient ansätze — at the price of losing QPE's precision guarantees and meeting the barren-plateau and optimizer pathologies of Ch. 49. The honest 2025 assessment: VQE on small molecules works as demonstration, not as production chemistry; classical methods (DMRG, selected CI, coupled cluster) beat it on every benchmark that matters so far. Chapter 49 gives the mechanics; here, note the division of labor.

48.8Ground-State Estimation

The endgame comparison. Fault-tolerant path: prepare an approximate ground state (adiabatic/state prep), run QPE, get E₀ to chemical accuracy with provable guarantees — cost: 10⁹–10¹⁰ T gates, ~100–1000 logical qubits for FeMoco-class targets (2020s estimates, still falling). NISQ path: VQE with error mitigation (Ch. 31) — no proofs, ~10⁻¹–10⁻² Hartree accuracy at best, small molecules. Classical baseline: coupled cluster CCSD(T) ("gold standard") is exact-ish for weakly correlated systems and fails exactly where quantum wants to win (strong correlation, bond stretching, transition metals). The field's honest framing: quantum chemistry is the application — most-likely-first use of a fault-tolerant machine — and everything before that machine exists is infrastructure-building. You are allowed to be excited and patient at once.