Skip to content

Benchmark Problems

A trustworthy benchmark is a falsifiable numerical contract. It specifies the problem before the calculation is run, identifies a trusted answer, declares how agreement will be measured, and explains what a disagreement would diagnose. A familiar Hamiltonian or a plausible plot is not enough.

This page defines a compact benchmark suite for many-body and statistical quantum mechanics. Its nine contracts exercise distinct layers of a computational workflow:

  • spin and occupation-number basis construction;
  • fermionic signs and bosonic enhancement factors;
  • symmetry sectors, degeneracies, and trace moments;
  • thermodynamic quadrature and constrained root finding;
  • nonlinear self-consistency equations;
  • finite-size scaling with known boundary corrections.

The suite is intentionally small enough to run routinely. Passing it does not establish that a method works for every coupling, size, observable, or phase. It establishes only that the implementation reproduces the channels and regimes that the contracts actually exercise.

This page is the canonical home for the many-body physics benchmark suite and its stable MB-Bxxx contracts. It owns fixed conventions, parameter points, target values, refinement directions, acceptance logic, and failure diagnoses for the listed problems.

It does not rederive each model. The physical definitions and analytic developments remain at their canonical homes:

The Model-to-Volume Cross-Link Index maps each contract back to its dossier, teaching page, compact card, and application destination. The Reference benchmark taxonomy owns sitewide naming and report fields. Validation Tests owns executable test families and status labels. Exact Diagonalization Preview and Finite-Size Scaling in Numerics explain the methods used here.

Every benchmark in this suite fixes the following data before execution:

FieldRequired content
IDstable identifier of the form MB-Bxxx
modelHamiltonian or ensemble and canonical page
representationbasis ordering, local convention, or integration variable
sectorconserved quantum numbers, boundary condition, or thermodynamic ensemble
parametersdimensionless values and the energy or length unit
targetsexact values, trusted digits, identities, or asymptotic coefficients
diagnosticsresiduals, moments, degeneracies, observables, and convergence trends
refinementsystem size, quadrature order, solver tolerance, or fit window
acceptancea criterion declared before the result is inspected
horizonan explicit statement of what the passing result does not validate

These fields prevent a common ambiguity: two codes can claim to solve “the Hubbard dimer” while using different mode orderings, particle sectors, signs, or energy offsets.

For a scalar observable OO, record an absolute error and a scale-aware error,

ϵabs=∣Onum−Oref∣,ϵscale=ϵabsmax⁡ ⁣(∣Oref∣,Oscale).\begin{aligned} \epsilon_{\mathrm{abs}} &= \left| O_{\mathrm{num}}-O_{\mathrm{ref}} \right|, \\ \epsilon_{\mathrm{scale}} &= \frac{ \epsilon_{\mathrm{abs}} }{ \max\!\left( |O_{\mathrm{ref}}|, O_{\mathrm{scale}} \right) }. \end{aligned}

The explicit OscaleO_{\mathrm{scale}} avoids meaningless relative errors when the reference value is zero. For a normalized approximate eigenpair, report a residual such as

rE=∥H∣ψ~⟩−E~∣ψ~⟩∥2Escale.r_E = \frac{ \left\| H|\widetilde\psi\rangle - \widetilde E|\widetilde\psi\rangle \right\|_2 }{E_{\mathrm{scale}}}.

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:

QuantityIllustrative pass threshold
relative Hermiticity defect ∥H−H†∥F/max⁡(∥H∥F,1)\|H-H^\dagger\|_F/\max(\|H\|_F,1)10−1310^{-13}
listed eigenvalue error in units of the stated coupling10−1110^{-11}
normalized trace-moment error10−1210^{-12}
listed ground-state observable error10−1010^{-10}
normalized eigenpair residual10−1110^{-11}

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 benchmark record rather than chosen after seeing the output.

IDProblemPrimary implementation layerTrusted anchor
MB-B001transverse-field Ising chainspin-bit assembly and boundary bondsexact L=2L=2 spectrum and L=4L=4 trace moments
MB-B002spin-1/21/2 Heisenberg ringspin normalization and multipletscomplete L=4L=4 spectrum
MB-B003Hubbard dimerfermionic signs and spin sectorsanalytic six-state spectrum
MB-B004four-site Hubbard chainmany-fermion basis and observablesindependently reproducible 36-state block
MB-B005two-site Bose–Hubbard modelbosonic ladder factorsanalytic three-state spectrum
MB-B006ideal Bose gasBose functions and condensation branchpolylogarithm root and condensate fraction
MB-B007ideal Fermi gasFermi integrals and Sommerfeld limitzero-temperature values and low-TT coefficients
MB-B008BCS gap equationnonlinear self-consistencyexact zero-temperature gap
MB-B009critical Ising gap scalingsize sequence and extrapolationexact open-chain gap for every LL

The order is useful. Run algebraic finite-cluster tests before interpreting a large simulation. A sophisticated extrapolation cannot repair a basis or sign error.

