|q⟩ Bad Qubits

advanced · Programming · Quantum Chemistry on Quantum Computers

Second Quantization

Writing the electronic Hamiltonian directly in terms of electron positions forces us to drag the antisymmetry of the wavefunction around by hand: swapping any two electrons must flip the sign of Ψ\Psi. Second quantization builds that antisymmetry into the operators themselves, giving a notation in which the Hamiltonian becomes a compact sum over orbitals — and, crucially, a form ready to be mapped onto qubits.

Occupation-number states

Fix a finite basis of nn spin-orbitals {ϕ0,ϕ1,,ϕn1}\{\phi_0, \phi_1, \dots, \phi_{n-1}\} (each spatial orbital splits into a spin-up and a spin-down spin-orbital). Instead of tracking which electron sits in which orbital, we track only how many electrons occupy each orbital. Because electrons are fermions, each spin-orbital holds at most one (the Pauli exclusion principle), so an occupation number is either 0 or 1. A many-electron state is a string of occupation numbers:

n0n1nn1,np{0,1}.|n_0\, n_1\, \cdots\, n_{n-1}\rangle, \qquad n_p \in \{0, 1\}.

This is already strikingly qubit-like: nn spin-orbitals give 2n2^n occupation strings, exactly the dimension of an nn-qubit register. That correspondence is what we exploit in the next lessons.

Creation and annihilation operators

For each spin-orbital pp define a creation operator apa_p^\dagger that adds an electron and an annihilation operator apa_p that removes one:

ap0p=(1)σp1p,ap1p=(1)σp0p,a_p^\dagger |\cdots 0_p \cdots\rangle = (-1)^{\sigma_p}\,|\cdots 1_p \cdots\rangle, \qquad a_p |\cdots 1_p \cdots\rangle = (-1)^{\sigma_p}\,|\cdots 0_p \cdots\rangle,

and they annihilate the state (0\to 0) if the orbital is already occupied (for apa_p^\dagger) or already empty (for apa_p). The sign (1)σp(-1)^{\sigma_p}, with σp=q<pnq\sigma_p = \sum_{q<p} n_q counting the electrons in earlier orbitals, is the fermionic phase that enforces antisymmetry.

The anticommutation relations

The defining algebra of fermionic operators is the set of canonical anticommutation relations. Using {A,B}=AB+BA\{A, B\} = AB + BA:

{ap,aq}=δpq,{ap,aq}=0,{ap,aq}=0.\{a_p, a_q^\dagger\} = \delta_{pq}, \qquad \{a_p, a_q\} = 0, \qquad \{a_p^\dagger, a_q^\dagger\} = 0.

The last two relations encode antisymmetry: setting p=qp = q gives apap=0a_p^\dagger a_p^\dagger = 0, which is the Pauli exclusion principle (you cannot create two electrons in the same spin-orbital). The operator n^p=apap\hat{n}_p = a_p^\dagger a_p is the number operator; it returns the occupation np{0,1}n_p \in \{0,1\} of orbital pp.

The Hamiltonian in second quantization

Projecting the electronic Hamiltonian onto the chosen orbital basis turns the differential operator into a sum of one-body and two-body terms with numerical coefficients:

H^=p,qhpqapaq+12p,q,r,shpqrsapaqaras.\hat{H} = \sum_{p,q} h_{pq}\, a_p^\dagger a_q + \frac{1}{2} \sum_{p,q,r,s} h_{pqrs}\, a_p^\dagger a_q^\dagger a_r a_s.

The coefficients are molecular integrals computed once on a classical computer from the chosen basis set and nuclear geometry:

hpq=ϕp(x)(122AZArRA)ϕq(x)dx,h_{pq} = \int \phi_p^*(\mathbf{x})\left(-\tfrac{1}{2}\nabla^2 - \sum_A \tfrac{Z_A}{|\mathbf{r}-\mathbf{R}_A|}\right)\phi_q(\mathbf{x})\, d\mathbf{x}, hpqrs=ϕp(x1)ϕq(x2)ϕr(x2)ϕs(x1)r1r2dx1dx2.h_{pqrs} = \int \frac{\phi_p^*(\mathbf{x}_1)\phi_q^*(\mathbf{x}_2)\phi_r(\mathbf{x}_2)\phi_s(\mathbf{x}_1)}{|\mathbf{r}_1 - \mathbf{r}_2|}\, d\mathbf{x}_1\, d\mathbf{x}_2.

The one-body integrals hpqh_{pq} capture kinetic energy and electron–nucleus attraction; the two-body integrals hpqrsh_{pqrs} capture electron–electron repulsion. Tools such as PySCF or Psi4 produce them; on a quantum computer we treat them as known constants.

Why this is the right starting point

Three features make second quantization the launch pad for quantum simulation:

  1. Fixed operator count. The Hamiltonian has at most O(n4)O(n^4) terms regardless of how many electrons are present, because antisymmetry is handled by the operators, not by enumerating configurations.
  2. Qubit-shaped states. Occupation strings map one-to-one onto computational basis states of an nn-qubit register.
  3. Algebraic, not analytic. Everything reduces to the anticommutation relations and a table of integrals — no wavefunction calculus survives into the quantum circuit.

In the next lesson we make the qubit correspondence precise with the Jordan–Wigner transform, which turns apa_p^\dagger and apa_p into concrete Pauli operators your simulator can run.

Sign in on the full site to ask questions and join the discussion.