Exact Diagonalization
What It Is
Exact diagonalization (ED) constructs the full many-body Hamiltonian matrix in the computational basis and computes its eigenvalues (and optionally eigenvectors) using dense linear algebra. For a spin-1/2 system of $N$ sites, the Hilbert space has dimension $2^N$ and the Hamiltonian is a $2^N \times 2^N$ Hermitian matrix.
ED provides numerically exact results (up to floating-point precision) for any Hamiltonian, without approximation. It serves as the primary independent check for analytical solutions in QAtlas.
When to Use It
| Condition | Requirement |
|---|---|
| System size | $N \leq 16$ for spin-1/2 (practical memory limit $\sim 32$ GB) |
| Hamiltonian type | Any –- no restriction on interactions or geometry |
| Boundary conditions | Any (OBC, PBC) –- encoded in the bond list |
| Observables needed | Ground state, full spectrum, entanglement entropy |
Scaling: Memory $\sim 2^{2N} \times 8$ bytes (dense Float64). Time $\sim O(2^{3N})$ for full diagonalization (eigvals), or $O(2^{2N})$ for eigenvalues only (eigvals(Symmetric(H))).
| $N$ | Matrix size | Memory |
|---|---|---|
| 10 | $1024 \times 1024$ | 8 MB |
| 12 | $4096 \times 4096$ | 128 MB |
| 14 | $16384 \times 16384$ | 2 GB |
| 16 | $65536 \times 65536$ | 32 GB |
BLAS multi-threading (BLAS.set_num_threads(n)) provides near-linear speedup for the diagonalization step.
Hamiltonian Construction Utilities
QAtlas provides helper functions for building common Hamiltonians from a bond list (typically generated by Lattice2D.bonds()):
embed_two_site(op, i, j, N)
Embeds a two-site operator op (a $4 \times 4$ matrix acting on sites $i$ and $j$) into the full $2^N$-dimensional Hilbert space via tensor products with identity matrices.
embed_single_site(op, i, N)
Embeds a single-site operator op (a $2 \times 2$ matrix acting on site $i$) into the full Hilbert space.
build_spinhalf_heisenberg(bonds, N; J=1.0)
Builds the spin-1/2 Heisenberg Hamiltonian
\[H = J \sum_{\langle i,j \rangle} \mathbf{S}_i \cdot \mathbf{S}_j = J \sum_{\langle i,j \rangle} \left(\frac{1}{2}(S_i^+ S_j^- + S_i^- S_j^+) + S_i^z S_j^z\right)\]
from a bond list. Works for any lattice geometry.
build_tfim(bonds, N; J=1.0, h=1.0)
Builds the transverse-field Ising model Hamiltonian
\[H = -J \sum_{\langle i,j \rangle} \sigma_i^z \sigma_j^z - h \sum_i \sigma_i^x\]
from a bond list. Returns a real symmetric matrix.
Role in QAtlas Verification
ED serves as Path B in the Tier 2 verification strategy. It provides a completely generic, model-independent computation that is compared against model-specific analytical formulas (Path A):
| Path A (analytical) | Path B (ED) | Agreement |
|---|---|---|
| Heisenberg dimer: $\{-3J/4, J/4, J/4, J/4\}$ | build_spinhalf_heisenberg + eigvals | Machine precision |
| TFIM BdG quasiparticle spectrum | build_tfim + eigvals | Machine precision |
| Graphene Bloch $E_\pm(k)$ | Real-space TB + eigvals | Machine precision |
The key strength of ED as a verification tool is that it requires no model-specific knowledge –- it simply diagonalises the Hamiltonian constructed from the bond list.
References
- E. Dagotto, "Correlated electrons in high-temperature superconductors", Rev. Mod. Phys. 66, 763 (1994) –- review of ED methods.
- A. W. Sandvik, "Computational studies of quantum spin systems", AIP Conf. Proc. 1297, 135 (2010) –- practical guide.