Use Pauli matrices with eigenvalues ±1\pm1 and

HmathrmOBC=−J∑i=1L−1σizσi+1z−h∑i=1Lσix.H_{mathrm{OBC}} = -J\sum_{i=1}^{L-1} \sigma_i^z\sigma_{i+1}^z -h\sum_{i=1}^{L}\sigma_i^x.

The computational basis obeys

σz∣0⟩=∣0⟩,σz∣1⟩=−∣1⟩.\sigma^z|0\rangle=|0\rangle, \qquad \sigma^z|1\rangle=-|1\rangle.

For periodic boundaries, add the bond −JσLzσ1z-J\sigma_L^z\sigma_1^z exactly once. No constant shift is applied.

The primary analytic case is L=2L=2 with open boundaries. Its four eigenvalues are

{−J2+4h2,−J,+J,+J2+4h2}.\left\{ -\sqrt{J^2+4h^2}, -J, +J, +\sqrt{J^2+4h^2} \right\}.

At J=1J=1 and h=0.7h=0.7, the sorted spectrum is

E/J={−1.720465053409,−1,1,1.720465053409}.\begin{aligned} E/J = \{&-1.720465053409, -1, \\ &1, 1.720465053409\}. \end{aligned}

Use L=4L=4, periodic boundaries, J=1J=1, and h=0.7h=0.7. The distinct energy levels and degeneracies are

E/JE/Jdegeneracy
−4.563856065203-4.5638560652031
−4.441311123147-4.4413111231471
−1.735286090565-1.7352860905651
−1.400000000000-1.4000000000002
−0.441311123147-0.4413111231471
004
0.4413111231470.4413111231471
1.4000000000001.4000000000002
1.7352860905651.7352860905651
4.4413111231474.4413111231471
4.5638560652034.5638560652031

The full Hilbert-space dimension is 1616, and two useful basis-independent moments are

Tr⁡H=0,116Tr⁡H2=4(J2+h2)=5.96.\begin{aligned} \operatorname{Tr}H &=0, \\ \frac{1}{16}\operatorname{Tr}H^2 &= 4(J^2+h^2) \\ &=5.96. \end{aligned}
  1. Confirm the dimension 2L2^L and Hermiticity.
  2. Reproduce the L=2L=2 spectrum before adding periodic boundaries.
  3. For L=4L=4, reproduce the degeneracy sum, ground energy, trace, and second moment.
  4. Verify the global spin-flip symmetry P=∏iσixP=\prod_i\sigma_i^x through [H,P]=0[H,P]=0.
  5. If symmetry blocks are used, reconstruct the complete spectrum from all blocks.
  • A factor-of-two discrepancy usually means spin operators Sα=σα/2S^\alpha=\sigma^\alpha/2 were substituted for Pauli matrices.
  • An incorrect L=2L=2 periodic result often comes from counting the same undirected bond twice.
  • 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.

Use dimensionless spin operators Si=σi/2\mathbf S_i=\boldsymbol\sigma_i/2 and the four-site periodic Hamiltonian

H=J∑i=14Si⋅Si+1,S5≡S1.H = J\sum_{i=1}^{4} \mathbf S_i\mathbin{\cdot}\mathbf S_{i+1}, \qquad \mathbf S_5\equiv\mathbf S_1.

The four undirected bonds are (1,2)(1,2), (2,3)(2,3), (3,4)(3,4), and (4,1)(4,1). Set J=1J=1 and apply no constant offset.

The complete 1616-state spectrum is

E/JE/Jdegeneracydiagnostic content
−2-21singlet ground state
−1-13spin-one multiplet
007remaining singlet and triplet states
+1+15fully symmetric spin-two multiplet

The trace moments are

Tr⁡H=0,116Tr⁡H2=34J2.\operatorname{Tr}H=0, \qquad \frac{1}{16}\operatorname{Tr}H^2 = \frac{3}{4}J^2.

The fully polarized state supplies a one-line bond check: every bond has Si⋅Si+1=1/4\mathbf S_i\cdot\mathbf S_{i+1}=1/4, so its total energy is JJ.

  1. Reproduce all four distinct energies and their degeneracies.
  2. Check [H,Stotz]=0[H,S^z_{\mathrm{tot}}]=0 and [H,Stot2]=0[H,\mathbf S_{\mathrm{tot}}^2]=0.
  3. Verify that states grouped by total spin are degenerate to the declared tolerance.
  4. Reconstruct the full trace moments from any StotzS^z_{\mathrm{tot}} blocks used in the calculation.
  5. Compare the lowest energies obtained in the full basis and in the Stotz=0S^z_{\mathrm{tot}}=0 block.

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,

lim⁡L→∞E0(L)LJ=14−ln⁡2,\lim_{L\to\infty} \frac{E_0(L)}{LJ} = \frac14-\ln2,

