Skip to content

Fermionic Basis Construction

Fermion occupation states can be stored as bitstrings, but their operator actions are not ordinary spin flips. The sign is determined by an explicitly ordered list of modes. A wrong sign can preserve Hermiticity and particle number while producing incorrect interference and spectra.

Helpful background. Fermionic Fock space explains the algebra; spin-chain bases introduces bit enumeration.

Fix

∣n0,…,nM−1⟩=(c0†)n0⋯(cM−1†)nM−1∣0⟩,s=∑j2jnj.|n_0,\ldots,n_{M-1}\rangle =(c_0^\dagger)^{n_0}\cdots(c_{M-1}^\dagger)^{n_{M-1}}|0\rangle, \qquad s=\sum_j2^jn_j.

Commuting cjc_j past occupied earlier modes gives

cj∣s⟩=nj(−1)∑k<jnk∣s−2j⟩.c_j|s\rangle =n_j(-1)^{\sum_{k<j}n_k}|s-2^j\rangle.

Creation has the same parity factor when nj=0n_j=0 and vanishes otherwise. Compute parity by popcount of ss masked below bit jj.

For a product such as ci†cjc_i^\dagger c_j, apply the rightmost operator first and update the bitstring before computing the second sign. Reusing the original parity for every factor is incorrect when occupations have changed.

def annihilate(s, j):
if not (s >> j) & 1:
return None
sign = -1 if (s & ((1 << j) - 1)).bit_count() % 2 else 1
return s ^ (1 << j), sign
def create(s, j):
if (s >> j) & 1:
return None
sign = -1 if (s & ((1 << j) - 1)).bit_count() % 2 else 1
return s ^ (1 << j), sign

These actions return transitions rather than matrices and can be reused in sparse or matrix-free assembly.

For three modes, ∣110⟩|110\rangle means occupations (n0,n1,n2)=(1,1,0)(n_0,n_1,n_2)=(1,1,0) in this notation, despite the reversed visual order of a conventional binary integer display. Then

c2†c0∣110⟩=−∣011⟩.c_2^\dagger c_0|110\rangle=-|011\rangle.

Annihilation at 0 gives ∣010⟩|010\rangle with positive sign. Creating at 2 crosses the occupied mode 1 and introduces minus one. Label occupation tuples explicitly in user-facing output to avoid ambiguity.

For spinful fermions choose either site-major ordering (0↑,0↓,1↑,…)(0\uparrow,0\downarrow,1\uparrow,\ldots) or spin-major ordering. Both are valid, but converting a many-particle state between mode orders includes fermionic permutation phases; it is not always a bare axis swap.

The NN-particle sector has dimension (MN)\binom MN. Number-conserving hopping acts within it, but cjc_j maps from the NN sector to N−1N-1. Therefore an annihilation operator represented only as a square matrix within one fixed-number sector is zero and cannot test the full anticommutation algebra.

On the full small Fock space, verify

{ci,cj}=0,{ci,cj†}=δijI.\{c_i,c_j\}=0,\qquad \{c_i,c_j^\dagger\}=\delta_{ij}I.

In restricted spaces, test the corresponding compositions through neighboring sectors. Check adjoint consistency and the vacuum action before building an interacting Hamiltonian.

More explicitly, let Cj(N):HN→HN−1C_j^{(N)}:\mathcal H_N\to\mathcal H_{N-1} be the rectangular annihilation matrix. The identity on HN\mathcal H_N is

Ci(N+1)Cj(N+1)†+Cj(N)†Ci(N)=δijIN.C_i^{(N+1)}C_j^{(N+1)\dagger} +C_j^{(N)\dagger}C_i^{(N)}=\delta_{ij}I_N.

The two products visit different intermediate particle-number sectors. At the vacuum or fully filled sector the unavailable branch is zero. This is an actionable check of both the signs and the sector index maps; multiplying square projections within HN\mathcal H_N would incorrectly give zero on the left.

Periodic hopping across the end of a mode ordering needs the same parity rule as any other hopping. Adding a guessed boundary sign on top of this rule can double-count the Jordan–Wigner string. Extra twists should represent an explicitly chosen physical flux.

For two modes and one particle, build H=−t(c0†c1+c1†c0)H=-t(c_0^\dagger c_1+c_1^\dagger c_0) and its two-particle counterpart.

Solution

In basis (∣10⟩,∣01⟩)(|10\rangle,|01\rangle) the matrix is (0−t−t0)\begin{pmatrix}0&-t\\-t&0\end{pmatrix} with energies ±t\pm t. The filled state ∣11⟩|11\rangle is annihilated by both hopping terms because the destination is occupied, giving energy zero. The latter equals the sum of the two one-particle energies, a useful noninteracting many-body check.

  • Weinberg, P., and Bukov, M., “QuSpin: a Python package for dynamics and exact diagonalisation of quantum many body systems. Part II: bosons, fermions and higher spins,” SciPost Physics 7, 020 (2019), arXiv:1804.06782 — occupation bases, signs, and conserved sectors.