The concern (user-flagged)
Many relations here are stated in the continuum: Brillouin-zone integrals (ChernFromBerryCurvature C = (1/2π)∫Ω), frequency integrals (SpectralSumRule ∫A dω = 1), energy integrals (density of states), the finite-size-scaling forms, the Kubo/multi-time transforms. A many-body calculation (ED, MPS, TPQ) that uses this library to verify its measured quantities works on discrete data: a finite k-mesh, an ω or E grid, a finite system size N.
So each continuum relation needs a discretization contract when consumed:
- BZ integrals → discrete sums with the right measure; the Fukui–Hatsugai–Suzuki
chern_number is already the discrete-exact answer, but ChernFromBerryCurvature takes a supplied continuum flux — document the mesh convention / provide a discrete companion.
- Frequency / energy integrals (sum rules, DOS, KK) → quadrature weight + broadening conventions; finite-η Lorentzian vs delta.
- Derivatives (
∂S/∂E, ∂M/∂h, ∂F/∂T) → finite-difference stencils and their O(h²) error, so check(...; atol=...) is set from the stencil, not guessed.
- Finite-N corrections — ensemble equivalence, TPQ self-averaging (
CanonicalTPQ), and the FSS forms all carry O(1/N) or O(e^{−N}) corrections; the library should expose the expected correction scale so a consumer's tolerance is principled.
What to build (later)
A thin discretization layer: for each continuum relation, a documented discrete evaluation contract (quadrature/measure/stencil) and, where useful, a discrete companion relation whose residual accounts for the leading grid/finite-size correction. Keep the continuum relation as the source of truth; the discrete layer is how a real MPS/ED/TPQ measurement plugs in.
Not blocking the accumulation of continuum relations — this tracks the bridge to the actual measured-data use case.
The concern (user-flagged)
Many relations here are stated in the continuum: Brillouin-zone integrals (
ChernFromBerryCurvatureC = (1/2π)∫Ω), frequency integrals (SpectralSumRule∫A dω = 1), energy integrals (density of states), the finite-size-scaling forms, the Kubo/multi-time transforms. A many-body calculation (ED, MPS, TPQ) that uses this library to verify its measured quantities works on discrete data: a finite k-mesh, an ω or E grid, a finite system size N.So each continuum relation needs a discretization contract when consumed:
chern_numberis already the discrete-exact answer, butChernFromBerryCurvaturetakes a supplied continuum flux — document the mesh convention / provide a discrete companion.∂S/∂E,∂M/∂h,∂F/∂T) → finite-difference stencils and their O(h²) error, socheck(...; atol=...)is set from the stencil, not guessed.CanonicalTPQ), and the FSS forms all carry O(1/N) or O(e^{−N}) corrections; the library should expose the expected correction scale so a consumer's tolerance is principled.What to build (later)
A thin discretization layer: for each continuum relation, a documented discrete evaluation contract (quadrature/measure/stencil) and, where useful, a discrete companion relation whose residual accounts for the leading grid/finite-size correction. Keep the continuum relation as the source of truth; the discrete layer is how a real MPS/ED/TPQ measurement plugs in.
Not blocking the accumulation of continuum relations — this tracks the bridge to the actual measured-data use case.