is a valuable later test, but it is not part of the tiny-ring acceptance condition. The canonical Heisenberg page owns its interpretation.

The Hubbard Dimer dossier supplies the complete finite-model record, exact observables, and physical interpretation. This section remains the authority for the stable numerical contract.

Use two sites, two spin species, and

H=−t∑σ(c1σ†c2σ+c2σ†c1σ)+U∑i=12ni↑ni↓.\begin{aligned} H ={}& -t\sum_{\sigma} \left( c_{1\sigma}^\dagger c_{2\sigma} + c_{2\sigma}^\dagger c_{1\sigma} \right) \\ &+ U\sum_{i=1}^{2} n_{i\uparrow}n_{i\downarrow}. \end{aligned}

Fix the fermionic mode order to

(1↑,1↓,2↑,2↓)(1\uparrow,1\downarrow,2\uparrow,2\downarrow)

and benchmark the total-particle sector N=2N=2, whose dimension is (42)=6\binom42=6. The N↑=N↓=1N_\uparrow=N_\downarrow=1 block has dimension 44 and contains the Sz=0S^z=0 member of the triplet.

With suitable phases for the singlet and even/odd doublon states, the singlet block is

HS=0=(0−2t0−2tU000U).H_{S=0} = \begin{pmatrix} 0 & -2t & 0\\ -2t & U & 0\\ 0 & 0 & U \end{pmatrix}.

The full N=2N=2 spectrum is

E−=U−U2+16t22,ET=0with degeneracy 3,ED=U,E+=U+U2+16t22.\begin{gathered} E_- = \frac{U-\sqrt{U^2+16t^2}}{2}, \\ E_T=0 \quad\text{with degeneracy }3, \\ E_D=U, \qquad E_+ = \frac{U+\sqrt{U^2+16t^2}}{2}. \end{gathered}

At t=1t=1 and U=4U=4,

E0/t=−0.828427124746190,ΔS−T/t=0.828427124746190,⟨D⟩0=0.146446609406726,\begin{aligned} E_0/t &=-0.828427124746190, \\ \Delta_{S-T}/t &=0.828427124746190, \\ \langle D\rangle_0 &=0.146446609406726, \end{aligned}

where

D=∑ini↑ni↓.D = \sum_i n_{i\uparrow}n_{i\downarrow}.

The last target follows independently from Feynman–Hellmann differentiation,

⟨D⟩0=∂E−∂U=12(1−UU2+16t2).\langle D\rangle_0 = \frac{\partial E_-}{\partial U} = \frac12 \left( 1- \frac{U}{\sqrt{U^2+16t^2}} \right).
  1. Confirm the dimensions 66 for fixed N=2N=2 and 44 for fixed N↑=N↓=1N_\uparrow=N_\downarrow=1.
  2. Reproduce the complete analytic spectrum in the full sector.
  3. Verify the three triplet states are degenerate at zero energy.
  4. Compare direct evaluation of ⟨D⟩0\langle D\rangle_0 with ∂E−/∂U\partial E_-/\partial U.
  5. Repeat after changing the mode ordering and confirm that observables and eigenvalues remain invariant when all fermionic signs are transformed consistently.

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.

The Hubbard Chain dossier supplies the periodic thermodynamic model record and explains why this open finite-chain contract must be interpreted separately.

Use the same Hamiltonian and site-major mode ordering as MB-B003, now on an open chain of L=4L=4 sites. The bonds are (1,2)(1,2), (2,3)(2,3), and (3,4)(3,4). Fix

t=1,U=4,N↑=N↓=2.t=1, \qquad U=4, \qquad N_\uparrow=N_\downarrow=2.

The symmetry-block dimension is

dim⁡H2,2=(42)(42)=36.\dim\mathcal H_{2,2} = \binom42\binom42 =36.

This benchmark is deliberately larger than the dimer but still small enough for complete dense diagonalization. The trusted ground-state data are

E0=−1.953145308684556,E1=−1.412898695919094,E1−E0=0.540246612765462,⟨D⟩0=0.339585650339361.\begin{aligned} E_0 &=-1.953145308684556, \\ E_1 &=-1.412898695919094, \\ E_1-E_0 &=0.540246612765462, \\ \langle D\rangle_0 &=0.339585650339361. \end{aligned}

Here D=∑ini↑ni↓D=\sum_i n_{i\uparrow}n_{i\downarrow}. The energy decomposition provides two additional checks:

Eint=U⟨D⟩0,=1.358342601357445,Ekin=E0−Eint,=−3.311487910042001.\begin{aligned} E_{\mathrm{int}} &=U\langle D\rangle_0, \\ &=1.358342601357445, \\ E_{\mathrm{kin}} &=E_0-E_{\mathrm{int}}, \\ &=-3.311487910042001. \end{aligned}

Over the complete 3636-state block,

