Skip to content

Spin Chain Basis Construction

A spin-chain basis converts local spin operators into transitions between integer-labeled configurations. Explicit bit conventions eliminate factor-of-two and site-order errors before diagonalization. The numerical basis construction here supports sparse Hamiltonian assembly and exact diagonalization.

For LL spin-1/21/2 sites, let bit bj=1b_j=1 mean spin up and bj=0b_j=0 mean spin down, with integer label s=∑j2jbjs=\sum_j2^jb_j. Site 0 is the least significant bit. Use dimensionless operators Sα=σα/2S^\alpha=\sigma^\alpha/2; physical angular momentum is ℏSα\hbar S^\alpha.

Then

Sjz∣s⟩=(bj−12)∣s⟩,Sj+∣s⟩={∣s+2j⟩,bj=0,0,bj=1.S_j^z|s\rangle=(b_j-\tfrac12)|s\rangle, \qquad S_j^+|s\rangle= \begin{cases}|s+2^j\rangle,&b_j=0,\\0,&b_j=1.\end{cases}

The lowering operator reverses that transition. No fermionic sign accompanies a spin flip on a different site. This distinction matters when comparing to Jordan–Wigner transformed fermions.

In ascending local bit order (∣↓⟩,∣↑⟩)(|\downarrow\rangle,|\uparrow\rangle), the actual stored matrices are

Sz=12(−1001),S+=(0010),Sy=12(0i−i0).S^z=\frac12\begin{pmatrix}-1&0\\0&1\end{pmatrix},\qquad S^+=\begin{pmatrix}0&0\\1&0\end{pmatrix},\qquad S^y=\frac12\begin{pmatrix}0&i\\-i&0\end{pmatrix}.

They obey [Sx,Sy]=iSz[S^x,S^y]=iS^z with Sx=(S++S−)/2S^x=(S^++S^-)/2. Importing the usual displayed Pauli matrices in the opposite (∣↑⟩,∣↓⟩)(|\uparrow\rangle,|\downarrow\rangle) order without changing basis reverses the stored yy and zz components. To compare bit transitions with Kronecker matrices, order tensor factors from site L−1L-1 down to site 0 so the last factor is the least significant bit. Check a complex SyS^y action as well as a real exchange spectrum.

The full dimension is 2L2^L. If total magnetization is conserved, enumerate only states with a fixed popcount N↑N_\uparrow, giving dimension (LN↑)\binom{L}{N_\uparrow} and Stotz=N↑−L/2S^z_{\rm tot}=N_\uparrow-L/2.

For one bond,

Hij=J[SizSjz+12(Si+Sj−+Si−Sj+)].H_{ij}=J\left[ S_i^zS_j^z+\frac12(S_i^+S_j^-+S_i^-S_j^+) \right].

Its diagonal contribution is J(bi−1/2)(bj−1/2)J(b_i-1/2)(b_j-1/2). If the two bits differ, flip both with exclusive-or and add matrix element J/2J/2. If they agree, there is no off-diagonal transition. This rule gives a sparse matrix directly without global Kronecker products.

Use a dictionary or combinatorial rank map from allowed bitstrings to row indices. The integer label ss is not generally the row number in a symmetry-restricted basis.

For a single bond and Stotz=0S^z_{\rm tot}=0, in basis (∣↑↓⟩,∣↓↑⟩)(|\uparrow\downarrow\rangle,|\downarrow\uparrow\rangle),

H=J(−1/41/21/2−1/4).H=J\begin{pmatrix}-1/4&1/2\\1/2&-1/4\end{pmatrix}.

Its eigenvalues are −3J/4-3J/4 for the singlet and J/4J/4 for the symmetric triplet state. The fully polarized sectors also have energy J/4J/4. Recombining the sectors reproduces the triplet degeneracy.

This test diagnoses use of Pauli matrices where spin matrices were intended: that error multiplies all exchange energies by four. A spectrum alone is not enough if the same wrong convention was used to compute the reference.

Store the bond list separately from the basis. An open chain contains (0,1),…,(L−2,L−1)(0,1),\ldots,(L-2,L-1). A periodic chain adds (L−1,0)(L-1,0), but for very small LL the intended graph must be specified: blindly wrapping L=2L=2 can count the only pair twice.

Check basis uniqueness, sector dimension, Hermiticity, and invariance of the chosen sector. A transverse field ∑jhxSjx\sum_j h_xS_j^x changes magnetization, so a fixed-N↑N_\uparrow basis is not closed. Projecting it into that basis silently discards the field rather than approximating its dynamics.

For higher spin, use digits mj=−S,…,Sm_j=-S,\ldots,S and ladder coefficients S(S+1)−mj(mj±1)\sqrt{S(S+1)-m_j(m_j\pm1)}. Binary flip rules do not generalize unchanged.

Construct the one-up-spin sector of a periodic exchange chain and determine the hopping amplitude of the up spin.

Solution

The basis has LL states labeled by the up-spin position. Each antiparallel bond moves the up spin to a neighbor with amplitude J/2J/2. For L≥3L\geq3 with each undirected bond counted once, two bonds are antiparallel, giving diagonal energy J(L−4)/4J(L-4)/4. Plane waves then have energy J(L−4)/4+Jcos⁡kJ(L-4)/4+J\cos k. This checks the bond list and momentum convention.

  • Weinberg, P., and Bukov, M., “QuSpin: a Python package for dynamics and exact diagonalisation of quantum many body systems. Part I: spin chains,” SciPost Physics 2, 003 (2017), arXiv:1610.03042 — basis construction and symmetry-resolved examples.