Skip to content

Thermal States and Partition Functions

Finite-spectrum thermodynamics converts energy levels into normalized Boltzmann weights. Stable arithmetic is straightforward, but incomplete spectra and omitted symmetry multiplicities can bias results while producing smooth temperature curves. This page treats numerical evaluation; thermal density operators explains the statistical interpretation.

Helpful background. Exact diagonalization supplies energies and eigenvectors.

Assume a finite Hilbert space and positive temperature, with inverse temperature β=1/(kBT)>0\beta=1/(k_BT)>0. For complete energies EnE_n, choose E0=min⁡nEnE_0=\min_nE_n and compute

wn=e−β(En−E0),Z′=∑nwn,pn=wn/Z′.w_n=e^{-\beta(E_n-E_0)},\quad Z'= \sum_n w_n,\quad p_n=w_n/Z'.

Then

log⁡Z=−βE0+log⁡Z′,F=E0−β−1log⁡Z′.\log Z=-\beta E_0+\log Z',\qquad F=E_0-\beta^{-1}\log Z'.

The shift prevents overflow at low temperature without changing probabilities. A degeneracy gng_n multiplies the weight if each distinct energy appears only once. If eigenvalues are listed with multiplicity, multiplying by gng_n again double-counts states.

For an observable, ⟨A⟩β=∑npn⟨n∣A∣n⟩\langle A\rangle_\beta=\sum_n p_n\langle n|A|n\rangle. Build the full density matrix only when needed. Noncommuting observables still use their energy-basis diagonal elements for equilibrium expectations.

For a temperature-independent Hamiltonian,

U=∑npnEn,CV=kBβ2(⟨H2⟩−U2).U=\sum_np_nE_n,\qquad C_V=k_B\beta^2\left(\langle H^2\rangle-U^2\right).

These relations follow from ∂βpn=−(En−U)pn\partial_\beta p_n=-(E_n-U)p_n, hence ∂βU=−Var⁡(H)\partial_\beta U=-\operatorname{Var}(H) and ∂Tβ=−kBβ2\partial_T\beta=-k_B\beta^2. A Hamiltonian fitted separately at each temperature has additional derivative terms and does not obey this fluctuation formula without modification.

For stable evaluation, retain the shifted energies εn=En−E0\varepsilon_n=E_n-E_0, compute u′=∑npnεnu'=\sum_np_n\varepsilon_n, and use U=E0+u′U=E_0+u' and Var⁡(H)=∑npn(εn−u′)2\operatorname{Var}(H)=\sum_np_n(\varepsilon_n-u')^2. This avoids both subtracting large second moments and subtracting a rounded large UU from every energy. It cannot recover splittings already lost when the input energies were rounded. Entropy is S=−kB∑npnlog⁡pnS=-k_B\sum_np_n\log p_n, with 0log⁡0=00\log0=0.

A susceptibility is not always β\beta times the equal-time variance: that formula requires the coupled observable to commute with the Hamiltonian, or an appropriate classical limit. For general quantum response use the imaginary-time correlation or spectral Kubo expression in the many-body treatment.

For levels 0,Δ0,\Delta with Δ>0\Delta>0,

Z=1+e−βΔ,U=Δ1+eβΔ,CV=kB(βΔ)2e−βΔ(1+e−βΔ)2.Z=1+e^{-\beta\Delta},\quad U=\frac{\Delta}{1+e^{\beta\Delta}},\quad C_V=k_B(\beta\Delta)^2 \frac{e^{-\beta\Delta}}{(1+e^{-\beta\Delta})^2}.

At low temperature UU and CVC_V vanish; at high temperature U→Δ/2U\to\Delta/2 and S→kBlog⁡2S\to k_B\log2. Shifting both levels by a constant changes UU and FF by that constant but leaves CVC_V, probabilities, and entropy unchanged. This is an excellent numerical invariance check.

At extremely low temperature do not compute e+βΔe^{+\beta\Delta} in the population formula; use the negative-exponent form U=Δe−βΔ/(1+e−βΔ)U=\Delta e^{-\beta\Delta}/(1+e^{-\beta\Delta}).

If omitted states all lie above EcutE_{\rm cut} and their number is at most DmissD_{\rm miss},

Zmiss′≤Dmisse−β(Ecut−E0).Z'_{\rm miss}\leq D_{\rm miss} e^{-\beta(E_{\rm cut}-E_0)}.

A gap to the first omitted state alone is insufficient without controlling the multiplicity. Write the retained partition sum as RR and the displayed upper bound as BB. Then the omitted thermal probability obeys

q=Zmiss′R+Zmiss′≤BR+B.q=\frac{Z'_{\rm miss}}{R+Z'_{\rm miss}} \leq\frac{B}{R+B}.

The complete state decomposes as ρ=(1−q)ρret+qρmiss\rho=(1-q)\rho_{\rm ret}+q\rho_{\rm miss} on orthogonal spectral subspaces. Its trace distance from the normalized retained state is exactly qq. Therefore

∣⟨A⟩−⟨A⟩ret∣≤2∥A∥q,0≤Fret−F≤β−1log⁡(1+B/R).|\langle A\rangle-\langle A\rangle_{\rm ret}| \leq 2\|A\|q,\qquad 0\leq F_{\rm ret}-F \leq\beta^{-1}\log(1+B/R).

Evaluate the last logarithm with a log1p operation when B/RB/R is small. These bounds assume that the retained eigenpairs and the omitted-state threshold are themselves reliable; they do not include eigensolver or energy-estimation errors.

For retained levels 0,10,1 at β=2\beta=2, and at most two omitted states above energy 44, R=1+e−2R=1+e^{-2} and B=2e−8B=2e^{-8}. The bound is q<5.91×10−4q<5.91\times10^{-4}, giving an expectation error below 1.182×10−31.182\times10^{-3} for ∥A∥≤1\|A\|\leq1. This makes the temperature range of a truncated calculation quantitatively assessable.

Sum over all physical symmetry sectors required by the ensemble. A canonical fixed-number calculation and a grand-canonical sum with weights e−β(E−μN)e^{-\beta(E-\mu N)} answer different questions. At high temperature, Tr⁡ρ=1\operatorname{Tr}\rho=1 will hold even for an incorrectly omitted sector; check Z(β=0)=DZ(\beta=0)=D instead.

For larger spaces, finite-temperature Lanczos and stochastic trace methods introduce additional Krylov and sampling errors. They should be benchmarked against complete small-system spectra.

A ground state is gg-fold degenerate and separated by a gap from all other states. What is the zero-temperature entropy of the canonical Gibbs limit?

Solution

The Gibbs state approaches the uniform mixture on the ground-state subspace, so S→kBlog⁡gS\to k_B\log g. Choosing one ground-state eigenvector instead produces a pure state and zero entropy; that is a different limiting preparation. Numerical splitting smaller than the physical resolution can spuriously select one member if the temperature is taken too low first.

  • Jaklič, J., and Prelovšek, P., “Lanczos method for the calculation of finite-temperature quantities in correlated systems,” Physical Review B 49, 5065–5068 (1994), doi:10.1103/PhysRevB.49.5065.
  • Weinberg, P., and Bukov, M., “QuSpin. Part I: spin chains,” SciPost Physics 2, 003 (2017), arXiv:1610.03042 — finite-spectrum calculations.