Tr⁡H=144,136Tr⁡H2=25.3333333333333.\begin{aligned} \operatorname{Tr}H &=144, \\ \frac{1}{36}\operatorname{Tr}H^2 &=25.3333333333333. \end{aligned}
  1. Verify the combinatorial dimension before constructing the Hamiltonian.
  2. Check Hermiticity and closure of every hopping transition inside the fixed particle-number block.
  3. Reproduce E0E_0, E1E_1, the trace, and the second moment.
  4. Compute ⟨D⟩0\langle D\rangle_0 directly and verify E0=Ekin+U⟨D⟩0E_0=E_{\mathrm{kin}}+U\langle D\rangle_0.
  5. 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 E1−E0E_1-E_0 is the first excitation gap within the fixed (N↑,N↓)=(2,2)(N_\uparrow,N_\downarrow)=(2,2) 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.

  • 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 representation is stronger evidence.

Use

H=−J(b1†b2+b2†b1)+U2∑i=12ni(ni−1).\begin{aligned} H ={}& -J \left( b_1^\dagger b_2 + b_2^\dagger b_1 \right) \\ &+ \frac{U}{2} \sum_{i=1}^{2} n_i(n_i-1). \end{aligned}

in the fixed-N=2N=2 basis

{∣2,0⟩,∣1,1⟩,∣0,2⟩}.\bigl\{ |2,0\rangle, |1,1\rangle, |0,2\rangle \bigr\}.

The matrix is

H=(U−2J0−2J0−2J0−2JU),H = \begin{pmatrix} U & -\sqrt2J & 0\\ -\sqrt2J & 0 & -\sqrt2J\\ 0 & -\sqrt2J & U \end{pmatrix},

with spectrum

E−=U−U2+16J22,ED=U,E+=U+U2+16J22.\begin{aligned} E_- &= \frac{U-\sqrt{U^2+16J^2}}{2}, \\ E_D &=U, \\ E_+ &= \frac{U+\sqrt{U^2+16J^2}}{2}. \end{aligned}

At J=1J=1 and U=2U=2,

E−/J=1−5,ED/J=2,E+/J=1+5.\begin{aligned} E_-/J &=1-\sqrt5, \\ E_D/J &=2, \\ E_+/J &=1+\sqrt5. \end{aligned}

or numerically

E−/J=−1.236067977499790,ED/J=2,E+/J=3.236067977499790.\begin{aligned} E_-/J &=-1.236067977499790, \\ E_D/J &=2, \\ E_+/J &=3.236067977499790. \end{aligned}

Define the total on-site pair indicator

DB=12∑ini(ni−1).D_B = \frac12\sum_i n_i(n_i-1).

Its ground-state expectation is

⟨DB⟩0=12(1−UU2+16J2)=0.276393202250021.\begin{aligned} \langle D_B\rangle_0 &= \frac12 \left( 1- \frac{U}{\sqrt{U^2+16J^2}} \right) \\ &=0.276393202250021. \end{aligned}

at the benchmark point.

  1. Confirm that the fixed-number basis has dimension 33.
  2. Generate hopping amplitudes from ladder operators rather than hard-coding them.
  3. Reproduce the full spectrum and the reflection parity of all three eigenstates.
  4. Verify ⟨DB⟩0=∂E0/∂U\langle D_B\rangle_0=\partial E_0/\partial U.
  5. Check the noninteracting limit U=0U=0, where the two bosons occupy the bonding orbital and E0=−2JE_0=-2J.

Off-diagonal entries of magnitude JJ instead of 2J\sqrt2J reveal missing bosonic enhancement factors. An interaction diagonal of 2U2U on ∣2,0⟩|2,0\rangle indicates that the factor 1/21/2 in n(n−1)n(n-1) 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.

Use a uniform, spinless, three-dimensional ideal Bose gas in the thermodynamic limit. Define

λT=2πℏ2mkBT,z=eβμ,\lambda_T = \sqrt{ \frac{2\pi\hbar^2}{mk_{\mathrm B}T} }, \qquad z=e^{\beta\mu},

and, above the condensation point,

nλT3=Li⁡3/2(z),0<z<1.n\lambda_T^3 = \operatorname{Li}_{3/2}(z), \qquad 0<z<1.

The implementation should reproduce

ζ(3/2)=2.612375348685488…,ζ(5/2)=1.341487257250917….\begin{aligned} \zeta(3/2) &=2.612375348685488\ldots, \\ \zeta(5/2) &=1.341487257250917\ldots. \end{aligned}

For the normal-state target

nλT3=1,n\lambda_T^3=1,

the physical root is

z=0.698614359135065.z=0.698614359135065.

For a second target below the transition, set T/Tc=1/2T/T_c=1/2. The thermodynamic condensate fraction is

