Exact Diagonalization Preview
Exact diagonalization, or ED, solves a declared finite many-body eigenproblem without introducing a physical approximation beyond the finite representation itself. One chooses a finite geometry, basis, local cutoff, boundary condition, and symmetry sector; represents the Hamiltonian on that space; computes all or selected eigenpairs; and evaluates observables from the resulting finite-system states.
A finite calculation retains finite-size, boundary, and local-cutoff errors:
An eigensolver residual can be near machine precision while the physical result still has finite-size, boundary, cutoff, or model error. Conversely, a modest cluster can be uniquely valuable because it gives unbiased access to every state in the represented space, supplies sharp unit tests, and benchmarks methods that reach larger systems through additional approximations.
Required background. Computational method choice distinguishes numerical convergence from physical limits; matrix diagonalization introduces eigenpairs and residuals.
Complete and targeted finite diagonalization
Section titled “Complete and targeted finite diagonalization”The literature uses ED in two related senses.
Complete diagonalization
Section titled “Complete diagonalization”A dense or structure-aware solver returns every eigenvalue and, when requested, a complete orthonormal eigenbasis:
This form supports exact finite-temperature traces, arbitrary unitary evolution in the finite space, full level statistics, and complete Lehmann sums. Its memory cost is at least quadratic if a dense Hamiltonian or all eigenvectors are stored.
Targeted finite diagonalization
Section titled “Targeted finite diagonalization”In many-body practice, ED can also mean constructing the exact finite Hamiltonian but using a sparse iterative solver to obtain only a few eigenpairs. The finite operator is still represented without a variational ansatz, but the output is incomplete:
This route is appropriate for ground states and low excitations. It does not automatically provide a complete thermal trace or all spectral weight. Lanczos develops the connection between the finite operator, its Krylov subspace, and the computed observables.
Whenever “ED” is reported, state which meaning is intended. Specify the finite geometry, boundary condition, Hilbert space and any local cutoff before constructing the matrix. These define the problem being solved.
Constructing the Basis
Section titled “Constructing the Basis”Let
be an orthonormal finite basis. A computational basis needs both a physical definition and an indexing convention:
The map must be one-to-one on the represented sector. Duplicate configurations, omitted states, or inconsistent ordering can produce a Hermitian matrix with the wrong physics, so basis validation precedes diagonalization.
Spin-one-half bitstrings
Section titled “Spin-one-half bitstrings”For spin-one-half sites, choose
A product state is
and one possible integer encoding is
The site-to-bit convention must be stated. Reversing endianness does not change a correctly transformed spectrum, but it changes every operator mask, basis label, and reshaping convention. A one-site product state is an inexpensive test of the convention.
Use dimensionless spin operators throughout this page; physical angular momentum is . The spin projection is
If total is conserved, a fixed- sector contains only configurations satisfying
Its dimension is
The counting derivation belongs to Scaling of Hilbert Space. Here the point is operational: the sector basis must contain exactly that many unique states, and every Hamiltonian action must remain inside it.
Fermionic occupation strings
Section titled “Fermionic occupation strings”For spinless fermionic modes ordered as , an occupation basis is
The annihilation action includes the parity of occupied modes preceding :
with
Changing the mode ordering changes intermediate signs and basis labels, although consistently transformed observables agree. On the full two-mode Fock space, check the anticommutator before assembling an interacting Hamiltonian:
The creation-string convention is , despite displaying the most significant bit first. Fermionic operator actions explain these signs. In a fixed-number sector, the individual maps to a different sector; projecting every factor back into the original sector would incorrectly make it vanish.
Truncated bosonic occupations
Section titled “Truncated bosonic occupations”Bosonic local spaces are infinite, but finitely many modes at fixed total number already give a finite sector, with no additional local approximation. When number is not fixed, a finite representation requires a cutoff. A local cutoff uses
whereas a total-number cutoff uses
These define different subspaces. The same symbol “cutoff 5” is meaningless without saying which rule is used. Observables sensitive to high occupation, such as onsite number variance, must be converged under cutoff enlargement.
The ladder factors
must be combined with a boundary rule at . The projected ladder operator obeys , rather than the full oscillator commutator. Construct the desired Hamiltonian matrix elements before imposing the retained basis: generally because the intermediate state can leave the basis and return. For example, acts as on the top state, while the product of truncated ladders gives zero.
From Local Terms to a Sparse Hamiltonian
Section titled “From Local Terms to a Sparse Hamiltonian”Write a local lattice Hamiltonian as
where each acts on a small set of sites or modes. Matrix elements are
The useful computational object is often the action
not a dense table of all possible entries. A local term changes only a few occupation labels, so each basis state connects to a small fraction of the full basis.
Define
For many local models,
even though itself grows exponentially. This makes sparse or matrix-free Hamiltonian application possible; it does not remove the exponential vector length.
Assembly as a configuration graph
Section titled “Assembly as a configuration graph”It is useful to view the represented Hamiltonian as a weighted graph:
- basis states are vertices;
- diagonal terms give onsite vertex weights;
- off-diagonal terms connect configurations;
- matrix elements are edge weights;
- conserved labels diagonal in this configuration basis split the graph into disconnected components; translation or total-spin symmetry can instead require linear combinations of vertices.
This picture exposes several tests. Every transition must land on a valid basis state. Reverse edges must carry conjugate amplitudes. A claimed conserved sector must be closed under the full Hamiltonian. Termwise closure is a convenient sufficient condition; separate terms can also cancel leakage.
Hermiticity
Section titled “Hermiticity”For an orthonormal basis of a closed system,
Common assembly errors include:
- adding a hopping or spin-flip transition in only one direction;
- double-counting an undirected bond;
- applying inconsistent complex phases on reverse links;
- using different basis-index conventions in diagonal and off-diagonal terms;
- forgetting a boundary bond or adding it twice.
Hermiticity is necessary but not sufficient. Two identically wrong off-diagonal entries can remain Hermitian.
Local Example: A Heisenberg Bond
Section titled “Local Example: A Heisenberg Bond”For two spin-one-half sites,
Using dimensionless spin operators, , write
The local action is
and
These four rules are enough to assemble every Heisenberg bond in a product basis. The Heisenberg model develops the many-site physics.
The complete two-spin spectrum
Section titled “The complete two-spin spectrum”Order the basis as
The matrix is
The parallel states are already eigenstates. The antiparallel block has symmetric and antisymmetric combinations:
Together with and , the symmetric states form a triplet at and the antisymmetric state is a singlet at . Two Spin-One-Half Particles derives the angular-momentum addition. ED recovers it from basis actions.
This tiny problem supports a strong unit-test suite:
and
A many-site implementation should reproduce the same local matrix elements before any large sparse calculation is trusted.
Dense, Sparse, and Matrix-Free Representations
Section titled “Dense, Sparse, and Matrix-Free Representations”The represented operator and the eigensolver are separate choices.
Dense complete route
Section titled “Dense complete route”Storing a general complex dense Hamiltonian requires approximately
in complex double precision, before workspace and eigenvectors. A complete dense Hermitian eigensolve typically requires order- arithmetic, with algorithm-dependent constants and storage reductions.
This route is valuable when is small enough because completeness enables:
- every finite-system energy level;
- exact traces over the represented space;
- arbitrary operator matrices in the eigenbasis;
- full finite-system propagators;
- complete level and degeneracy comparisons.
Sparse stored route
Section titled “Sparse stored route”A sparse representation stores nonzero values and their indices. Its memory scales with rather than , plus indexing overhead. It is useful when the operator is reused for many matrix-vector products or several observables.
Sparse storage does not imply a sparse eigenvector. Generic interacting eigenstates can have nonzero amplitude on essentially every basis state.
Matrix-free route
Section titled “Matrix-free route”A matrix-free implementation computes
by applying local terms directly. It avoids storing the sparse matrix and can reduce memory, but it is harder to inspect. Tiny-system matrices, randomized Hermiticity checks, and exact action tests become especially important.
Storage formats and operation counts are explained in Sparse Matrices.
Memory needed for vectors and matrices
Section titled “Memory needed for vectors and matrices”A single complex state vector requires
For an unconstrained spin-one-half system,
Thus one vector is about MiB, while a dense complex matrix is about TiB:
The fixed- sector has
One vector then needs about MiB, but a dense complex matrix still needs about GiB. Symmetry reduction can make sparse vector methods practical long after dense storage has failed.
Real calculations need several work vectors, basis-index data, sparse indices, observables, and solver workspace. Quoting only one-vector memory is a lower bound.
What a Complete Eigensystem Provides
Section titled “What a Complete Eigensystem Provides”Let
Eigenstate observables
Section titled “Eigenstate observables”For an operator ,
Off-diagonal matrix elements
control transitions, response, and dynamics. Operator conventions must match those used in the Hamiltonian basis.
Correlation functions
Section titled “Correlation functions”Equal-time correlations follow directly:
Connected correlations subtract one-point products. Their physical definitions and normalizations are explained in Connected Correlation Functions.
Exact finite-temperature traces
Section titled “Exact finite-temperature traces”A complete spectrum gives
and
This is exact for the represented finite Hilbert space. It is not necessarily exact for an untruncated bosonic space or the thermodynamic system.
A low-energy subset can approximate low-temperature thermodynamics only when omitted weight is controlled. If is the first omitted energy, the suppression scale is
but degeneracy and the number of omitted states also matter. “Low temperature” must be compared with both gaps and entropy.
An error bound for a partial thermal trace
Section titled “An error bound for a partial thermal trace”For , suppose the retained states are exact eigenstates of the finite Hamiltonian, with partition sum . Suppose there are at most omitted states and every omitted energy is at least a certified . Set
If no states are omitted, the error is zero. Otherwise, normalize the Gibbs weights separately on the retained and omitted subspaces to obtain and . Their supports are orthogonal, and the full state is
Thus is exactly the trace distance of this spectral truncation. For a Hermitian observable with spectrum in ,
No commutation of with is required: each normalized state’s expectation lies in the same spectral interval. For a probability, use and interval width one. An operator-norm bound gives the less sharp but convenient width .
The retained free energy also bounds the full free energy:
These bounds quantify omitted thermal weight, separately from errors in computed eigenpairs or matrix elements. A few converged Ritz values do not by themselves certify that no omitted state lies below . An energy shift rescales and equally, so their ratio and the observable bound remain unchanged.
Dynamical spectral sums
Section titled “Dynamical spectral sums”At zero temperature, a finite-system spectral measure for has the form
where
The exact finite result is a set of delta peaks. Any broadening used in a plot is an added resolution prescription. Spectral Functions defines the spectral conventions. Dynamical Correlation Functions Numerically shows how to benchmark this direct line list against Lanczos and real-time estimators with a matched kernel.
Entanglement from eigenvectors
Section titled “Entanglement from eigenvectors”First embed a state computed in a constrained or symmetry-adapted basis into the product basis (or assemble the coefficient matrix directly from its configurations). A fixed-number basis does not factor into subsystem bases. For a spatial bipartition , the resulting coefficients can be arranged as
Then
The arrangement depends on site ordering, bit convention, and subsystem choice. For fermionic modes, also fix the ordered Fock-space tensor convention and include the parity signs when reordering modes into the chosen grouping. Product states and Bell pairs are essential tests. Entanglement Spectrum develops this calculation and its interpretation.
Degeneracy and Basis Dependence
Section titled “Degeneracy and Basis Dependence”Inside an exactly degenerate eigenspace, the solver may return any orthonormal basis. Individual vectors can rotate under tiny perturbations or changes of numerical library while the invariant subspace remains correct.
If is a degenerate subspace, define its projector:
The projector is basis independent. For a symmetry-resolved interpretation, diagonalize the commuting symmetry operator within or construct the sector before solving. Do not infer broken symmetry from an arbitrary numerical combination of degenerate states.
Eigenvector phases are also arbitrary:
Expectation values are unchanged, but raw vector components and off-diagonal phases are not. Regression tests should compare phase-invariant quantities or align phases by an explicit convention.
Checking the eigensystem and observables
Section titled “Checking the eigensystem and observables”For every normalized computed eigenpair,
Report absolute or scaled residuals and check
For a complete eigensystem,
and
These identities detect missing eigenvalues, sector mismatches, and some assembly errors. Higher moments can be useful when independently available.
Observable checks
Section titled “Observable checks”- exact sum rules;
- positive probabilities and nonnegative variances;
- known limits at zero coupling or decoupled sites;
- symmetry-forbidden matrix elements, including transitions to other sectors;
- derivative identities such as Hellmann–Feynman;
- agreement between direct time evolution and spectral reconstruction on tiny systems.
For a nondegenerate eigenstate,
This tests the Hamiltonian parameterization, state, observable, and finite-difference procedure together.
Small-System Limits
Section titled “Small-System Limits”ED has a controlled finite-system exactness and an uncontrolled reach problem. Several cautions follow.
Discrete spectra are not continua
Section titled “Discrete spectra are not continua”Finite systems have discrete energy levels. A dense cluster of peaks can approximate a continuum only with a declared joint limit in size and resolution.
Symmetry breaking is subtle
Section titled “Symmetry breaking is subtle”Finite eigenstates can preserve an exact symmetry even where the thermodynamic system breaks it. Order parameters may vanish while squared order parameters, structure factors, susceptibilities, or quasi-degenerate state families reveal ordering tendencies.
Shape can matter as much as site count
Section titled “Shape can matter as much as site count”Two clusters with the same can have different shortest loops, aspect ratios, coordination defects, or momentum grids. A sequence chosen only by increasing can oscillate between incompatible geometries.
Boundary conditions can select sectors
Section titled “Boundary conditions can select sectors”Periodic, open, twisted, and antiperiodic boundaries change allowed momenta and finite-size corrections. Boundary averaging can reduce some shell effects but does not erase the need to report each boundary condition.
Accessible sizes can precede the asymptotic regime
Section titled “Accessible sizes can precede the asymptotic regime”A smooth trend over three clusters is not proof of asymptotic scaling. Finite-Size Effects explains shape, shell, gap, boundary, and resolution effects; Thermodynamic Limit defines the limiting target.
Exercises
Section titled “Exercises”2. Estimate memory before allocation
Section titled “2. Estimate memory before allocation”For an unconstrained spin-one-half system, estimate the memory for one complex double-precision vector and for a dense complex matrix. Use binary units.
Solution
The dimension is
At bytes per complex number,
The dense matrix requires
This excludes eigensolver workspace and eigenvector storage. Sparse or matrix-free action is mandatory, but even that still requires several MiB vectors.
3. Test a claimed conserved sector
Section titled “3. Test a claimed conserved sector”A Hamiltonian is assembled in a fixed- spin basis. Give two independent numerical tests that the sector is closed.
Solution
First, apply the full Hamiltonian to every sector basis state on a tiny system and verify that every nonzero output has the same and maps to a valid sector index. For a decomposition whose terms individually conserve number, testing each term is a useful stronger diagnostic.
Second, construct the number operator
on the full tiny-system Hilbert space, before restricting to the sector, and verify
to numerical precision. The transition test exercises the basis map; the full-space commutator tests the original operator. Inside a fixed- block, is a scalar multiple of the identity, so its commutator is zero even for an incorrectly projected Hamiltonian. Equivalently, test the leakage in the full space, where projects onto the proposed block.
4. Bound a partial thermal trace
Section titled “4. Bound a partial thermal trace”At positive inverse temperature , suppose all omitted states have energy at least and there are at most omitted states. Give an upper bound on their partition-function contribution.
As a concrete test, retain only a nondegenerate ground state with and omit states, all at energy . Compute the omitted probability at . How large must be for every effect to have absolute expectation error at most ?
Solution
Each omitted Boltzmann factor satisfies
Therefore the omitted contribution obeys
Relative to the ground-state contribution,
The factor shows why a gap alone is not enough: the number of omitted states can offset Boltzmann suppression.
Here and , so the bound is attained:
Each omitted state’s Boltzmann factor is small, but together the omitted states carry about of the probability. The projector onto the excited subspace attains this error. Requiring gives
The required inverse temperature includes the logarithm of the omitted degeneracy. A gap alone cannot set the thermal truncation tolerance.
5. Compare degenerate eigenspaces
Section titled “5. Compare degenerate eigenspaces”Two diagonalization libraries return different orthonormal vectors for a twofold-degenerate eigenvalue. How should the results be compared?
Solution
Compare the projectors onto the degenerate subspaces:
The individual vectors can be related by any unitary rotation and arbitrary phases, so component-wise comparison is not meaningful. One can compare projector norms, principal angles between subspaces, traces of observables over the subspace, and symmetry-resolved vectors obtained by diagonalizing a commuting operator within it.
References
Section titled “References”- P. Weinberg and M. Bukov, “QuSpin: A Python Package for Dynamics and Exact Diagonalisation of Quantum Many Body Systems, Part I: Spin Chains,” SciPost Physics 2, 003 (2017), doi:10.21468/SciPostPhys.2.1.003.
- E. Dagotto, “Correlated Electrons in High-Temperature Superconductors,” Reviews of Modern Physics 66, 763–840 (1994), doi:10.1103/RevModPhys.66.763.
- J. M. Zhang and R. X. Dong, “Exact Diagonalization: The Bose–Hubbard Model as an Example,” European Journal of Physics 31, 591–602 (2010), doi:10.1088/0143-0807/31/3/016.
- H. Fehske, R. Schneider, and A. Weiße, eds., Computational Many-Particle Physics, Springer, 2008, doi:10.1007/978-3-540-74686-7.
- C. Lanczos, “An Iteration Method for the Solution of the Eigenvalue Problem of Linear Differential and Integral Operators,” Journal of Research of the National Bureau of Standards 45, 255–282 (1950), doi:10.6028/jres.045.026.
- H. Q. Lin, “Exact Diagonalization of Quantum-Spin Models,” Physical Review B 42, 6561–6567 (1990), doi:10.1103/PhysRevB.42.6561.
- G. H. Golub and C. F. Van Loan, Matrix Computations, 4th ed., Johns Hopkins University Press, 2013.
- J. Jaklič and P. Prelovšek, “Finite-Temperature Properties of Doped Antiferromagnets,” Advances in Physics 49, 1–92 (2000), doi:10.1080/000187300243381.
- Y. Saad, Numerical Methods for Large Eigenvalue Problems, 2nd ed., SIAM, 2011, doi:10.1137/1.9781611970739.
- A. W. Sandvik, “Computational Studies of Quantum Spin Systems,” in AIP Conference Proceedings 1297, 135–338 (2010), doi:10.1063/1.3518900.