Benchmarks for Many-Body Calculations
Nine small problems give numerical answers against which to compare a many-body calculation: complete spin and particle spectra, ideal-gas integrals, a BCS gap, and an exactly known finite-size sequence. Matching several quantities helps locate an error: an energy alone can conceal an incorrect basis, while degeneracies, trace moments, and observables test different parts of the calculation.
Required background. The computational overview explains what each numerical method approximates. Validation tests explains residuals and convergence checks.
The examples use their stated units, sectors, and boundaries. Passing them establishes agreement for these particular problems; a new geometry, interaction, or observable may require a new comparison. The runnable examples implement the open Ising chain and finite-cutoff BCS equation.
Comparing finite-cluster spectra and gas integrals
Section titled “Comparing finite-cluster spectra and gas integrals”For a scalar observable , record an absolute error and a scale-aware error,
The explicit avoids meaningless relative errors when the reference value is zero. For a normalized approximate eigenpair, report a residual such as
No one tolerance is appropriate for every method. The following reference profile is suitable for the tiny dense matrices below when they are assembled and diagonalized in IEEE double precision:
| Quantity | Illustrative pass threshold |
|---|---|
| relative Hermiticity defect | |
| listed eigenvalue error in units of the stated coupling | |
| normalized trace-moment error | |
| listed ground-state observable error | |
| normalized eigenpair residual |
Sparse iterative solvers, stochastic estimates, arbitrary precision, and thermodynamic extrapolations require their own tolerances. A looser threshold can be legitimate, but the reason must be part of the calculation rather than chosen to hide a discrepancy.
Suite at a Glance
Section titled “Suite at a Glance”| ID | Problem | Primary implementation layer | Trusted anchor |
|---|---|---|---|
MB-B001 |
transverse-field Ising chain | spin-bit assembly and boundary bonds | exact spectrum and trace moments |
MB-B002 |
spin- Heisenberg ring | spin normalization and multiplets | complete spectrum |
MB-B003 |
Hubbard dimer | fermionic signs and spin sectors | analytic six-state spectrum |
MB-B004 |
four-site Hubbard chain | many-fermion basis and observables | independently reproducible 36-state block |
MB-B005 |
two-site Bose–Hubbard model | bosonic ladder factors | analytic three-state spectrum |
MB-B006 |
ideal Bose gas | Bose functions and condensation branch | polylogarithm root and condensate fraction |
MB-B007 |
ideal Fermi gas | Fermi integrals and Sommerfeld limit | zero-temperature values and low- coefficients |
MB-B008 |
BCS gap equation | nonlinear self-consistency | exact zero-temperature gap |
MB-B009 |
critical Ising gap scaling | size sequence and extrapolation | exact open-chain gap for every |
The order is useful. Run algebraic finite-cluster tests before interpreting a large simulation. A sophisticated extrapolation cannot repair a basis or sign error.
MB-B001: Transverse-Field Ising Chain
Section titled “MB-B001: Transverse-Field Ising Chain”Hamiltonian and parameters
Section titled “Hamiltonian and parameters”Use Pauli matrices with eigenvalues and
The computational basis obeys
For the periodic benchmarks take and add the bond once. The two-site example below is open: a periodic two-edge ring and a single undirected dimer have different bond multiplicities. No constant shift is applied.
The primary analytic case is with open boundaries. Its four eigenvalues are
At and , the sorted spectrum is
Stronger assembly check
Section titled “Stronger assembly check”Use , periodic boundaries, , and . The distinct energy levels and degeneracies are
| degeneracy | |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 2 | |
| 1 | |
| 4 | |
| 1 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |
The full Hilbert-space dimension is , and two useful basis-independent moments are
Calculations to compare
Section titled “Calculations to compare”- Confirm the dimension and Hermiticity.
- Reproduce the spectrum before adding periodic boundaries.
- For , reproduce the degeneracy sum, ground energy, trace, and second moment.
- Verify the global spin-flip symmetry through .
- If symmetry blocks are used, reconstruct the complete spectrum from all blocks.
Interpreting a discrepancy
Section titled “Interpreting a discrepancy”- Substituting without changing the couplings reduces the interaction by four and the field by two; it does not rescale this whole Hamiltonian by one common factor.
- Mixing a two-edge periodic ring with a one-bond dimer changes the physical Hamiltonian. Use the open two-site and periodic four-site examples as specified.
- A correct ground energy with a wrong trace moment points to incomplete basis enumeration or a hidden energy shift.
- Missing degeneracies can indicate accidental symmetry breaking in the matrix assembly.
Passing MB-B001 validates these finite-chain conventions. It does not validate the thermodynamic critical point, long-distance correlations, or a time-evolution routine.
MB-B002: Spin-1/2 Heisenberg Ring
Section titled “MB-B002: Spin-1/2 Heisenberg Ring”Hamiltonian and parameters
Section titled “Hamiltonian and parameters”Use dimensionless spin operators and the four-site periodic Hamiltonian
The four undirected bonds are , , , and . Set and apply no constant offset.
The complete -state spectrum is
| degeneracy | diagnostic content | |
|---|---|---|
| 1 | singlet ground state | |
| 3 | spin-one multiplet | |
| 7 | remaining singlet and triplet states | |
| 5 | fully symmetric spin-two multiplet |
The trace moments are
The fully polarized state supplies a one-line bond check: every bond has , so its total energy is .
Calculations to compare
Section titled “Calculations to compare”- Reproduce all four distinct energies and their degeneracies.
- Check and .
- Verify that states grouped by total spin are degenerate to the declared tolerance.
- Reconstruct the full trace moments from any blocks used in the calculation.
- Compare the lowest energies obtained in the full basis and in the block.
Interpreting a discrepancy
Section titled “Interpreting a discrepancy”A spectrum larger by a factor of four almost always signals the use of Pauli matrices where spin operators were intended. An isolated error in the polarized energy suggests a bond-counting problem. Correct eigenvalues but incorrect multiplet labels point to a faulty total-spin operator or an inconsistent tensor-factor ordering.
The thermodynamic Bethe-ansatz energy density,
is a valuable later test, but it is not part of the tiny-ring acceptance condition. The canonical Heisenberg page owns its interpretation.
MB-B003: Hubbard Dimer
Section titled “MB-B003: Hubbard Dimer”The Hubbard dimer explains the singlet and triplet states behind this spectrum.
Hamiltonian and parameters
Section titled “Hamiltonian and parameters”Use two sites, two spin species, and
Fix the fermionic mode order to
and benchmark the total-particle sector , whose dimension is . The block has dimension and contains the member of the triplet.
With suitable phases for the singlet and even/odd doublon states, the singlet block is
The full spectrum is
At and ,
where
The last target follows independently from Feynman–Hellmann differentiation,
Calculations to compare
Section titled “Calculations to compare”- Confirm the dimensions for fixed and for fixed .
- Reproduce the complete analytic spectrum in the full sector.
- Verify the three triplet states are degenerate at zero energy.
- Compare direct evaluation of with .
- Repeat after changing the mode ordering and confirm that observables and eigenvalues remain invariant when all fermionic signs are transformed consistently.
Interpreting a discrepancy
Section titled “Interpreting a discrepancy”The dimer is especially sensitive to fermionic sign conventions. Incorrect singlet mixing, a split triplet, or a missing factor of two in the square root usually identifies an inconsistent hopping sign or an incomplete spin sum. Agreement only after taking absolute values of matrix entries is not a pass.
MB-B004: Four-Site Hubbard Chain
Section titled “MB-B004: Four-Site Hubbard Chain”The Hubbard chain connects this finite open chain with the bulk model.
Hamiltonian and parameters
Section titled “Hamiltonian and parameters”Use the same Hamiltonian and site-major mode ordering as MB-B003, now on an open chain of sites. The bonds are , , and . Fix
The symmetry-block dimension is
This benchmark is deliberately larger than the dimer but still small enough for complete dense diagonalization. The trusted ground-state data are
Here . The energy decomposition provides two additional checks:
Over the complete -state block,
Calculations to compare
Section titled “Calculations to compare”- Verify the combinatorial dimension before constructing the Hamiltonian.
- Check Hermiticity and closure of every hopping transition inside the fixed particle-number block.
- Reproduce , , the trace, and the second moment.
- Compute directly and verify .
- Cross-check the result with two independent representations when practical, such as a generic occupation-bit implementation and factorized up/down bit strings.
The quoted is the first excitation gap within the fixed block. It is not, by itself, the thermodynamic charge gap, spin gap, or unrestricted global gap. Those quantities require specified neighboring sectors and a size sequence.
Interpreting a discrepancy
Section titled “Interpreting a discrepancy”- Dimension or closure failures indicate sector enumeration errors.
- A correct trace but wrong low spectrum often indicates hopping signs or bond orientation.
- A correct energy with wrong double occupancy suggests an observable-basis mismatch.
- Agreement between two solvers using the same matrix does not independently test matrix assembly; an independent construction also tests the matrix elements.
MB-B005: Two-Site Bose–Hubbard Model
Section titled “MB-B005: Two-Site Bose–Hubbard Model”Hamiltonian and parameters
Section titled “Hamiltonian and parameters”Use
in the fixed- basis
The matrix is
with spectrum
At and ,
or numerically
Define the total on-site pair indicator
Its ground-state expectation is
at the benchmark point.
Calculations to compare
Section titled “Calculations to compare”- Confirm that the fixed-number basis has dimension .
- Generate hopping amplitudes from ladder operators rather than hard-coding them.
- Reproduce the full spectrum and the reflection parity of all three eigenstates.
- Verify .
- Check the noninteracting limit , where the two bosons occupy the bonding orbital and .
Interpreting a discrepancy
Section titled “Interpreting a discrepancy”Off-diagonal entries of magnitude instead of reveal missing bosonic enhancement factors. An interaction diagonal of on indicates that the factor in was omitted. The Bose–Hubbard Dimer dossier owns the exact finite-model interpretation and additional invariant checks; the general sparse construction lives in Occupation-Number Representation.
MB-B006: Ideal Bose Gas
Section titled “MB-B006: Ideal Bose Gas”Hamiltonian and parameters
Section titled “Hamiltonian and parameters”Use a uniform, spinless, three-dimensional ideal Bose gas in the thermodynamic limit. Define
and, above the condensation point,
The implementation should reproduce
For the normal-state target
the physical root is
For a second target below the transition, set . The thermodynamic condensate fraction is
Calculations to compare
Section titled “Calculations to compare”- Reproduce the two zeta values independently of the root solver.
- Solve the normal-state number equation on the physical interval and report its residual.
- Refine quadrature order or arithmetic precision until the quoted digits stabilize.
- Below , separate the ground mode and pin the excited-state fugacity to its thermodynamic limiting value .
- Verify that the excited fraction scales as for several temperatures below .
Interpreting a discrepancy
Section titled “Interpreting a discrepancy”A root is unphysical for the continuum ideal Bose gas and usually reflects unconstrained root finding. Failure below often occurs when the code keeps trying to satisfy the entire density with excited states. In a finite box the chemical potential remains below the ground-state energy; the exact prescription is a thermodynamic-limit problem, not a finite-volume identity.
MB-B007: Ideal Fermi Gas
Section titled “MB-B007: Ideal Fermi Gas”Hamiltonian and parameters
Section titled “Hamiltonian and parameters”Use a uniform three-dimensional gas with spin degeneracy and units
Choose
so that and . With
the number and energy densities can be evaluated directly as
At zero temperature the exact targets are
For , the Sommerfeld coefficients provide a refinement benchmark:
Calculations to compare
Section titled “Calculations to compare”- Reproduce the density, energy per particle, and pressure ratio.
- At finite , solve the number equation for rather than holding .
- Use a decreasing sequence such as and monitor the scaled corrections.
- Verify the limits
- Record quadrature truncation and root residual separately from the asymptotic or error.
The low-temperature formulas are convergence laws, not exact finite- targets. Demanding twelve-digit agreement at would confuse truncation of the Sommerfeld series with numerical error.
Interpreting a discrepancy
Section titled “Interpreting a discrepancy”An incorrect zero-temperature density commonly signals a missing spin degeneracy or phase-space factor. A chemical potential that stays fixed at finite temperature violates the fixed-density problem. Unstable heat capacity estimates may come from differentiating noisy energy data; analytic derivatives, higher precision, or a fitted low-temperature expansion can separate differentiation error from quadrature error.
MB-B008: Mean-Field BCS Gap Equation
Section titled “MB-B008: Mean-Field BCS Gap Equation”Hamiltonian and parameters
Section titled “Hamiltonian and parameters”Use a constant density of states within a symmetric energy cutoff . Let be the density of states per spin in this pairing convention and the attractive coupling. The cutoff here has energy units, despite its frequency-like symbol. Choose
The nonzero mean-field gap satisfies
At , the integral is elementary and gives the exact finite-cutoff target
The weak-coupling approximation is
whose relative error at this parameter point is approximately . A solver should reproduce the exact finite-cutoff result, not be judged against the asymptotic expression at more precision than the approximation warrants.
The transition temperature follows from the linearized equation
For the benchmark parameters,
and therefore
The slight difference from the asymptotic weak-coupling value is primarily the finite-cutoff correction retained in .
Calculations to compare
Section titled “Calculations to compare”- Evaluate the integral and reproduce the exact nonzero root.
- Report both the gap error and the residual of the integral equation.
- Bracket the physical root on ; do not let the trivial normal solution masquerade as convergence below .
- Solve the linearized equation for and compare the finite-cutoff ratio with the weak-coupling limit.
- Check that the superconducting stationary point has lower mean-field free energy than the normal state for .
- If the calculation is performed at fixed density rather than fixed chemical potential, solve and report the number equation as an additional problem.
Interpreting a discrepancy
Section titled “Interpreting a discrepancy”False convergence to usually reflects an unbracketed nonlinear solve or use of the undivided stationarity equation without phase selection. A correct root with a large integral residual suggests cancellation or quadrature error. Agreement with but not can simply mean the implementation silently replaced the finite cutoff by the weak-coupling approximation.
MB-B009: Finite-Size Scaling of the Ising Gap
Section titled “MB-B009: Finite-Size Scaling of the Ising Gap”Hamiltonian and parameters
Section titled “Hamiltonian and parameters”Return to the open transverse-field Ising chain of MB-B001 at its critical point,
The gap between the two lowest states of the complete finite Hilbert space is
Useful exact values are
| 2 | 1.236067977499790 |
| 3 | 0.890083735825258 |
| 4 | 0.694592710667721 |
| 5 | 0.569259353093141 |
| 6 | 0.482146721021292 |
| 7 | 0.418113853070614 |
| 8 | 0.369073437853208 |
The boundary-shifted scaling variable exposes the known correction structure. With ,
so that
This single problem tests both spectral extraction and the scaling analysis. The leading critical law is
corresponding to dynamical exponent , while the exact formula reveals how open-boundary corrections approach that limit.
Calculations to compare
Section titled “Calculations to compare”- Reproduce the exact gaps for every size used in the fit.
- State whether the gap is global or restricted to a symmetry sector. This problem uses the global gap.
- Verify that decreases monotonically over the benchmark sequence.
- Fit at least two lower-size cutoffs and report the drift of the inferred exponent and amplitude.
- Compare an unshifted fit in with the boundary-aware variable .
- Test the normalized residual
before interpreting any extrapolation.
Interpreting a discrepancy
Section titled “Interpreting a discrepancy”An exact-formula residual at small is a spectrum, boundary, or sector error rather than a scaling uncertainty. A good log–log line with drifting exponent can result from omitted boundary corrections. Using a parity-restricted gap without saying so changes the physical excitation and invalidates comparison with this problem.
Passing the fit only confirms that the analysis can recover a known sequence over the tested window. It does not validate an ansatz for a different universality class.
Exercises
Section titled “Exercises”Exercise 1: The factor-of-four failure
Section titled “Exercise 1: The factor-of-four failure”A four-site Heisenberg implementation returns the levels , , , and with the correct degeneracies. Identify the likely error and give a direct one-state test.
Solution
The spectrum is four times the target, so the code probably used Pauli matrices in
instead of spin operators . Test the fully polarized state. Each intended bond contributes , and the four-site ring must therefore have energy . A result confirms the normalization error.
Exercise 3: Why the sector gap is not the charge gap
Section titled “Exercise 3: Why the sector gap is not the charge gap”Explain why in the four-site Hubbard block is not a charge gap. Write a finite-system expression that probes particle addition and removal instead.
Solution
Both states in the quoted difference have the same particle numbers, so the excitation does not test the energy cost of changing the total charge. A common finite-system charge-gap estimator at total particle number is
where is minimized over all allowed spin sectors at that total particle number. Restricting the spin sectors defines a different addition/removal energy. Other conventions use pair addition and removal to preserve spin balance. In either case, neighboring particle-number sectors are essential.
Exercise 5: Boundary-aware Ising scaling
Section titled “Exercise 5: Boundary-aware Ising scaling”Starting from the exact critical gap, show that the shifted length removes the leading boundary correction from the normalized amplitude.
Solution
Write
With ,
Expanding gives
There is no term proportional to . If one normalizes with instead, expanding reintroduces a leading correction.
Exercise 6: Design a fair low-temperature test
Section titled “Exercise 6: Design a fair low-temperature test”Why should the ideal-Fermi-gas value at one temperature not be compared directly with the truncated Sommerfeld formula at machine precision? Propose a better acceptance test.
Solution
The displayed Sommerfeld formulas omit terms of order in and , and order in . Even exact quadrature should therefore differ from the truncated formula at finite .
A better test uses a decreasing temperature sequence, solves the number equation at each point, and examines scaled corrections such as
The sequence should approach with drift consistent with . Quadrature and root residuals should be much smaller than that expected asymptotic drift and reported separately.
References
Section titled “References”- J. P. F. LeBlanc et al., “Solutions of the two-dimensional Hubbard model: benchmarks and results from a wide range of numerical algorithms,” Physical Review X 5, 041041 (2015).
- J. Bardeen, L. N. Cooper, and J. R. Schrieffer, “Theory of superconductivity,” Physical Review 108, 1175–1204 (1957).
- R. K. Pathria and P. D. Beale, Statistical Mechanics, 3rd ed., Elsevier (2011).
- H. Bethe, “Zur Theorie der Metalle. I. Eigenwerte und Eigenfunktionen der linearen Atomkette,” Zeitschrift für Physik 71, 205–226 (1931).
- E. Dagotto, “Correlated electrons in high-temperature superconductors,” Reviews of Modern Physics 66, 763–840 (1994).
- M. P. A. Fisher, P. B. Weichman, G. Grinstein, and D. S. Fisher, “Boson localization and the superfluid–insulator transition,” Physical Review B 40, 546–570 (1989).
- K. Huang, Statistical Mechanics, 2nd ed., Wiley (1987).
- J. Hubbard, “Electron correlations in narrow energy bands,” Proceedings of the Royal Society A 276, 238–257 (1963).
- L. N. Trefethen and D. Bau III, Numerical Linear Algebra, SIAM (1997).
- E. Lieb, T. Schultz, and D. Mattis, “Two soluble models of an antiferromagnetic chain,” Annals of Physics 16, 407–466 (1961).
- P. Pfeuty, “The one-dimensional Ising model with a transverse field,” Annals of Physics 57, 79–90 (1970).
- A. W. Sandvik, “Computational studies of quantum spin systems,” AIP Conference Proceedings 1297, 135–338 (2010).
- J. M. Thijssen, Computational Physics, 2nd ed., Cambridge University Press (2007).
- E. H. Lieb and F. Y. Wu, “Absence of Mott transition in an exact solution of the short-range, one-band model in one dimension,” Physical Review Letters 20, 1445–1448 (1968).