N0N=1−(TTc)3/2=0.646446609406726.\begin{aligned} \frac{N_0}{N} &= 1- \left( \frac{T}{T_c} \right)^{3/2} \\ &=0.646446609406726. \end{aligned}
  1. Reproduce the two zeta values independently of the root solver.
  2. Solve the normal-state number equation on the physical interval 0<z<10<z<1 and report its residual.
  3. Refine quadrature order or arithmetic precision until the quoted digits stabilize.
  4. Below TcT_c, separate the ground mode and pin the excited-state fugacity to its thermodynamic limiting value z=1z=1.
  5. Verify that the excited fraction scales as (T/Tc)3/2(T/T_c)^{3/2} for several temperatures below TcT_c.

A root z>1z>1 is unphysical for the continuum ideal Bose gas and usually reflects unconstrained root finding. Failure below TcT_c 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 z=1z=1 prescription is a thermodynamic-limit contract, not a finite-volume identity.

Use a uniform three-dimensional gas with spin degeneracy g=2g=2 and units

ℏ22m=1.\frac{\hbar^2}{2m}=1.

Choose

n=13π2,n=\frac{1}{3\pi^2},

so that kF=1k_F=1 and ϵF=1\epsilon_F=1. With

f(ϵ)=1e(ϵ−μ)/(kBT)+1,f(\epsilon) = \frac{1}{e^{(\epsilon-\mu)/(k_{\mathrm B}T)}+1},

the number and energy densities can be evaluated directly as

n=1π2∫0∞k2f(k2) dk,u=1π2∫0∞k4f(k2) dk.\begin{aligned} n &= \frac{1}{\pi^2} \int_0^\infty k^2 f(k^2)\,dk, \\ u &= \frac{1}{\pi^2} \int_0^\infty k^4 f(k^2)\,dk. \end{aligned}

At zero temperature the exact targets are

μ=ϵF=1,UN=35ϵF=0.6,PnϵF=25.\begin{aligned} \mu &=\epsilon_F=1, \\ \frac{U}{N} &=\frac35\epsilon_F=0.6, \\ \frac{P}{n\epsilon_F} &=\frac25. \end{aligned}

For θ=T/TF→0\theta=T/T_F\to0, the Sommerfeld coefficients provide a refinement benchmark:

μϵF=1−π212θ2+O(θ4),UNϵF=35[1+5π212θ2+O(θ4)],CVNkB=π22θ+O(θ3).\begin{aligned} \frac{\mu}{\epsilon_F} &= 1- \frac{\pi^2}{12}\theta^2 +O(\theta^4), \\ \frac{U}{N\epsilon_F} &= \frac35 \left[ 1+ \frac{5\pi^2}{12}\theta^2 +O(\theta^4) \right], \\ \frac{C_V}{Nk_{\mathrm B}} &= \frac{\pi^2}{2}\theta +O(\theta^3). \end{aligned}
  1. Reproduce the T=0T=0 density, energy per particle, and pressure ratio.
  2. At finite TT, solve the number equation for μ\mu rather than holding μ=ϵF\mu=\epsilon_F.
  3. Use a decreasing sequence such as θ=0.20,0.10,0.05,0.025\theta=0.20,0.10,0.05,0.025 and monitor the scaled corrections.
  4. Verify the limits
1−μ/ϵFθ2⟶π212,U/(NϵF)−3/5θ2⟶π24,CVNkBθ⟶π22.\begin{aligned} \frac{1-\mu/\epsilon_F}{\theta^2} &\longrightarrow \frac{\pi^2}{12}, \\ \frac{ U/(N\epsilon_F)-3/5 }{\theta^2} &\longrightarrow \frac{\pi^2}{4}, \\ \frac{C_V}{Nk_{\mathrm B}\theta} &\longrightarrow \frac{\pi^2}{2}. \end{aligned}
  1. Record quadrature truncation and root residual separately from the asymptotic O(θ4)O(\theta^4) or O(θ3)O(\theta^3) error.

The low-temperature formulas are convergence laws, not exact finite-θ\theta targets. Demanding twelve-digit agreement at θ=0.1\theta=0.1 would confuse truncation of the Sommerfeld series with numerical error.

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 contract. 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.

Use a constant density of states within a symmetric energy cutoff ∣ξ∣≤ωc|\xi|\leq\omega_c. Let

λ=gν(0)=0.25,ωc=1.\lambda=g\nu(0)=0.25, \qquad \omega_c=1.

The nonzero mean-field gap satisfies

1λ=∫0ωcdξξ2+Δ2tanh⁡ ⁣(ξ2+Δ22kBT).\frac{1}{\lambda} = \int_0^{\omega_c} \frac{d\xi}{\sqrt{\xi^2+\Delta^2}} \tanh\!\left( \frac{\sqrt{\xi^2+\Delta^2}}{2k_{\mathrm B}T} \right).

At T=0T=0, the integral is elementary and gives the exact finite-cutoff target

Δ0ωc=1sinh⁡(1/λ)=0.0366435703258656.\frac{\Delta_0}{\omega_c} = \frac{1}{\sinh(1/\lambda)} = 0.0366435703258656.

The weak-coupling approximation is

