FockMap

From Molecules to Qubits

A complete, step-by-step guide to fermion-to-qubit encoding for quantum chemistry simulation.

This tutorial walks through the entire pipeline from a molecular Schrödinger equation to a qubit Hamiltonian, using the hydrogen molecule (H₂) as a running example. Every integral, every sign, every coefficient is computed explicitly.

Prerequisites: Linear algebra, introductory quantum mechanics (wavefunctions, the hydrogen atom), and basic chemistry (orbitals, bonds). No prior knowledge of second quantization, Fock space, or quantum computing is assumed — but we provide pointers to our Theory pages for those topics.

The Pipeline

Molecule → Basis Set → Integrals → Second Quantization → Spin-Orbitals → Encoding → Qubit Hamiltonian

Each stage involves notation choices, sign conventions, and index manipulations that the research literature compresses into a few lines. This tutorial makes every step explicit.

Representation Map (What Object Are We Using?)

One common source of confusion is switching between representations without saying so. Here is the object type at each stage:

Stage Object you work with Typical form
Molecular model Orbital basis + geometry STO-3G, bond length, spin-orbital indexing
Electronic structure data Integral tables $h_{pq}$ and $\langle pq \mid rs\rangle$
Fermionic Hamiltonian Ladder-operator expression $\sum h_{pq}a_p^\dagger a_q + \frac{1}{2}\sum \langle pq \mid rs\rangle a_p^\dagger a_q^\dagger a_s a_r$
Encoded Hamiltonian Symbolic Pauli sum $\sum_\alpha c_\alpha P_\alpha$
Verification only Dense/sparse matrix $2^n \times 2^n$ matrix diagonalisation

Practical rule of thumb: stay in the symbolic Pauli-sum form for construction and simplification, and switch to a matrix only when you explicitly want eigenvalues/eigenvectors.

Chapters

# Chapter What you’ll learn
1 The Electronic Structure Problem Born–Oppenheimer, basis sets, and why H₂ has exactly 6 configurations
2 The Notation Minefield Chemist’s vs. physicist’s integrals — and the errors they cause
3 From Spatial to Spin-Orbital Integrals Doubling the index space, cross-spin terms, and a complete integral table
4 Building the H₂ Qubit Hamiltonian The 15-term Jordan–Wigner Hamiltonian, term by term
5 Checking Our Answer Exact diagonalisation, eigenspectrum, and cross-encoding comparison
6 What Comes Next VQE, QPE, and why encoding choice matters at scale

Background References

The theory behind each stage is covered in our Background pages:

Companion Code

Every numerical result in this tutorial is reproduced by the FockMap library. See the interactive tutorials:

PDF Version

A TeX-typeset version of this tutorial is available as a preprint (PDF) suitable for printing and citation.