Skip to content
QFT.org

Search QFT.org

Enter a word or phrase.

    You can also browse the main navigation and chapter contents.

    Pseudofermions and Rational Hybrid Monte Carlo

    A fermion determinant changes the probability of every gauge field. Computing that determinant after every link update is possible on the one-plaquette square, but becomes prohibitive on a large lattice. A pseudofermion replaces the determinant by a Gaussian integral whose action requires linear solves. Rational hybrid Monte Carlo extends this construction to fractional determinant powers.

    The central question is where numerical approximation enters. An approximate molecular-dynamics force can be corrected by an exact acceptance test. An incorrect pseudofermion refresh or acceptance action changes the target measure unless an additional valid correction is supplied. We derive those distinctions and test them on the same square, where direct determinants and quadrature remain available as independent references.

    From a determinant to a Gaussian field

    Let DD be the finite Euclidean Dirac matrix and define Q=D†DQ=D^\dagger D. Assume DD is invertible, so QQ is positive definite. Throughout this article QQ denotes this positive matrix, not topological charge. For a desired weight (det⁡Q)p(\det Q)^p, p>0p>0, introduce an ordinary complex field ϕ\phi with as many components as DD has rows:

    ∫∏j=1MdRe⁡ϕj dIm⁡ϕjπexp⁡[−ϕ†Q−pϕ]=(det⁡Q)p.\int\prod_{j=1}^{M}\frac{d\operatorname{Re}\phi_j\,d\operatorname{Im}\phi_j}{\pi} \exp[-\phi^\dagger Q^{-p}\phi] =(\det Q)^p.

    To see the normalization, diagonalize Q=Udiag⁡(λj)U†Q=U\operatorname{diag}(\lambda_j)U^\dagger. The unitary change of variables preserves the real integration measure, and each complex Gaussian contributes λjp\lambda_j^p. The field is commuting, despite representing a fermion determinant. It is an auxiliary integration variable, not a physical boson.

    For two degenerate flavors with ΓDΓ=D†\Gamma D\Gamma=D^\dagger, the squared real determinant is det⁡Q\det Q, so p=1p=1. For p=1/2p=1/2, the weight is ∣det⁡D∣|\det D|. It equals a one-flavor determinant only when its sign is positive; this representation does not remove a determinant sign or phase problem.

    Draw a unit complex Gaussian η\eta, with Eηη†=1\mathbb E\eta\eta^\dagger=1. The conditional refresh at the current gauge field is

    ϕ=Qp/2η,Eϕϕ†=Qp.\phi=Q^{p/2}\eta, \qquad \mathbb E\phi\phi^\dagger=Q^p.

    For p=1p=1, the cheaper choice ϕ=D†η\phi=D^\dagger\eta has exactly the same covariance and distribution. After this refresh, hold ϕ\phi fixed during the entire trajectory. Refreshing it while taking a force derivative would differentiate a different function. The Gaussian representation and its use in HMC are developed in Kennedy, PDF §2.15, printed pp.19–21.

    A force that includes the inverse matrix

    For one real gauge coordinate θ\theta, write a prime for d/dθd/d\theta. At p=1p=1,

    Spf=ϕ†Q−1ϕ,X=Q−1ϕ.S_{\rm pf}=\phi^\dagger Q^{-1}\phi, \qquad X=Q^{-1}\phi.

    Differentiating Q−1Q=1Q^{-1}Q=1 gives

    Spf′=−X†Q′X,Q′=D′†D+D†D′,Fpf=−Spf′=X†Q′X.S_{\rm pf}'=-X^\dagger Q'X, \qquad Q'=D'^\dagger D+D^\dagger D', \qquad F_{\rm pf}=-S_{\rm pf}'=X^\dagger Q'X.

    Thus a force evaluation consists of a solve and contractions with the local derivative of DD. It does not require an explicit inverse. Gauge covariance provides a check: transforming DD, QQ and ϕ\phi by the same site unitary leaves the action invariant.

    At a fixed gauge field, the conditional noise average is

    EϕFpf=Tr⁡(Q−1Q′)=ddθlog⁡det⁡Q.\mathbb E_\phi F_{\rm pf} =\operatorname{Tr}(Q^{-1}Q') =\frac{d}{d\theta}\log\det Q.

    This identity explains both why the auxiliary force represents the determinant and why an individual refreshed field need not reproduce its smooth exact force. More pseudofermion factors can change force fluctuations, but their extra solves and correlations must also be counted.

    Fractional powers require a matrix derivative

    For f(x)=x−pf(x)=x^{-p}, it is generally wrong to use the scalar derivative f′(Q)Q′f'(Q)Q': QQ and Q′Q' need not commute. In the eigenbasis of QQ, set c=U†ϕc=U^\dagger\phi and B=U†Q′UB=U^\dagger Q'U. Then

    ddθ[ϕ†f(Q)ϕ]=∑ijci∗f[1](λi,λj)Bijcj,\frac{d}{d\theta}\bigl[\phi^\dagger f(Q)\phi\bigr] =\sum_{ij}c_i^*f^{[1]}(\lambda_i,\lambda_j)B_{ij}c_j,

    where the divided difference is

    f[1](x,y)={f(x)−f(y)x−y,x≠y,f′(x),x=y.f^{[1]}(x,y)= \begin{cases} \dfrac{f(x)-f(y)}{x-y},&x\ne y,\\[4pt] f'(x),&x=y. \end{cases}

    One way to derive this is to differentiate a polynomial in QQ: each insertion of Q′Q' between powers contributes to a geometric sum. Analytic functional calculus extends the result to x−px^{-p} on a positive spectral interval. For p=1/2p=1/2, a stable expression valid even for equal eigenvalues is

    f[1](x,y)=−1xy(x+y).f^{[1]}(x,y)=-\frac{1}{\sqrt{x}\sqrt{y}(\sqrt{x}+\sqrt{y})}.

    The companion uses this formula as a dense reference for the rational force. At its test field, ∥[Q,Q′]∥F=27.75\|[Q,Q']\|_F=27.75; the noncommuting qualification is consequential.

    The square supplies a target and a spectral interval

    Use the earlier open 2×22\times2 site square, a=r=1a=r=1, bare Wilson mass m=0.3m=0.3, and Sg=β(1−cos⁡θ)S_g=\beta(1-\cos\theta) with β=0.7\beta=0.7. Three links are one and the right temporal link is eiθe^{i\theta}. This is the site's forward transporter; the forward-neighbor coefficient in a Dirac row contains its conjugate. The imported Wilson matrix has diagonal (m+2)1(m+2)1 even at the open boundary.

    The eight-dimensional determinant is

    det⁡D(θ)=A+Bcos⁡θ,A=(m+2)8+116,B=(m+2)42.\det D(\theta)=A+B\cos\theta, \qquad A=(m+2)^8+\frac1{16}, \qquad B=\frac{(m+2)^4}{2}.

    Here A−B=[(m+2)4−1/4]2>0A-B=[(m+2)^4-1/4]^2>0. Therefore both p=1p=1 and p=1/2p=1/2 have unambiguous positive targets, with angular probability proportional to

    eβcos⁡θ(A+Bcos⁡θ)2p.e^{\beta\cos\theta}(A+B\cos\theta)^{2p}.

    A rational approximation needs an interval valid along the trajectory, not just the eigenvalues of its starting matrix. For this positive-mass, unimproved Wilson operator, such an interval follows directly from its shifts. Let TμT_\mu be the covariant forward shift, unitary with periodic boundaries and a contraction with zero extension beyond an open boundary. Put Pμ±=(1±γμ)/2P_\mu^\pm=(1\pm\gamma_\mu)/2. Then

    D=(m+2)1−∑μ=12(Pμ−Tμ+Pμ+Tμ†).D=(m+2)1-\sum_{\mu=1}^{2} \bigl(P_\mu^-T_\mu+P_\mu^+T_\mu^\dagger\bigr).

    Its Hermitian part is m1+∑μ[1−(Tμ+Tμ†)/2]≥m1m1+\sum_\mu[1-(T_\mu+T_\mu^\dagger)/2]\ge m1. Hence ∥Dv∥≥m∥v∥\|Dv\|\ge m\|v\|. Each parenthesized operator has norm at most one because its two spin projectors have orthogonal ranges and commute with the shifts. Consequently ∥D∥≤m+4\|D\|\le m+4, and for every allowed link configuration,

    spec⁡Q⊂[ℓ,u],ℓ=m2=0.09,u=(m+4)2=18.49.\operatorname{spec}Q\subset[\ell,u], \qquad \ell=m^2=0.09, \qquad u=(m+4)^2=18.49.

    This proof uses m>0m>0 and this particular Wilson action. It is not a bound for arbitrary negative bare mass, a tuned critical action, or an added clover term.

    A rational approximation with positive shifts

    For p=1/2p=1/2, the integral

    x−1/2=1π∫0∞t−1/2x+t dtx^{-1/2}=\frac1\pi\int_0^\infty\frac{t^{-1/2}}{x+t}\,dt

    gives a transparent construction. Substitute t=c(1+z)/(1−z)t=c(1+z)/(1-z) and apply nn-point Gauss–Chebyshev quadrature. With c=ℓuc=\sqrt{\ell u} and zj=cos⁡[(2j−1)π/(2n)]z_j=\cos[(2j-1)\pi/(2n)],

    rn(x)=∑j=1nαjx+bj,αj=2cn(1−zj)>0,bj=c1+zj1−zj>0.r_n(x)=\sum_{j=1}^{n}\frac{\alpha_j}{x+b_j}, \qquad \alpha_j=\frac{2\sqrt c}{n(1-z_j)}>0, \qquad b_j=c\frac{1+z_j}{1-z_j}>0.

    The poles are at −bj-b_j; the shifts bjb_j are positive. Each shifted matrix Q+bjQ+b_j is positive definite. This quadrature approximation is convenient to prove and reproduce; it is not asserted to be the minimax approximation used in an optimized implementation.

    There is an exact scalar error identity. Define q(x)=(x−c)/(x+c)q(x)=(\sqrt{x}-\sqrt c)/(\sqrt{x}+\sqrt c). Expanding the transformed integrand in cosine modes and averaging over the midpoint nodes leaves only modes with frequency 2nk2nk, with alternating signs. Summing that geometric series gives

    x rn(x)=1−q(x)2n1+q(x)2n,max⁡x∈[ℓ,u]∣xrn(x)−1∣≤2q∗2n1+q∗2n,\sqrt{x}\,r_n(x)=\frac{1-q(x)^{2n}}{1+q(x)^{2n}}, \qquad \max_{x\in[\ell,u]}|\sqrt{x}r_n(x)-1| \le\frac{2q_*^{2n}}{1+q_*^{2n}},

    where q∗=(u−c)/(u+c)q_*=(\sqrt u-\sqrt c)/(\sqrt u+\sqrt c). The choice of cc makes the two endpoint magnitudes equal. Spectral calculus gives the same bound for ∥Q1/2rn(Q)−1∥2\|Q^{1/2}r_n(Q)-1\|_2. A sampled scalar error curve alone would not prove this interval bound.

    For Sr=ϕ†rn(Q)ϕS_r=\phi^\dagger r_n(Q)\phi, differentiate each resolvent:

    Xj=(Q+bj)−1ϕ,Fr=∑jαjXj†Q′Xj.X_j=(Q+b_j)^{-1}\phi, \qquad F_r=\sum_j\alpha_jX_j^\dagger Q'X_j.

    The shifts share a Krylov space when their right-hand side and starting residual are compatible; this motivates multishift solvers. Arbitrary preconditioning can destroy that common structure. Our eight-dimensional reference solves each system directly. Partial fractions and the distinct rational approximations in RHMC are discussed in Kennedy, PDF §§3.4–3.7 and 3.10, pp.26–33.

    At θ=0.73\theta=0.73 with the fixed complex Gaussian test vector, the retained calculation gives:

    Terms nnProved scalar relative boundAbsolute action errorAbsolute force error
    42.60×10−22.60\times10^{-2}3.87×10−33.87\times10^{-3}3.52×10−53.52\times10^{-5}
    83.48×10−43.48\times10^{-4}1.22×10−51.22\times10^{-5}1.52×10−61.52\times10^{-6}
    166.04×10−86.04\times10^{-8}1.72×10−101.72\times10^{-10}4.07×10−114.07\times10^{-11}
    321.83×10−151.83\times10^{-15}1.33×10−151.33\times10^{-15}1.60×10−161.60\times10^{-16}

    The last row reaches floating-point precision; its sampled scalar error is 2.00×10−152.00\times10^{-15}. The scalar action bound does not by itself bound its derivative, so the force is checked separately against the divided-difference reference and a centered finite difference. Halving the finite-difference step from 0.020.02 to 0.010.01 and 0.0050.005 reduces the exact fractional-force discrepancy by factors of four. An exact noise-basis sum checks the p=1p=1 average-force identity to 6.3×10−176.3\times10^{-17}.

    Three numerical decisions in an HMC trajectory

    The extended Hamiltonian for this model is

    H(θ,π,ϕ)=π22+Sg(θ)+ϕ†Q(θ)−pϕ.H(\theta,\pi,\phi)=\frac{\pi^2}{2}+S_g(\theta)+\phi^\dagger Q(\theta)^{-p}\phi.

    Refresh ϕ\phi conditionally and π\pi from a real unit Gaussian. A leapfrog trajectory alternates half momentum kicks, full coordinate drifts and another half kick, using π˙=−∂θH\dot\pi=-\partial_\theta H. Follow it by momentum reversal. With fixed coefficients and a deterministic position-dependent force, this proposal is reversible and preserves phase-space volume. Accept it with probability min⁡(1,e−ΔH)\min(1,e^{-\Delta H}); on rejection retain the old gauge field.

    There are three separate accuracy choices:

    StageRequired objectRole of approximation
    RefreshQp/2ηQ^{p/2}\etaSets the conditional distribution of ϕ\phi; a wrong covariance needs a valid correction.
    Molecular dynamicsForce of a chosen approximate actionChanges proposals and acceptance; fixed reversible volume-preserving dynamics can use a cheaper approximation.
    AcceptanceChange in the target extended actionDetermines the invariant measure; a loose approximation here is not cured by calling the update “exact.”

    With an exact refresh and exact target acceptance, the proposal force need not equal the exact target force. Detailed balance follows from the reversible, volume-preserving proposal and the target probability ratio. Ergodicity and numerical reversibility remain separate matters. In large RHMC calculations the refresh and acceptance are themselves approximated to controlled precision or corrected; the required spectral range and solve errors belong to that error budget.

    The example deliberately makes the distinction observable: p=1/2p=1/2 uses an eight-term rational force for molecular dynamics, but diagonalization for the refresh and target acceptance. This is a tiny test of the RHMC construction, not a production implementation. Coefficients are held fixed throughout each trajectory. The ordinary p=1p=1 trajectory at fixed length one has ΔH=1.62×10−4\Delta H=1.62\times10^{-4} for five steps and 4.06×10−54.06\times10^{-5} for ten, showing second-order integration error. In the fractional case, reducing the step size removes integration error but does not remove the difference between the rational and target Hamiltonians. A nonzero limiting target-energy error can therefore remain; the retained scan through forty steps does not resolve such a plateau. Applying each tested momentum-flipped proposal twice returns the initial state within 1.3×10−161.3\times10^{-16}.

    An actual distribution check

    pseudofermions.py imports the existing square and Wilson kernel. For each power it runs eight independent random streams, starting at evenly spaced angles, discards 512 trajectories per stream and retains 4,096, including repetitions from rejection. Every trajectory has five steps of size 0.20.2. The reported uncertainty is the standard deviation of the eight replica means divided by 8\sqrt8.

    WeightObservableExact angular quadratureHMC mean and replica standard error
    p=1p=1cos⁡θ\cos\theta0.34500610.34500610.3497±0.00930.3497\pm0.0093
    p=1p=1cos⁡2θ\cos2\theta0.06199910.06199910.0718±0.00660.0718\pm0.0066
    p=1p=1sin⁡θ\sin\theta000.0119±0.00560.0119\pm0.0056
    p=1/2p=1/2cos⁡θ\cos\theta0.33762450.33762450.3261±0.00740.3261\pm0.0074
    p=1/2p=1/2cos⁡2θ\cos2\theta0.05929440.05929440.0520±0.00520.0520\pm0.0052
    p=1/2p=1/2sin⁡θ\sin\theta000.0007±0.00690.0007\pm0.0069

    Acceptance fractions are 0.99610.9961 and 0.99830.9983. The largest discrepancy is the p=1p=1 sine mean at 2.142.14 estimated replica standard errors. The selected output also retains 128-trajectory block errors and half-run differences; eight replicas give only a rough uncertainty estimate. This small run checks a known distribution at percent-level precision. It does not resolve the small difference between the two determinant weights, prove equilibration, or establish a QCD efficiency gain. See autocorrelation and statistical errors for the next layer of analysis.

    Summary

    Pseudofermions trade a determinant for a positive Gaussian action and repeated solves. Fractional powers require matrix calculus or rational resolvents, with spectral bounds that remain valid throughout the trajectory. The refresh, molecular-dynamics force and acceptance action play different roles: only the last two together define a corrected proposal, and a correct proposal still needs an accurate conditional refresh.

    Exercises

    Recover the determinant force from a noise basis

    For p=1p=1, replace a noise average by the eight vectors ϕj=D†ej\phi_j=D^\dagger e_j, where eje_j is the coordinate basis. Show that the sum, without a factor 1/81/8, of their pseudofermion forces equals the logarithmic derivative of (A+Bcos⁡θ)2(A+B\cos\theta)^2.

    Solution

    The identity ∑jϕjϕj†=D†D=Q\sum_j\phi_j\phi_j^\dagger=D^\dagger D=Q reproduces the covariance of unit complex Gaussian noise. Therefore

    ∑jXj†Q′Xj=Tr⁡(Q−1Q′Q−1Q)=Tr⁡(Q−1Q′)=−2Bsin⁡θA+Bcos⁡θ.\sum_jX_j^\dagger Q'X_j =\operatorname{Tr}(Q^{-1}Q'Q^{-1}Q) =\operatorname{Tr}(Q^{-1}Q') =-\frac{2B\sin\theta}{A+B\cos\theta}.

    Dividing the basis sum by eight would instead give covariance Q/8Q/8. The sign of the logarithmic derivative agrees with Fpf=−Spf′F_{\rm pf}=-S_{\rm pf}', because integrating the auxiliary field produces det⁡Q\det Q in the weight rather than in the action.

    What does an inaccurate refresh sample?

    Suppose a positive rational function rr is used as the exact action Sr=ϕ†r(Q)ϕS_r=\phi^\dagger r(Q)\phi. Find the required heatbath covariance and the determinant after integrating ϕ\phi. Would refreshing ϕ=Qp/2η\phi=Q^{p/2}\eta and then using only SrS_r for acceptance automatically sample (det⁡Q)p(\det Q)^p?

    Solution

    Diagonal Gaussian integration gives

    ∫[dϕ]e−ϕ†r(Q)ϕ=det⁡[r(Q)]−1.\int[d\phi]e^{-\phi^\dagger r(Q)\phi} =\det[r(Q)]^{-1}.

    Its conditional covariance is r(Q)−1r(Q)^{-1}, so one valid refresh is ϕ=r(Q)−1/2η\phi=r(Q)^{-1/2}\eta. Even with that consistent refresh, the resulting gauge weight equals (det⁡Q)p(\det Q)^p only when r(Q)=Q−pr(Q)=Q^{-p} or an additional determinant correction is supplied. Using the target covariance but accepting solely with SrS_r generally makes the two update stages inconsistent with either proposed joint distribution. A small rational error may make the bias small; it does not establish exact invariance. By contrast, using rr only for the reversible molecular-dynamics force and the target action for acceptance is the construction tested above.

    References

    • A. D. Kennedy, “Algorithms for Dynamical Fermions,” arXiv:hep-lat/0607038, revised PDF, §§2.9–2.11 for reversible Monte Carlo proposals, §2.15 for pseudofermions, §2.16 for finite-precision reversibility, and §§3.4–3.10 for rational approximations and RHMC.

    Reproducible calculation: examples/lattice-hamiltonian/lattice-monte-carlo/pseudofermions.py and pseudofermion-results.json, importing the previous chapter's fermions.py and determinants.py. The retained seeds, environment, Gaussian checks, finite differences, trajectory tests and individual replica summaries make the quoted finite-matrix and sampling results reproducible.

    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.