Δ0ωc≈2e−1/λ=0.0366312777774684,\frac{\Delta_0}{\omega_c} \approx 2e^{-1/\lambda} = 0.0366312777774684,

whose relative error at this parameter point is approximately 3.36×10−43.36\times10^{-4}. 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

1λ=∫0ωcdξξtanh⁡ ⁣(ξ2kBTc).\frac{1}{\lambda} = \int_0^{\omega_c} \frac{d\xi}{\xi} \tanh\!\left( \frac{\xi}{2k_{\mathrm B}T_c} \right).

For the benchmark parameters,

kBTcωc=0.0207674786897134,\frac{k_{\mathrm B}T_c}{\omega_c} = 0.0207674786897134,

and therefore

2Δ0kBTc=3.52893780447368.\frac{2\Delta_0}{k_{\mathrm B}T_c} = 3.52893780447368.

The slight difference from the asymptotic weak-coupling value 2π/eγ≈3.527752\pi/e^\gamma\approx3.52775 is primarily the finite-cutoff correction retained in Δ0\Delta_0.

  1. Evaluate the T=0T=0 integral and reproduce the exact nonzero root.
  2. Report both the gap error and the residual of the integral equation.
  3. Bracket the physical root on Δ>0\Delta>0; do not let the trivial normal solution masquerade as convergence below TcT_c.
  4. Solve the linearized equation for TcT_c and compare the finite-cutoff ratio with the weak-coupling limit.
  5. Check that the superconducting stationary point has lower mean-field free energy than the normal state for T<TcT<T_c.
  6. If the calculation is performed at fixed density rather than fixed chemical potential, solve and report the number equation as an additional contract.

False convergence to Δ=0\Delta=0 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 2e−1/λ2e^{-1/\lambda} but not 1/sinh⁡(1/λ)1/\sinh(1/\lambda) 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”

Return to the open transverse-field Ising chain of MB-B001 at its critical point,

h=J>0.h=J>0.

The gap between the two lowest states of the complete finite Hilbert space is

ΔL=4Jsin⁡ ⁣(π4L+2).\Delta_L = 4J \sin\!\left( \frac{\pi}{4L+2} \right).

Useful exact values are

LLΔL/J\Delta_L/J
21.236067977499790
30.890083735825258
40.694592710667721
50.569259353093141
60.482146721021292
70.418113853070614
80.369073437853208

The boundary-shifted scaling variable exposes the known correction structure. With ℓ=L+1/2\ell=L+1/2,

ℓΔLπJ=sin⁡xx,x=π4ℓ,\begin{aligned} \frac{\ell\Delta_L}{\pi J} &= \frac{\sin x}{x}, \\ x &= \frac{\pi}{4\ell}, \end{aligned}

so that

ℓΔLπJ=1−π296ℓ2+O(ℓ−4).\frac{\ell\Delta_L}{\pi J} = 1- \frac{\pi^2}{96\ell^2} +O(\ell^{-4}).

This single contract tests both spectral extraction and the scaling analysis. The leading critical law is

ΔL∼πJL,\Delta_L\sim\frac{\pi J}{L},

corresponding to dynamical exponent z=1z=1, while the exact formula reveals how open-boundary corrections approach that limit.

  1. Reproduce the exact gaps for every size used in the fit.
  2. State whether the gap is global or restricted to a symmetry sector. This contract uses the global gap.
  3. Verify that ΔL\Delta_L decreases monotonically over the benchmark sequence.
  4. Fit at least two lower-size cutoffs Lmin⁡L_{\min} and report the drift of the inferred exponent and amplitude.
  5. Compare an unshifted fit in LL with the boundary-aware variable ℓ=L+1/2\ell=L+1/2.
  6. Test the normalized residual
RL=ΔL4Jsin⁡[π/(4L+2)]−1R_L = \frac{\Delta_L}{ 4J\sin[\pi/(4L+2)] }-1

before interpreting any extrapolation.

An exact-formula residual at small LL 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 contract.

Passing the fit only confirms that the analysis can recover a known z=1z=1 sequence over the tested window. It does not validate an ansatz for a different universality class.

The suite is most useful when failures are interpreted jointly.

Implementation featurePrimary contractIndependent reinforcement
spin-bit indexing and tensor orderMB-B001MB-B002
bond enumeration and boundariesMB-B001MB-B004, MB-B009
spin normalization and multipletsMB-B002symmetry commutators
fermionic anticommutation signsMB-B003MB-B004
fixed-particle sector enumerationMB-B003MB-B004, MB-B005
bosonic ladder factorsMB-B005Feynman–Hellmann check
constrained thermodynamic rootsMB-B006MB-B007, MB-B008
low-temperature asymptoticsMB-B007zero-temperature limits
nonlinear self-consistencyMB-B008free-energy ordering
size-window and correction analysisMB-B009exact pointwise residuals

