Skip to content
QFT.org

Search QFT.org

Enter a word or phrase.

    You can also browse the main navigation and chapter contents.

    Canonical Sectors and Density-of-States Methods

    A partition function at imaginary chemical potential is a Fourier generating function for fixed-charge sectors. This can replace continuation of a few derivatives by a global projection, but it introduces two different numerical questions: are there enough Fourier points, and can the small coefficient survive cancellation?

    We will answer both in the compact determinant model, using positive charge sums as an exact reference. Then we will construct an actual constrained density of the determinant phase and recover the same average phase from it. The density is positive; its oscillatory integral can still require far greater absolute accuracy than the density plot suggests.

    Preparation: Phase reweighting and imaginary chemical potential. Charges below are integers in the declared normalization, and z=μ/Tz=\mu/T.

    Project onto an integer charge

    For [H,Q]=0[H,Q]=0, the projector onto charge q∈Zq\in\mathbb Z is

    Πq=12π∫−ππeiα(Q−q) dα.\Pi_q=\frac1{2\pi}\int_{-\pi}^{\pi} e^{i\alpha(Q-q)}\,\mathrm d\alpha.

    Applied to a charge eigenstate, the integral is one if its charge equals qq and zero otherwise. The canonical partition function and its reconstruction are therefore

    Zq=Tr⁡(Πqe−βH)=12π∫−ππe−iqαZ(iα) dα,Z(z)=∑qZqezq.Z_q=\operatorname{Tr}(\Pi_qe^{-\beta H}) =\frac1{2\pi}\int_{-\pi}^{\pi}e^{-iq\alpha}Z(i\alpha)\,\mathrm d\alpha, \qquad Z(z)=\sum_q Z_q e^{zq}.

    For a physical thermal trace, Zq≥0Z_q\geq0. This does not imply that every configuration's determinant Fourier coefficient is positive. Canonical lattice estimators can retain a sign and overlap problem, as described after Eq. (6) in de Forcrand–Kratochvila, §3 (PDF).

    The Fourier interval follows the charge and symmetry conventions. In QCD with quark chemical potential, the center relation gives period 2π/32\pi/3 in α\alpha. A shift of the projection integral then implies Zq=e−2πiq/3ZqZ_q=e^{-2\pi iq/3}Z_q, so only charges divisible by three survive; baryon number is q/3q/3. This selection rule and the canonical projection are given in de Forcrand–Kratochvila, §2, Eq. (2) (PDF). Our toy has period 2π2\pi and no such threefold selection rule.

    At fixed charge, the global charge variance is zero by construction. That is a different ensemble from the grand canonical one, not a vanishing grand canonical susceptibility. Equivalence for local observables requires an appropriate thermodynamic limit and its hypotheses; a finite-volume Fourier identity alone does not establish it.

    An independently calculable canonical distribution

    The common compact model has

    D(θ,z)=(1+hez+iθ)(1+he−z−iθ),dνκ=eκcos⁡θ2πI0(κ) dθ,D(\theta,z)=(1+h e^{z+i\theta})(1+h e^{-z-i\theta}), \qquad \mathrm d\nu_\kappa=\frac{e^{\kappa\cos\theta}}{2\pi I_0(\kappa)}\,\mathrm d\theta, Z1(z)=A+Bcosh⁡z,A=1+h2,B=2hI1(κ)I0(κ).Z_1(z)=A+B\cosh z, \qquad A=1+h^2, \qquad B=2h\frac{I_1(\kappa)}{I_0(\kappa)}.

    Fix h=0.3h=0.3, κ=1\kappa=1 and use NN independent angle integrals. Put s=B/(A+B)s=B/(A+B), p0=1−sp_0=1-s and p1=s/2p_1=s/2. The normalized generating function is

    ZN(z)ZN(0)=[p0+p1(ez+e−z)]N=∑q=−NNPN(q)ezq.\frac{Z_N(z)}{Z_N(0)} =\bigl[p_0+p_1(e^z+e^{-z})\bigr]^N =\sum_{q=-N}^{N}P_N(q)e^{zq}.

    The coefficients PN(q)=ZN,q/ZN(0)P_N(q)=Z_{N,q}/Z_N(0) are positive and sum to one. They can be calculated by repeated positive convolution of the three weights (p1,p0,p1)(p_1,p_0,p_1). They also admit an independent combinatorial expression. If q≥0q\geq0, choose j+qj+q positive charges, jj negative charges and N−2j−qN-2j-q zeros. This gives

    PN(q)=∑j=0⌊(N−∣q∣)/2⌋N! p12j+∣q∣p0N−2j−∣q∣(j+∣q∣)! j! (N−2j−∣q∣)!.P_N(q)=\sum_{j=0}^{\lfloor(N-|q|)/2\rfloor} \frac{N!\,p_1^{2j+|q|}p_0^{N-2j-|q|}} {(j+|q|)!\,j!\,(N-2j-|q|)!}.

    Reflection gives PN(−q)=PN(q)P_N(-q)=P_N(q). The formula is a positive sum, so it does not suffer the oscillatory cancellation of the Fourier projection. It is an efficient oracle because this example factorizes into independent three-valued auxiliary charges; it is not a generic algorithm for interacting gauge fields or a claim about integer microscopic degeneracies.

    At real source the canonical coefficients reconstruct both normalization and charge response:

    Pr⁡z(q)=PN(q)ezq∑rPN(r)ezr,∂zlog⁡ZN=∑qqPr⁡z(q),\Pr_z(q)=\frac{P_N(q)e^{zq}}{\sum_rP_N(r)e^{zr}}, \qquad \partial_z\log Z_N=\sum_q q\Pr_z(q), ∂z2log⁡ZN=∑q(q−⟨Q⟩z)2Pr⁡z(q).\partial_z^2\log Z_N =\sum_q(q-\langle Q\rangle_z)^2\Pr_z(q).

    These finite sums provide the independent mean and variance checks used in the preceding article. Saturation at q=Nq=N is a property of this finite charge range, not a continuum statement about dense QCD.

    Finite Fourier resolution produces an exact alias sum

    For MM equally spaced angles αj=2πj/M\alpha_j=2\pi j/M, define the discrete projection

    P~N,M(q)=1M∑j=0M−1e−iqαj[A+Bcos⁡αjA+B]N.\widetilde P_{N,M}(q)=\frac1M\sum_{j=0}^{M-1} e^{-iq\alpha_j} \left[\frac{A+B\cos\alpha_j}{A+B}\right]^N.

    Insert the exact finite Fourier expansion and use the sum of roots of unity:

    1M∑j=0M−1ei(r−q)αj={1,r−q∈MZ,0,otherwise.\frac1M\sum_{j=0}^{M-1}e^{i(r-q)\alpha_j} =\begin{cases}1,&r-q\in M\mathbb Z,\\0,&\text{otherwise}.\end{cases}

    Thus, in exact arithmetic,

    P~N,M(q)=∑k∈ZPN(q+kM),\widetilde P_{N,M}(q)=\sum_{k\in\mathbb Z}P_N(q+kM),

    where coefficients outside [−N,N][-N,N] are zero. This is an exact description of resolution error. For every sector at once, M≥2N+1M\geq2N+1 is sufficient. For one selected charge, the weaker condition M>N+∣q∣M>N+|q| suffices.

    The distinction is visible at N=32N=32, q=16q=16: M=32M=32 identifies charges 1616 and −16-16, doubling the true coefficient. At q=24q=24, the same grid also receives the much larger coefficient at −8-8. These are not statistical fluctuations or violations of positivity. They are the alias sum requested by the finite grid.

    Adequate resolution does not prevent cancellation

    For M=65M=65 and N=32N=32, there is no aliasing in any allowed sector. Nevertheless, ordinary floating-point projection gives:

    qqPositive coefficient referenceDouble-precision projection
    881.1154881×10−31.1154881\times10^{-3}1.1154881×10−31.1154881\times10^{-3}
    16161.7616405×10−91.7616405\times10^{-9}1.7616403×10−91.7616403\times10^{-9}
    24241.3455061×10−181.3455061\times10^{-18}−1.0589820×10−16-1.0589820\times10^{-16}
    32326.4216730×10−336.4216730\times10^{-33}2.5108121×10−162.5108121\times10^{-16}

    The negative value is an integration result dominated by rounding error, not a negative physical sector. Doubling the grid does not recover the lost digits: at q=24q=24, the 128-point result is about 6.06×10−176.06\times10^{-17}, still far from the reference. Exact arithmetic and sufficient resolution are separate requirements.

    To quantify the cancellation, write GN(α)=ZN(iα)/ZN(0)G_N(\alpha)=Z_N(i\alpha)/Z_N(0). This is positive for every real α\alpha in the toy. The absolute-summation condition number of its continuous Fourier integral is

    Kq=(2π)−1∫∣GN(α)e−iqα∣ dαPN(q)=PN(0)PN(q).\mathcal K_q =\frac{(2\pi)^{-1}\int|G_N(\alpha)e^{-iq\alpha}|\,\mathrm d\alpha} {P_N(q)} =\frac{P_N(0)}{P_N(q)}.

    An absolute error small compared with the typical integrand can be enormous compared with PN(q)P_N(q). For N=64N=64, q=64q=64, the reference coefficient is 4.1237885×10−654.1237885\times10^{-65} and Kq≃2.73×1063\mathcal K_q\simeq2.73\times10^{63}. The adequate 129-point double-precision sum is instead about 1.49×10−161.49\times10^{-16}.

    The retained calculation recomputes the decimal inputs and Bessel functions at 100 and 160 decimal digits. Positive convolution is checked against the multinomial sum; the Fourier sum is checked against the alias formula even on under-resolved grids. At N=64N=64, q=64q=64, 100-digit projection recovers the coefficient with relative error below 2×10−382\times10^{-38}. The 160-digit projection has its own independently recomputed high-precision reference. These are arithmetic checks, not statistical error bars. Precision in coefficient extraction is also a practical issue in the canonical method discussed after Eq. (7) in de Forcrand–Kratochvila, §3 (PDF).

    Construct a constrained density of the phase

    Canonical charge projection and a density-of-states representation reorganize different quantities. For a complex weight w(x)=r(x)eiΦ(x)w(x)=r(x)e^{i\Phi(x)} with r≥0r\geq0, a generalized phase density is

    ρ(s)=∫dx r(x) δ(s−Φ(x)),ZZr=∫ρ(s)eis ds∫ρ(s) ds.\rho(s)=\int\mathrm dx\,r(x)\,\delta(s-\Phi(x)), \qquad \frac{Z}{Z_r}=\frac{\int\rho(s)e^{is}\,\mathrm ds}{\int\rho(s)\,\mathrm ds}.

    This is a positive constrained integral, followed by an oscillatory transform. It is not necessarily a count of energy eigenstates. The construction is given in Langfeld–Lucini, Eqs. (5)–(6) (PDF); their convention writes the real weight as eSRe^{S_R}, whereas an action convention e−SRe^{-S_R} uses the opposite sign for that real exponent.

    We now construct the density explicitly for our compact model. Work at the fixed real source z=2z=2, and let q(z)=∫dνκ∣D∣q(z)=\int\mathrm d\nu_\kappa|D| as in the reweighting article. Use a wrapped phase φ∈[−π,π)\varphi\in[-\pi,\pi) and the periodic delta function, normalized to integrate to one over a period:

    ρ1(φ)=1q(z)∫dνκ(θ) ∣D(θ,z)∣ δ2π(φ−arg⁡D(θ,z)).\rho_1(\varphi) =\frac1{q(z)}\int\mathrm d\nu_\kappa(\theta)\, |D(\theta,z)|\,\delta_{2\pi}(\varphi-\arg D(\theta,z)).

    It is normalized by construction. Wrapping loses no information needed for eiφe^{i\varphi}; it would not preserve arbitrary moments of an unwrapped phase.

    Invert the determinant ellipse

    At positive real zz, define

    C=2hcosh⁡z,S=2hsinh⁡z,D=A+Ccos⁡θ+iSsin⁡θ=Reiφ.C=2h\cosh z,\qquad S=2h\sinh z, \qquad D=A+C\cos\theta+iS\sin\theta=R e^{i\varphi}.

    For z>zc=log⁡(1/h)z>z_c=\log(1/h), C>AC>A and S>0S>0, so this ellipse encloses the origin. The phase winds once as the angle goes around the circle. Differentiating the argument gives

    dφdθ=S(Acos⁡θ+C)R2>0.\frac{\mathrm d\varphi}{\mathrm d\theta} =\frac{S(A\cos\theta+C)}{R^2}>0.

    There is exactly one preimage modulo 2π2\pi. To find it, intersect the ray R(cos⁡φ,sin⁡φ)R(\cos\varphi,\sin\varphi) with the ellipse:

    (Rcos⁡φ−AC)2+(Rsin⁡φS)2=1.\left(\frac{R\cos\varphi-A}{C}\right)^2 +\left(\frac{R\sin\varphi}{S}\right)^2=1.

    Define Hφ=cos⁡2φ/C2+sin⁡2φ/S2H_\varphi=\cos^2\varphi/C^2+\sin^2\varphi/S^2. The positive quadratic root is

    R(φ)=Acos⁡φ/C2+A2cos⁡2φ/C4+Hφ(1−A2/C2)Hφ.R(\varphi)=\frac{A\cos\varphi/C^2+ \sqrt{A^2\cos^2\varphi/C^4+H_\varphi(1-A^2/C^2)}}{H_\varphi}.

    Then

    cos⁡θ=Rcos⁡φ−AC,sin⁡θ=Rsin⁡φS.\cos\theta=\frac{R\cos\varphi-A}{C},\qquad \sin\theta=\frac{R\sin\varphi}{S}.

    The delta-function Jacobian now gives the actual density,

    ρ1(φ)=eκcos⁡θ R32πI0(κ) q(z) S(Acos⁡θ+C).\rho_1(\varphi) =\frac{e^{\kappa\cos\theta}\,R^3} {2\pi I_0(\kappa)\,q(z)\,S(A\cos\theta+C)}.

    Every factor is positive in this regime. This one-preimage formula must not be continued through zcz_c without modification: there is a determinant zero at the boundary, and for smaller positive source the phase map has turning points and multiple preimages. The companion code rejects those inputs.

    Convolve the density and recover the phase

    For independent copies, the total wrapped phase has the circular convolution

    ρN(φ)=∫−ππρN−1(φ−ψ)ρ1(ψ) dψ.\rho_N(\varphi)=\int_{-\pi}^{\pi} \rho_{N-1}(\varphi-\psi)\rho_1(\psi)\,\mathrm d\psi.

    Its Fourier moments multiply:

    ∫−ππρN(φ)eijφ dφ=rjN,rj=⟨eijarg⁡D⟩pq.\int_{-\pi}^{\pi}\rho_N(\varphi)e^{ij\varphi}\,\mathrm d\varphi=r_j^N, \qquad r_j=\langle e^{ij\arg D}\rangle_{\rm pq}.

    This gives an independent target for a numerical density reconstruction. We evaluate the displayed ellipse density on periodic grids of 64 through 2048 points and compute its circular convolutions by discrete Fourier transform for N=1,8,16,32,64N=1,8,16,32,64. No histogram, LLR iteration or Monte Carlo history is involved. The small method works because the one-angle inverse and independence are known.

    The reconstructed densities remain positive. Their normalization errors are below 3×10−143\times10^{-14} without renormalizing them by hand, and their first harmonics agree with the independent angle-integral result within 3×10−163\times10^{-16} in absolute error. A more local check divides φ∈[0,π]\varphi\in[0,\pi] into eight bins: integrating the original angle measure over each inverse image agrees with integrating ρ1\rho_1 over the phase bin within 3×10−173\times10^{-17}.

    At N=64N=64, the exact average phase is 6.1182856193×10−96.1182856193\times10^{-9}. The density is nearly uniform, so that small number is carried by a tiny departure from 1/(2π)1/(2\pi). The 1024-point density integral gives 6.1182855300×10−96.1182855300\times10^{-9}; grid refinements have nonmonotonic absolute differences of order 10−1610^{-16} as roundoff matters. The full density and its first harmonic answer different numerical accuracy questions.

    The constrained phase density approaches a uniform distribution as copy number increases; a separate panel shows double-precision Fourier projection losing tiny positive canonical coefficients.

    Left: the explicit constrained phase density and circular convolutions at z=2z=2, h=0.3h=0.3, κ=1\kappa=1. Right: canonical sectors for N=32N=32 at zero source, comparing the positive reference with a 65-point double-precision projection. This grid has no aliasing. A downward triangle marks the magnitude of a negative numerical result, not a positive coefficient. The two panels concern different positive distributions: phase under the phase-quenched measure, and canonical charge at zero source.

    For an approximate normalized density, the average-phase error obeys

    ∣δaN∣≤∫−ππ∣δρN∣ dφ≤2π∥δρN∥∞.|\delta a_N| \leq\int_{-\pi}^{\pi}|\delta\rho_N|\,\mathrm d\varphi \leq2\pi\|\delta\rho_N\|_\infty.

    Positivity and a visually excellent density plot do not ensure that this bound is small relative to aNa_N. Algorithms that estimate a constrained density must control its absolute errors, correlations and interpolation before performing the oscillatory transform.

    Summary

    Canonical projection converts imaginary-source dependence into fixed-charge coefficients. Exact alias formulas separate finite Fourier resolution from cancellation and numerical precision. A constrained phase density offers a different reorganization: the density is positive, but the final Fourier harmonic can remain exponentially small. Both methods require checking the reconstruction of the quantity sought, not only the apparent quality of intermediate positive data.

    Exercises

    1. The necessary grid for one sector

    For the toy with 0<h<10<h<1 and κ>0\kappa>0, every coefficient in [−N,N][-N,N] is strictly positive. Prove that M>N+∣q∣M>N+|q| is sufficient to project one selected sector qq without aliases, and show why equality can fail. Give a grid that recovers q=0q=0 for N=8N=8 while not resolving all sectors. Explain what goes wrong for the edge sectors if M=2NM=2N.

    Solution

    An alias occurs if another allowed integer rr satisfies r=q+kMr=q+kM with nonzero kk. The largest distance from qq to either endpoint of [−N,N][-N,N] is N+∣q∣N+|q|. If MM exceeds it, even the nearest aliases q±Mq\pm M lie outside the interval, and all more distant aliases do too.

    At equality and q≥0q\geq0, q−M=−Nq-M=-N is an allowed charge; for q≤0q\leq0, q+M=Nq+M=N is allowed. These edge coefficients are positive, so the unwanted term cannot cancel. For N=8N=8, M=9M=9 therefore recovers q=0q=0 exactly, but, for example, sector q=8q=8 is mixed with q=−1q=-1. It is a single-sector result.

    At M=2NM=2N, charges NN and −N-N have the same phase at every sampled angle. The projected edge coefficient is PN(N)+PN(−N)=2PN(N)P_N(N)+P_N(-N)=2P_N(N). One more point removes that ambiguity: M=2N+1M=2N+1 resolves every allowed sector. This is a statement in exact arithmetic; it does not remove roundoff cancellation.

    2. A positive normalized density with a wrong phase

    Take the exact ρ64\rho_{64} at the parameters of the DOS example and perturb it by

    ρ~64(φ)=ρ64(φ)+ϵπcos⁡φ,ϵ=10−8.\widetilde\rho_{64}(\varphi)=\rho_{64}(\varphi)+\frac{\epsilon}{\pi}\cos\varphi, \qquad \epsilon=10^{-8}.

    Show that normalization is unchanged, that the perturbed density remains positive, and that its average phase nevertheless has an order-one relative error. This is a prescribed deterministic perturbation, not simulated noise.

    Solution

    The added cosine integrates to zero, so normalization is preserved. A conservative positive lower bound follows from the one-copy density. Since z>zcz>z_c,

    R=∣(1+hez+iθ)(1+he−z−iθ)∣≥(hez−1)(1−he−z)=C−A.R=|(1+h e^{z+i\theta})(1+h e^{-z-i\theta})| \geq(h e^z-1)(1-h e^{-z})=C-A.

    Also eκcos⁡θ≥e−κe^{\kappa\cos\theta}\geq e^{-\kappa} and Acos⁡θ+C≤A+CA\cos\theta+C\leq A+C. Thus

    ρ1(φ)≥e−κ(C−A)32πI0(κ)qS(A+C)≃0.0035825.\rho_1(\varphi)\geq \frac{e^{-\kappa}(C-A)^3}{2\pi I_0(\kappa)qS(A+C)} \simeq0.0035825.

    Convolving with a normalized positive density preserves any constant lower bound, so it also holds for ρ64\rho_{64}. The perturbation has maximum magnitude ϵ/π≃3.18×10−9\epsilon/\pi\simeq3.18\times10^{-9}, far below that bound.

    But its first harmonic changes by

    ∫−ππϵπcos⁡φ eiφ dφ=ϵ.\int_{-\pi}^{\pi}\frac{\epsilon}{\pi}\cos\varphi\,e^{i\varphi}\,\mathrm d\varphi =\epsilon.

    The phase therefore changes from 6.1183×10−96.1183\times10^{-9} to 1.61183×10−81.61183\times10^{-8}, a relative error of about 1.631.63. A tiny pointwise modification of a positive normalized density can overwhelm its small oscillatory moment. This is the accuracy demand a density-of-states reconstruction must address.

    References

    • P. de Forcrand and S. Kratochvila, “Finite density QCD with a canonical approach,” Nuclear Physics B Proceedings Supplements 153, 62–67 (2006), arXiv:hep-lat/0602024. Section 2 gives fixed-charge projection; §3 explains the estimator's sign/overlap issue and numerical coefficient precision. No ensemble or numerical QCD result from that paper is reused here.
    • K. Langfeld and B. Lucini, “The density of states approach to dense quantum systems,” Physical Review D 90, 094502 (2014), arXiv:1404.7187. Equations (5)–(6) define the generalized density and its oscillatory transform. The wrapped ellipse pushforward here is a separate exact construction, not a run of their LLR method.

    The reproducible source is examples/lattice-hamiltonian/sign-problem/canonical_dos.py, using compact.py, with selected results in canonical-dos-results.json. Positive convolution, a separate multinomial expression, finite-grid alias sums, high-precision Fourier projection, inverse-bin integration and density convolution are all retained. The figure generator is plot_compact.py.

    Scrollable formula. Use Left and Right arrow keys to reveal hidden content.

    Scrollable table. Use Left and Right arrow keys to reveal hidden columns.

    Scrollable figure. Use Left and Right arrow keys to reveal hidden content.