A failed row should be repaired at its lowest relevant layer. For example, do not tune a finite-size fit while MB-B001 still reports the wrong open-chain spectrum.

Run and promote evidence in the following order:

  1. Structural tests: dimensions, basis uniqueness, sector closure, Hermiticity, and symmetry commutators.
  2. Exact finite clusters: complete spectra, degeneracies, traces, and simple observables.
  3. Independent identities: Feynman–Hellmann derivatives, energy decompositions, and known limiting cases.
  4. Numerical refinement: solver tolerance, quadrature order, arithmetic precision, and fit window.
  5. Independent implementations: a second basis representation, solver, or integration route.
  6. Scaling claims: only after every finite-size datum passes its pointwise contract.

This ladder distinguishes correctness of the encoded problem from convergence of the numerical method and from interpretation of the physical limit.

Every run should preserve a compact record such as the following:

FieldExample
benchmark_idMB-B004
canonical_targetfour-site open Hubbard chain
implementation_versioncommit or immutable archive identifier
environmentlanguage, package versions, hardware notes
representationsite-major fermion modes, fixed (N↑,N↓)(N_\uparrow,N_\downarrow)
parametersL=4L=4, t=1t=1, U=4U=4, open boundaries
methodcomplete dense diagonalization
tolerancedeclared eigenvalue, residual, and observable thresholds
observedvalues with more digits than the pass threshold requires
refinementsolver or precision sequence
statuspassed, warning, failed, or skipped
horizonno thermodynamic or charge-gap claim

Store raw values at higher precision than displayed plots, but do not imply more physical accuracy than the reference and method support. A screenshot of a passing table is weaker evidence than machine-readable results plus the environment and test logic that produced them.

The planned Reproducible Notebooks index maps each future artifact to the applicable MB-Bxxx contracts and withholds evidential status until clean execution and validation are recorded.

A benchmark result can become a regression target after:

  1. its Hamiltonian and conventions have been reviewed against the canonical page;
  2. its reference values have an analytic derivation or an independent construction;
  3. all applicable structural checks pass;
  4. its tolerance has a documented numerical rationale;
  5. the environment and implementation version are recorded;
  6. the evidence horizon is stated.

Never update a stored reference merely because a new code version disagrees with it. Diagnose the discrepancy first. A legitimate convention change should receive a new contract revision or explicit migration note, while the stable benchmark ID continues to identify an unambiguous problem.

One scalar can agree accidentally. Include dimensions, moments, degeneracies, residuals, and at least one observable whenever the contract supplies them.

“The gap” is incomplete language. Record particle number, magnetization or parity, boundary condition, and whether the gap is global or sector restricted.

Pauli matrices and spin-1/21/2 operators differ by a factor of two. A density of states may be per spin or spin summed. These choices belong in the contract, not in undocumented code defaults.

A post hoc tolerance converts validation into description. Set it from arithmetic, conditioning, solver behavior, stochastic uncertainty, and intended use before opening the result.

Confusing approximation error with numerical error

Section titled “Confusing approximation error with numerical error”

The Sommerfeld series and weak-coupling BCS formula are asymptotic approximations. A highly accurate solver should disagree with their truncated forms by the expected higher-order correction.

Two eigensolvers applied to the same incorrectly assembled matrix are not independent checks of the Hamiltonian. Independence should reach the layer under suspicion.

The nine contracts do not validate frustrated sign structures, continuum renormalization, two-dimensional thermodynamic extrapolation, real-time stability, or spectral analytic continuation. Add benchmarks targeted to those claims.

A four-site Heisenberg implementation returns the levels −8J-8J, −4J-4J, 00, and 4J4J 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 σ\boldsymbol\sigma in

J∑iσi⋅σi+1J\sum_i \boldsymbol\sigma_i\mathbin{\cdot}\boldsymbol\sigma_{i+1}

instead of spin operators Si=σi/2\mathbf S_i=\boldsymbol\sigma_i/2. Test the fully polarized state. Each intended bond contributes J/4J/4, and the four-site ring must therefore have energy JJ. A result 4J4J confirms the normalization error.

Exercise 2: Double occupancy without eigenvectors

Section titled “Exercise 2: Double occupancy without eigenvectors”

Use the exact Hubbard-dimer ground energy to derive its total double occupancy. Evaluate the result at U=4tU=4t.

Solution

Feynman–Hellmann gives

⟨∑ini↑ni↓⟩0=∂E−∂U.\left\langle \sum_i n_{i\uparrow}n_{i\downarrow} \right\rangle_0 = \frac{\partial E_-}{\partial U}.

Differentiating

E−=U−U2+16t22E_- = \frac{U-\sqrt{U^2+16t^2}}{2}

yields

⟨D⟩0=12(1−UU2+16t2).\langle D\rangle_0 = \frac12 \left( 1- \frac{U}{\sqrt{U^2+16t^2}} \right).

At U=4tU=4t this is

⟨D⟩0=12(1−12)=0.146446609406726….\begin{aligned} \langle D\rangle_0 &= \frac12 \left( 1-\frac{1}{\sqrt2} \right) \\ &=0.146446609406726\ldots. \end{aligned}

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 E1−E0E_1-E_0 in the four-site (N↑,N↓)=(2,2)(N_\uparrow,N_\downarrow)=(2,2) 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 NN is

Δc(N)=E0(N+1)+E0(N−1)−2E0(N).\begin{aligned} \Delta_c(N) ={}& E_0(N+1) + E_0(N-1) \\ &-2E_0(N). \end{aligned}

with spin sectors chosen and reported consistently. Other conventions use pair addition and removal to preserve spin balance. In either case, neighboring particle-number sectors are essential.

Exercise 4: Recover the bosonic enhancement

Section titled “Exercise 4: Recover the bosonic enhancement”

Compute ⟨1,1∣b2†b1∣2,0⟩\langle1,1|b_2^\dagger b_1|2,0\rangle and explain why MB-B005 detects a hard-core or spin-style hopping implementation.

Solution

Apply the annihilation operator first:

b1∣2,0⟩=2∣1,0⟩.b_1|2,0\rangle = \sqrt2|1,0\rangle.

Then

b2†∣1,0⟩=∣1,1⟩.b_2^\dagger|1,0\rangle = |1,1\rangle.

Therefore

⟨1,1∣b2†b1∣2,0⟩=2.\langle1,1| b_2^\dagger b_1 |2,0\rangle = \sqrt2.

A hopping routine that moves particles with unit amplitude misses the occupation-dependent ladder factor and returns −J-J rather than −2J-\sqrt2J.

Starting from the exact critical gap, show that the shifted length ℓ=L+1/2\ell=L+1/2 removes the leading 1/L1/L boundary correction from the normalized amplitude.

Solution

Write

ΔL=4Jsin⁡ ⁣(π4ℓ),ℓ=L+12.\Delta_L = 4J\sin\!\left( \frac{\pi}{4\ell} \right), \qquad \ell=L+\frac12.

With x=π/(4ℓ)x=\pi/(4\ell),

ℓΔLπJ=sin⁡xx.\frac{\ell\Delta_L}{\pi J} = \frac{\sin x}{x}.

Expanding gives

sin⁡xx=1−x26+O(x4)=1−π296ℓ2+O(ℓ−4).\begin{aligned} \frac{\sin x}{x} &= 1- \frac{x^2}{6} +O(x^4) \\ &= 1- \frac{\pi^2}{96\ell^2} +O(\ell^{-4}). \end{aligned}

There is no term proportional to 1/ℓ1/\ell. If one normalizes with LL instead, expanding L/(L+1/2)L/(L+1/2) reintroduces a leading 1/L1/L 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 θ4\theta^4 in μ\mu and U/NU/N, and order θ3\theta^3 in CVC_V. Even exact quadrature should therefore differ from the truncated formula at finite θ\theta.

A better test uses a decreasing temperature sequence, solves the number equation at each point, and examines scaled corrections such as

aμ(θ)=1−μ(θ)/ϵFθ2.a_\mu(\theta) = \frac{1-\mu(\theta)/\epsilon_F}{\theta^2}.

The sequence should approach π2/12\pi^2/12 with drift consistent with O(θ2)O(\theta^2). Quadrature and root residuals should be much smaller than that expected asymptotic drift and reported separately.

  1. E. Lieb, T. Schultz, and D. Mattis, “Two soluble models of an antiferromagnetic chain,” Annals of Physics 16, 407–466 (1961).
  2. P. Pfeuty, “The one-dimensional Ising model with a transverse field,” Annals of Physics 57, 79–90 (1970).
  3. H. Bethe, “Zur Theorie der Metalle. I. Eigenwerte und Eigenfunktionen der linearen Atomkette,” Zeitschrift für Physik 71, 205–226 (1931).
  4. J. Hubbard, “Electron correlations in narrow energy bands,” Proceedings of the Royal Society A 276, 238–257 (1963).
  5. 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).
  6. 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).
  7. J. Bardeen, L. N. Cooper, and J. R. Schrieffer, “Theory of superconductivity,” Physical Review 108, 1175–1204 (1957).
  8. E. Dagotto, “Correlated electrons in high-temperature superconductors,” Reviews of Modern Physics 66, 763–840 (1994).
  9. A. W. Sandvik, “Computational studies of quantum spin systems,” AIP Conference Proceedings 1297, 135–338 (2010).
  10. 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).
  11. K. Huang, Statistical Mechanics, 2nd ed., Wiley (1987).
  12. R. K. Pathria and P. D. Beale, Statistical Mechanics, 3rd ed., Elsevier (2011).
  13. J. M. Thijssen, Computational Physics, 2nd ed., Cambridge University Press (2007).
  14. L. N. Trefethen and D. Bau III, Numerical Linear Algebra, SIAM (1997).