1 Introduction

Disconnected fermion Wick contractions contribute to many physics processes at the forefront of research in particle and nuclear physics: the hadronic contribution to the muon anomalous magnetic moment, \(K\rightarrow \pi \pi \) decays, nucleon form factors, quantum electrodynamics and strong isospin-breaking contributions to hadronic matrix elements, \(\eta '\) propagator to name a few. When computed numerically in lattice Quantum Chromodynamics (QCD) and if the distances between the disconnected pieces are large, their variances are dominated by the vacuum contribution. The latter are well approximated by the product of variances of the connected sub-diagrams the contractions are made of. The recently-proposed multi-level Monte Carlo integration in the presence of fermions [1, 2] is particularly appealing for computing disconnected contractions, since the various sub-diagrams can be computed (essentially) independently from each other, thus making the scaling of the statistical error with the cost of the simulation much more favorable with respect to the standard Monte Carlo integration.

The simplest examples of this kind are the disconnected Wick contractions of fermion bilinear two-point correlation functions, where each single-propagator trace is usually computed by introducing random-noise estimators [3,4,5]. As the action of the auxiliary fields is already factorized, the multi-level integration in the gauge field becomes highly profitable once the variance of each connected sub-diagram is driven by its intrinsic gauge noise. The random-noise contribution, however, is typically orders of magnitude larger than the one due to the gauge field, a fact which calls for more efficient estimators in order to avoid the need of averaging over many random-noise fields with large computational cost.

The aim of this paper is to fill this gap by introducing a new family of stochastic estimators of single-propagator traces which combine the newly introduced split-even estimators with a frequency splitting and a hopping expansion of the quark propagator. We test their efficiency by simulating two-flavour QCD with pions as light as 190 MeV. As a result, depending on the fermion bilinear considered, the cost of computing single-propagator traces is reduced by one to two orders of magnitude or more with respect to the computational needs for standard random-noise estimators. The frequency-splitting estimators can be straightforwardly implemented in any standard Monte Carlo computation of disconnected Wick contractions, as well as directly combined with the newly proposed multi-level integration in the presence of fermions.

In the next section we summarize basic facts about variances of generic disconnected Wick contractions, while those of single-propagator traces are discussed in Sect. 3. The following section is dedicated to introduce stochastic estimators of single-propagator traces of heavy quarks based on a hopping expansion of the propagator, while in Sect. 5 we introduce the split-even estimators for the difference of two single-propagator traces also relevant for the muon anomalous magnetic moment. The frequency-splitting estimators are introduced in Sect. 6, where also the outcomes of their numerical tests are reported. In Sect. 7 we discuss the impact of these findings on two concrete examples of physics applications: the disconnected contributions to the correlator of two electromagnetic currents in the isospin limit relevant for the hadronic contribution to the muon anomalous magnetic moment, and the propagator of the \(\omega \) vector meson. The paper ends with a short section of conclusions and outlook, followed by some appendices where some useful notation and formulas are collected.

2 Variances of disconnected Wick contractions

The connected correlation function of a generic disconnected Wick contraction, made of two sub-diagramsFootnote 1 \(W_0(0)\) and \(W_1(x)\) centered at the origin and in x respectively, can be written as

$$\begin{aligned} \mathcal{C}_{_{W_1 W_0}} = \Big \langle \Big [W_1(x) - \langle W_1(x) \rangle \Big ] \Big [W_0(0) - \langle W_0(0) \rangle \Big ] \Big \rangle , \end{aligned}$$
(2.1)

with its variance given by

$$\begin{aligned} \sigma ^2_{_{\mathcal{C}_{W_1 W_0}}}= & {} \Big \langle \Big [W_1(x) - \langle W_1(x) \rangle \Big ]^2 \Big [W_0(0) - \langle W_0(0) \rangle \Big ]^2 \Big \rangle \nonumber \\&- \mathcal{C}^2_{_{W_1 W_0}}. \end{aligned}$$
(2.2)

For large distances |x|,

$$\begin{aligned} \sigma ^2_{_{\mathcal{C}_{W_1 W_0}}} = \sigma ^2_{_{\mathcal{C}_{W_1}}} \cdot \sigma ^2_{_{\mathcal{C}_{W_0}}}+\cdots , \end{aligned}$$
(2.3)

where

$$\begin{aligned} \sigma ^2_{_{\mathcal{C}_{W_0}}} = \Big \langle \Big [W_0(0) - \langle W_0(0) \rangle \Big ]^2 \Big \rangle \end{aligned}$$
(2.4)

and analogously for \(\sigma ^2_{_{\mathcal{C}_{W_1}}}\), and the dots stand for exponentially sub-leading effects. If the gauge fields in the regions centered at the origin and in x are updated independently in the course of a multi-level Monte Carlo, e.g. Refs. [1, 2], the statistical error of each of the two sub-diagrams \(\mathcal{C}_{W_0}\) and \(\mathcal{C}_{W_1}\) decreases (essentially) proportionally to the inverse of the square root of the cost of the simulation. The overall statistical error on \(\mathcal{C}_{W_1 W_0}\) thus scales with the inverse of the cost rather than with its square root. The above argument can be iterated straightforwardly to multi-disconnected contractions.

Maybe the simplest example of this kind is a disconnected Wick contraction of the correlator of two bilinear operators for which, following Eq. (2.3), the variance is well approximated by the product of variances of two single-propagator trace estimators.

3 Single-propagator traces

The single traces we are interested in are

$$\begin{aligned} t_{_{\Gamma ,r}}(x) = - \frac{a_{_\Gamma }}{a^4} \mathrm{tr}\left[ \Gamma D^{-1}_{m_r}(x,x) \right] , \end{aligned}$$
(3.1)

where \(D_{m_r}\) is the massive Dirac operator with bare quark mass \(m_r\) (for definiteness we adopt the O(a)-improved Wilson–Dirac operator, see Appendix A), a is the lattice spacing, the factor

$$\begin{aligned} a_{_\Gamma } = \left\{ \begin{array}{ll} 1 &{}\quad \Gamma =I, \gamma _5, \gamma _\mu \gamma _5,\sigma _{\mu \nu }\\ -i &{}\quad \Gamma =\gamma _\mu \\ \end{array}\right. \end{aligned}$$
(3.2)

is chosen so that \(t_{_{\Gamma ,r}}(x)\) is real, and \(\sigma _{\mu \nu }=\frac{i}{2}[\gamma _\mu ,\gamma _\nu ]\). We are interested in the zero three-momentum fieldFootnote 2

$$\begin{aligned} {\bar{t}}_{_{\Gamma ,r}}(x_0) = \frac{1}{L^3} \sum _\mathbf{x} a^3\, t_{_{\Gamma ,r}}(x), \end{aligned}$$
(3.3)

whose expectation value is

$$\begin{aligned} s_{_{\Gamma ,r}} = \langle {\bar{t}}_{_{\Gamma ,r}}(x_0) \rangle = a_{_\Gamma } \langle {{\bar{\psi }}}_r(x) \Gamma \psi _r(x) \rangle , \end{aligned}$$
(3.4)

where \(\psi _r\) is a quark flavour of mass \(m_r\), and \(L^3\) is the three-dimensional lattice volume. The variance of \({\bar{t}}_{_{\Gamma ,r}}(x_0)\),

$$\begin{aligned} \sigma ^2_{{\bar{t}}_{_{\Gamma ,r}}} = \langle {\bar{t}}^2_{_{\Gamma ,r}}(x_0)\rangle - \langle {\bar{t}}_{_{\Gamma ,r}}(x_0)\rangle ^2, \end{aligned}$$
(3.5)

can be written as

$$\begin{aligned} \sigma ^2_{{\bar{t}}{_{\Gamma ,r}}} = \frac{a^2_{_\Gamma }}{L^3} \sum _\mathbf{x} a^3 \langle O_{_{\Gamma , rr}}(0,\mathbf{x})\, O_{_{\Gamma , r'r'}}(0)\rangle _c, \end{aligned}$$
(3.6)

where

$$\begin{aligned} O_{_{\Gamma , rs}}(x) = {{\bar{\psi }}}_r(x) \Gamma \psi _s(x), \end{aligned}$$
(3.7)

the subscript c stands as usual for connected, and \(\psi _{r'}\) is a second flavourFootnote 3 of mass \(m_{r'}=m_{r}\). The operator product expansion would predict generically that \(\sigma ^2_{{\bar{t}}{_{\Gamma ,r}}}\) diverges as \(a^{-3}\). There are exceptions, however, depending on the symmetries preserved by the regularization and on the operator implementedFootnote 4. Moreover \(\sigma ^2_{{\bar{t}}{_{\Gamma ,r}}}\) vanishes in the free-theory limit \(g_0\rightarrow 0\), and the first non-zero contribution appears at \(O(g_0^4)\) or higher in perturbation theory.

3.1 Random-noise estimator

We introduce random auxiliary fields (random sources) [3, 5] defined so that all their cumulants are null with the exception of the two-point functions which satisfy

$$\begin{aligned} \langle \eta ^a_\gamma (x) \{\eta ^{b}_\delta (y)\}^* \rangle = \delta ^{ab} \delta _{\gamma \delta } \delta _{x y}, \end{aligned}$$
(3.8)

where ab and \(\gamma ,\delta \) are colour and spin indices respectively, and xy are lattice coordinates. By using Eq. (3.8), it is straightforward to prove that a random-noise estimator of \(s_{_{\Gamma ,r}}\) is given by

$$\begin{aligned} \tau _{_{\Gamma ,r}}(x) = -\frac{1}{a^4 N_s} \sum _{i=1}^{N_s} \mathrm{Re} \left[ a_{_\Gamma } \eta ^\dagger _i(x) \Gamma \{D^{-1}_{m_r}\eta _i\}(x)\right] , \end{aligned}$$
(3.9)

where \(\eta _i\) are \(N_s\) independent sources (colour and spin indices omitted from now on). The variance of the zero-momentum estimator

$$\begin{aligned} {{\bar{\tau }}}_{_{\Gamma ,r}}(x_0) = \frac{1}{L^3} \sum _\mathbf{x} a^3\, \tau _{_{\Gamma ,r}}(x), \end{aligned}$$
(3.10)

reads

$$\begin{aligned} \sigma ^2_{{{\bar{\tau }}}_{_{\Gamma ,r}}}= & {} \sigma ^2_{{\bar{t}}_{_{\Gamma ,r}}} - \frac{1}{2 L^3 N_s}\left\{ a_{_\Gamma }^2 \sum _\mathbf{x} a^3 \left\langle O_{_{\Gamma , rr'}} (0,\mathbf{x}) O_{_{\Gamma , r'r}} (0) \right\rangle \right. \nonumber \\&\left. + \frac{1}{a} \sum _x a^4 \left\langle P_{rr'} (x) P_{r'r} (0) \right\rangle \right\} , \end{aligned}$$
(3.11)

where again \(\psi _r\) and \(\psi _{r'}\) are two degenerate flavours of mass \(m_r\), and to simplify the notation we have introduced the usual definition \(P_{rs}=O_{_{\gamma _5, rs}}\) for the pseudoscalar density (no time-dilution is used since we are interested in the estimator at all times). The random-noise contribution to the variances in Eq. (3.11) diverges proportionally to \(a^{-3}\) like the gauge one. Both integrated correlators on the r.h.s. of Eq. (3.11), however, are colour enhanced with respect to the gauge noise and they are of O(1) in the free theory, see Appendix B. The \(\Gamma \)-dependent contribution is indeed the flavour-connected counterpart of the disconnected contraction appearing in Eq. (3.6). The \(\Gamma \)-independent term \(\langle PP \rangle \), which is also integrated over the time-coordinate, diverges proportionally to \(m_r^{-1}\) when \(m_r \rightarrow 0\) due to the pion pole, giving large contributions to the stochastic variances of all bilinears indistinctly. It is interesting to notice that if we would not take the real part in Eq. (3.9), the variances would be larger and \(\Gamma \)-independent since the \(\langle O_{_{\Gamma , rr'}} O_{_{\Gamma , r'r}}\rangle \) contributions are dropped, and the prefactor \(1/(2N_s)\) goes into \(1/N_s\).

The random-noise contributions to the variances of the standard stochastic estimators in Eq. (3.9) are thus expected to be much larger than the gauge-noise with large ultraviolet and infrared divergent terms.

Table 1 Overview of the ensembles and statistics used in this study. We give the label, the spatial extent of the lattice, the hopping parameter \(\kappa \), the number of MDUs simulated after thermalization, the number of independent configurations selected \(N_{\mathrm{cfg}}\), the pion mass \(M_\pi \), and the product \(M_\pi L\). For F7, \(N_{\mathrm{cfg}}=100\) configurations have been used for estimating the variances while the final results for the two-point functions have been obtained with \(N_{\mathrm{cfg}}=1200\)

3.2 Numerical tests

To test the efficiency of the various stochastic trace estimators considered in this paper, we have simulated QCD with two dynamical flavours discretized by the Wilson gluonic action and the O(a)-improved Wilson–Dirac operator as defined in Appendix A. The details of the ensembles of configurations considered, all generated by the CLS community [7,8,9], are listed in Table 1. The bare coupling constant is always fixed so that \(\beta =6/g_0^2=5.3\), corresponding to a spacing of \(\;a=0.065\) fm. All lattices have a size of \(2L \times L^3\), periodic boundary conditions for gluons, (anti-) periodic boundary conditions in (time) space directions for fermions, and spatial dimensions always large enough so that \(M_\pi L\ge 4\). The pion mass ranges from 190 to 440 MeV. We have always skipped an enough number of molecular dynamics units (MDU) between two consecutive measurements so that gauge-field configurations can be considered as independent in the statistical analysis, see Refs. [9, 10] and references therein for more details.

Fig. 1
figure 1

Variances of the standard random noise estimators defined in Eq. (3.9) as a function of the number of random sources \(N_s\) for the ensemble F7. The symbols S, P, \(T_{jk}\), \(A_k\) and \(V_k\) stand for \(\Gamma =I\), \(\gamma _5\), \(\sigma _{jk}\), \(\gamma _k\gamma _5\) and \(\gamma _k\) respectively. The dashed lines indicate the gauge-noise contributions to the variances computed in Sect. 6

The first primary observables that we have computed are the estimators in Eq. (3.10) with Gaussian random noise. Their variances are shown in Fig. 1 as a function of the number of random-noise sources \(N_s\) for the ensemble F7. Data for the E5 and the G8 lattices show the same qualitative behaviour. Variances go down linearly in \(1/N_s\) until the random-noise contribution becomes negligible, see Eq. (3.11), after which a plateau corresponds to the gauge noise (dashed lines). The first clear message from the data is that the random-noise contribution to the variances is comparable for the various bilinears, as suggested by Eq. (3.11), and it is orders of magnitude larger than the gauge noise. Moreover, the latter can vary by orders of magnitude among the various bilinears, see Sect. 6, with the densities having the largest gauge noise while the currents the smallest one.

4 Hopping expansion of single-propagator traces

To investigate the contribution to trace variances from high-frequency modes of the quark propagator, we first consider single-propagator traces of heavy quarks. In this kinematic regime the hopping expansion (HPE) is known to lead to a significant reduction of the random-noise contribution to trace variances [11,12,13]. For the O(a)-improved Wilson-Dirac operator, it is natural to exploit the even-odd decomposition to generalize the hopping parameter expansion [14] to

$$\begin{aligned} D_m^{-1} = M_{2n,m} + D_m^{-1} H^{2n}_m, \end{aligned}$$
(4.1)

where

$$\begin{aligned} M_{2n,m}= & {} \frac{1}{D_{\mathrm{ee}} + D_{\mathrm{oo}}} \sum _{k=0}^{2n-1} H^k_m,\nonumber \\ H_m= & {} -\left[ D_{\mathrm{eo}} D_{\mathrm{oo}}^{-1} + D_{\mathrm{oe}} D_{\mathrm{ee}}^{-1} \right] , \end{aligned}$$
(4.2)

and the subscript m has been omitted in the block matrices of the even-odd decomposition of the Dirac operator, see Appendix A for further details. The zero three-momentum single-propagator traces in Eq. (3.3) can thus be decomposed as

$$\begin{aligned} {\bar{t}}_{_{\Gamma ,r}}(x_0) = {\bar{t}}^{M}_{_{\Gamma ,r}}(x_0) + {\bar{t}}^{R}_{_{\Gamma ,r}}(x_0), \end{aligned}$$
(4.3)

where

$$\begin{aligned} {\bar{t}}^{M}_{_{\Gamma ,r}}(x_0) = - \frac{a_{_\Gamma }}{a L^3} \sum _\mathbf{x} \mathrm{tr}[\Gamma M_{2n,m_r}(x,x)], \end{aligned}$$
(4.4)

collects the first 2n contributions of the HPE while

$$\begin{aligned} {\bar{t}}^{R}_{_{\Gamma ,r}}(x_0) = - \frac{a_{_\Gamma }}{a L^3} \sum _\mathbf{x} \mathrm{tr}\left[ \Gamma \left\{ D_{m_r}^{-1} H^{2n}_{m_r} \right\} (x,x)\right] \end{aligned}$$
(4.5)

is the remainder. Notice that convergence of the expansion is not required for Eq. (4.3) to be valid. For small n, \({\bar{t}}^{M}_{_{\Gamma ,r}}\) can be computed exactly and efficiently with \(24\, n^4\) applications of \(M_{2n,m_r}\), see Appendix C for more details. The second contribution \({\bar{t}}^{R}_{_{\Gamma ,r}}\) can be replaced by the noisy estimator

$$\begin{aligned} {{\bar{\tau }}}^{R}_{_{\Gamma ,r}}(x_0) = - \frac{1}{a L^3 N_s} \sum _\mathbf{x} \sum _{i=1}^{N_s} \mathrm{Re}\left\{ a_{_\Gamma }\big [\eta _{i}^{\dagger } H^{n}_{m_r}\big ](x)\, \Gamma \, \big [D_{m_r}^{-1} H^{n}_{m_r} \eta _i\big ](x) \right\} .\nonumber \\ \end{aligned}$$
(4.6)

A rough idea of the variance reduction achieved by the HPE can be obtained in the free lattice theory, see Appendix B. For a bare subtracted quark mass of \(am_q=0.3\) and for \(n=2\), the stochastic variances of the remainder \({{\bar{\tau }}}^{R}_{_{\Gamma ,r}}\) are between one and two orders of magnitude smaller than those of the standard estimators \({{\bar{\tau }}}_{_{\Gamma ,r}}\). For \(n=4\) a further reduction of approximately 4–8, depending on the bilinear, is obtained. If we had defined the estimator of the remainder by applying \(H^{2n}_{m_r}\) to one source only, the variance in the free case would increase approximately by a factor 2 or so. The ultraviolet filtering of \(H^n_{m_r}\) on both random sources is thus beneficial with respect to applying \(H^{2n}_{m_r}\) to one source only.

Fig. 2
figure 2

Variances of the random-noise estimators \(\tau ^{R}_{_{\Gamma ,r}}\) (remainder, open blue symbols) for the pseudoscalar density (left) and the vector current (right) as a function of the number of random sources \(N_s\) for the ensemble F7, \(n=2\), and a bare quark mass of \(a m_{q,r}=0.3\). For comparison the variances of the standard random noise estimators (filled red symbols) and the gauge noise of \({\bar{t}}^{M}_{_{\Gamma ,r}}\) (hopping, dashed red lines) for the same mass are also shown

Fig. 3
figure 3

Variances for \(N_s=1\) of the random-noise estimators \(\tau ^{R}_{_{\Gamma ,r}}\) (remainder, open blue symbols) for the pseudoscalar density (left) and the vector current (right) as a function of the bare quark mass \(a m_q\) for the ensemble F7 and \(n=2\). For comparison the variances of the standard random noise estimators (filled red symbols) and the gauge noise of \({\bar{t}}^{M}_{_{\Gamma ,r}}\) (hopping, line symbols) for the same mass are also shown

4.1 Numerical tests

We have computed the single-propagator trace estimators \({{\bar{\tau }}}_{_{\Gamma ,r}}\), \({\bar{t}}^{M}_{_{\Gamma ,r}}\) and \({{\bar{\tau }}}^{R}_{_{\Gamma ,r}}\) for \(n=2\) on all ensembles listed in Table 1 for several valence quark masses. For F7 and for the subtracted bare quark mass \(a m_{q,r}=0.3\), the variances are shown in Fig. 2 for the pseudoscalar density and for a spatial component of the vector current respectively. Similar results are obtained for other bilinears and/or for the E5 and the G8 lattices. Furthermore, the variances are in the same ballpark as the free theory values computed using the results of Appendix B.3.

A clear picture emerges: the bulk of the random-noise contribution to \(\sigma ^2_{{{\bar{\tau }}}{_{\Gamma ,r}}}\) is due to \(M_{2n,m_r}\) for all bilinears. Once the latter is subtracted from the propagator and its contribution to \({\bar{t}}{_{_{\Gamma ,r}}}\) is computed exactly, the random noise is reduced by approximately one order of magnitude or more. Notice that \(\sigma ^2_{{\bar{t}}^{M}_{_{\Gamma ,r}}}\) is from 2 (pseudoscalar) up to 5 (vector) orders of magnitude smaller than \(\sigma ^2_{{{\bar{\tau }}}{_{\Gamma ,r}}}\) for \(N_s=1\).

In Fig. 3, \(\sigma ^2_{{{\bar{\tau }}}^{R}_{_{\Gamma ,r}}}\) for \(N_s=1\) and \(\sigma ^2_{{\bar{t}}^{M}_{_{\Gamma ,r}}}\) multiplied by 10 both for \(n=2\) are shown as a function of the valence bare subtracted quark mass \(am_{q,r}\) for the pseudoscalar density and the spatial component of the vector current. As expected the variance reduction due to the subtraction of \(M_{2n,m_r}\) gets larger and larger at heavier quark masses. In particular at \(am_{q,r}=0.3\) the variance of the remainder is approximately one order of magnitude smaller than at the sea quark mass value of \(am_{q,r}=0.00207\). It is worth noting that even at this light mass, the random-noise contribution to \(\sigma ^2_{{{\bar{\tau }}}{_{\Gamma ,r}}}\) from \(M_{2n,m_r}\) is still significant for all bilinears. The variance reduction due to HPE, however, is only a factor 2 or so.

All in all data suggest that at heavy masses an efficient estimator of \(s_{_{_{\Gamma ,r}}}\) is obtained by computing \({\bar{t}}^{M}_{_{\Gamma ,r}}\) exactly and the remainder via the stochastic estimator \({{\bar{\tau }}}^{R}_{_{\Gamma ,r}}\). Which is the optimal order n and how many random sources \(N_s\) are required for the remainder depend on the bilinear considered and on the final target observable of interest, see Sect. 6.

5 Differences of single-propagator traces

To analyse the contribution to trace variances from low-frequency modes of the quark propagator, we consider the difference of two single-propagator traces with different masses. It is worth noting, however, that often the difference itself is a sub-diagram of the correlator of interest, e.g. the disconnected contribution to the hadronic vacuum polarization from the up, down and strange quarks in the exact isospin limit. The estimator of the difference of two single-propagator traces reads

$$\begin{aligned} t_{_{\Gamma ,rs}}(x)\equiv & {} t_{_{\Gamma ,r}}(x) - t_{_{\Gamma ,s}}(x)\nonumber \\= & {} - \frac{a_{_\Gamma }}{a^4} \mathrm{tr}\left[ \Gamma \{D^{-1}_{m_r}(x,x) - D^{-1}_{m_s}(x,x)\}\right] \nonumber \\= & {} - \frac{a_{_\Gamma }}{a^4} (m_s-m_r) \mathrm{tr}\left[ \Gamma D^{-1}_{m_r} D^{-1}_{m_s}(x,x) \right] , \end{aligned}$$
(5.1)

where \(m_r\ne m_s\). Its expectation value can be written as

$$\begin{aligned} s_{_{\Gamma ,rs}}\equiv & {} s_{_{\Gamma ,r}} - s_{_{\Gamma ,s}} = a_{_\Gamma }\left\{ \langle O_{_{\Gamma , rr}} (x)\rangle - \langle O_{_{\Gamma , ss}} (x)\rangle \right\} \nonumber \\= & {} a_{_\Gamma }\, (m_s-m_r) \sum _y a^4 \langle S_{rs}(y)\, O_{{\Gamma , sr}} (x)) \rangle , \end{aligned}$$
(5.2)

where, to simplify the notation, we have introduced the usual notation \(S_{rs}=O_{_{I, rs}}\) for the scalar density. If we define the zero three-momentum field as

$$\begin{aligned} {\bar{t}}_{_{\Gamma ,rs}}(x_0) = \frac{1}{L^3} \sum _\mathbf{x} a^3\, t_{_{\Gamma ,rs}}(x), \end{aligned}$$
(5.3)

its variance is given by

$$\begin{aligned} \sigma ^2_{{\bar{t}}_{_{\Gamma ,rs}}}= & {} \frac{a^2_{_\Gamma }}{L^3} (m_s-m_r)^2 \nonumber \\&\times \sum _{y_1,\mathbf{y_2},y_3} a^{11} \langle S_{rs}(y_1)\, O_{_{\Gamma , sr}} (0,\mathbf{y_2}) S_{s'r'}(y_3)\, O_{_{\Gamma , r's'}}(0) \rangle _c,\nonumber \\ \end{aligned}$$
(5.4)

where two extra valence fermions \(\psi _{r'}\) and \(\psi _{s'}\), with masses \(m_{r'}=m_{r}\) and \(m_{s'}=m_{s}\) respectively, are introduced if not already present in the theory. This time the operator product expansion generically predicts that \(\sigma ^2_{{\bar{t}}_{_{\Gamma ,rs}}}\) diverges as \(a^{-1}\), i.e. two powers less than in Eq. (3.6) thanks to the presence of the squared-mass difference in the prefactor. Analogously to Sect. 3, there are exceptions depending on the symmetries preserved by the regularization and on the discretization chosen for the operator, and \(\sigma ^2_{{\bar{t}}_{_{\Gamma ,rs}}}\) vanishes in the free-theory limit with the first non-zero contribution appearing at \(O(g_0^4)\) or higher in perturbation theory.

5.1 Standard random-noise estimator

Maybe the simplest random-noise estimator of \(s_{_{\Gamma ,rs}}\) is

$$\begin{aligned} \theta _{_{\Gamma ,rs}}(x)= & {} -\frac{(m_s-m_r)}{a^4 N_s} \sum _{i=1}^{N_s} \mathrm{Re} \nonumber \\&\times \left[ a_{_\Gamma }\eta ^\dagger _i(x) \Gamma \{D^{-1}_{m_r}D^{-1}_{m_s}\eta _i\}(x)\right] , \end{aligned}$$
(5.5)

where the variance of its zero three-momentum counterpart

$$\begin{aligned} {{\bar{\theta }}}{_{{_\Gamma ,rs}}}(x_0) = \frac{1}{L^3} \sum _\mathbf{x} a^3\, \theta _{_{\Gamma ,rs}}(x) \end{aligned}$$
(5.6)

is

$$\begin{aligned} \sigma ^2_{{{\bar{\theta }}}_{_{\Gamma ,rs}}}= & {} \sigma ^2_{{\bar{t}}_{_{\Gamma ,rs}}} - \frac{(m_s-m_r)^2}{2 L^3 N_s}\nonumber \\&\times \left\{ a_{_\Gamma }^2\sum _{y_1,\mathbf{y_2},y_3} a^{11} \left\langle S_{rs}(y_1) O_{_{\Gamma , ss'}} (0,\mathbf{y_2}) S_{s'r'}(y_3) O_{_{\Gamma , r'r}} (0) \right\rangle \right. \nonumber \\&\left. +\,\frac{1}{a} \sum _{y_1,y_2,y_3} a^{12} \left\langle S_{rs}(y_1) P_{ss'} (y_2) S_{s'r'}(y_3) P_{r'r} (0) \right\rangle \phantom {\int ^{\int ^{\int }}}\right\} . \nonumber \\ \end{aligned}$$
(5.7)

Generically the random-noise contribution on the r.h.s of (5.7) diverges proportionally to \(a^{-1}\) like the gauge variance. The \(\Gamma \)-independent contribution \(\langle S P S P \rangle \) is one of the spectral sums introduced in Ref. [15]. It is integrated over one time-coordinate more with respect to the first term, and it gives large contributions to the stochastic variances of all bilinears indistinctly. If we would not take the real part in Eq. (5.5), the variances would be larger and \(\Gamma \)-independent since the \(\langle S O S O\rangle \) contributions are dropped, and the prefactor \(1/(2N_s)\) goes into \(1{/}N_s\).

Fig. 4
figure 4

Variances of the standard \(\theta _{_{\Gamma ,rs}}\) (filled red symbols) and the split-even \(\tau _{_{\Gamma ,rs}}\) (open blue symbols) estimators for differences of single-propagator traces for the pseudoscalar density (left) and the vector current (right) as a function of the number of random sources \(N_s\) for the ensemble F7 and for the bare quark masses \(am_{q,r}=0.00207\) and \(am_{q,s}=0.0189\) corresponding to the sea and approximately the strange quark masses

5.2 Split-even random-noise estimator

An alternative random-noise estimator of the difference of two traces is

$$\begin{aligned} \tau _{_{\Gamma ,rs}}(x)= & {} -\frac{(m_s-m_r)}{a^4 N_s} \sum _{i=1}^{N_s} \mathrm{Re}\nonumber \\&\times \left[ a_{_\Gamma } \{\eta ^\dagger _i D^{-1}_{m_r}\}(x)\, \Gamma \, \{D^{-1}_{m_s}\eta _i\}(x)\right] . \end{aligned}$$
(5.8)

The corresponding zero three-momentum field is

$$\begin{aligned} {{\bar{\tau }}}_{_{\Gamma ,rs}}(x_0) = \frac{1}{L^3} \sum _\mathbf{x} a^3\, \tau _{_{\Gamma ,rs}}(x)\; , \end{aligned}$$
(5.9)

and its variance reads

$$\begin{aligned} \sigma ^2_{{{\bar{\tau }}}_{_{\Gamma ,rs}}}= & {} \sigma ^2_{{\bar{t}}_{_{\Gamma ,rs}}} - \frac{a_{_\Gamma }^2 (m_s-m_r)^2}{2 L^3 N_s}\nonumber \\&\times \sum _{y_1,\mathbf{y_2},y_3} a^{11} \Big \{ \big \langle S_{rs}(y_1)\, O_{_{\Gamma , ss'}}(0,\mathbf{y_2})\, S_{s'r'}(y_3) \, O_{_{\Gamma , r'r}} (0) \big \rangle \nonumber \\&+ \,\big \langle P_{rr'}(y_1)\, O_{_{\Gamma , r's'}}(0,\mathbf{y_2})\, P_{s's}(y_3) \, O_{_{\Gamma , sr}} (0) \big \rangle \Big \} \end{aligned}$$
(5.10)

where again two extra valence fermion fields \(\psi _{r'}\) and \(\psi _{s'}\) with masses \(m_{r'}=m_{r}\) and \(m_{s}=m_{s'}\) are introduced if not already present in the theory. Also this time the operator product expansion predicts generically that \(\sigma ^2_{{{\bar{\tau }}}_{_{\Gamma ,rs}}}\) diverges as \(a^{-1}\), but with respect to the standard random-noise estimator the (large) \(\Gamma \)-independent spectral sum \(\langle SPSP\rangle \) is absent. The first four-point correlation function on the r.h.s. of Eq. (5.10) is the flavour-connected counterpart of the disconnected contraction appearing in Eq. (5.4), the second is analogous but with scalar densities replaced by the pseudoscalar ones and two flavour indices exchanged. Both integrated correlators on the r.h.s. of Eq. (5.10) are colour enhanced with respect to the gauge noise and they are of O(1) in the free theory, see Appendix B.

The random-noise contributions to the variances of the split-even estimators in Eq. (5.9) are thus expected to be significantly smaller than for the standard estimatorsFootnote 5 of differences of single-propagator traces. This is not surprising since in this case both sources, \(\eta _i\) and \(\eta _i^\dagger \), are ultraviolet filtered by a quark propagator and the variance has one integral less in the time-coordinate analogously to the case of time-diluted sources.Footnote 6 With respect to the gauge variance, however, the random-noise contribution is still expected to be larger.

5.3 Numerical tests

We have computed the two random-noise estimators in Eqs. (5.6) and (5.9) on all ensembles listed in Table 1 and for several pairs of quark masses. For F7 and for the bare valence masses \(am_{q,r}=0.00207\) and \(am_{q,s}=0.0189\), corresponding to the sea and approximately the strange quark masses [9, 16], the variances are shown in Fig. 4 for the pseudoscalar density and for one spatial component of the vector current. The variance of the standard estimators \(\sigma ^2_{{{\bar{\theta }}}_{_{\Gamma ,rs}}}\) (red filled symbols) turns out to be essentially \(\Gamma \)-independent as suggested by Eq. (5.7), and it is dominated by the spectral sum \(\langle SPSP\rangle \). The split-even estimators \({{\bar{\tau }}}_{_{\Gamma ,rs}}(x_0)\) have much smaller variances.Footnote 7 The reduction factor ranges from approximately one order of magnitude for the scalar and pseudoscalar densities up to around two orders of magnitude or more for the axial and vector currents as well as for the tensor bilinear. A similar reduction in the variance using the split-even estimator is observed for ensembles with different sea-quark masses, see Fig. 9 in Appendix D for the analogous figures for the E5 and G8 ensembles. The gauge noise is still smaller than the random noise, but with the split-even estimator the number \(N_s\) of random sources needed to approach the gauge noise is moderate. It ranges from a few for the pseudoscalar density up to O(100) for the vector current.

Considering that the estimators have the same cost per noise source, the data show that the split-even random-noise estimator is much more efficient than the standard one for computing differences of single-propagator traces, and it allows one to approach the gauge noise for all bilinears with a moderate number of noisy sources.

Table 2 The total cost of one evaluation of the FS estimator normalized to the cost of one evaluation of the standard estimator, for examples of the FS estimators on all ensembles. The cost of the split-even components, \(\tau _{_{\Gamma ,r_kr_{k+1}}}\), is defined as the time for the two required inversions per source, while the cost of the remainder, \(\tau ^{_R}_{_{\Gamma ,r_m}}\), is the single inversion required per source. The standard estimator requires one inversion at the sea-quark mass \(m_{q,r_0}\) per source. The relative cost of each component is given with the number of times it is evaluated for each full evaluation of the FS estimator, along with the bare subtracted quark masses which define the estimator. Note that the overhead required to compute the exact hopping terms is not included, which is performed only once per configuration. For \(n=2\) HPE this quickly becomes negligible when the FS estimator is evaluated multiple times
Fig. 5
figure 5

Variances of the two frequency-splitting estimators FS1 and FS2 (see the main text for explanations) for the pseudoscalar density (left) and the vector current (right) for the ensemble F7 and for the target mass \(am_q=0.00207\) corresponding to the sea quark mass. On the horizontal axis, \(N_s\) is the number of times the frequency-splitting estimator is evaluated and averaged over for each gauge configuration. For comparison the variances of the standard random-noise estimators (filled red symbols) are also shown, where in this case \(N_s\) coincides with the number of random sources processed and averaged over for each gauge configuration. Each evaluation of the FS1 and FS2 estimators cost approximately 2.5 and 6 times the standard one respectively, see Table 2 for details. In the right plot, the continuum line represents the linear term of a linear fit in \(1/N_s\) of the points, while the dashed line is the constant term corresponding to the gauge noise

6 Frequency-splitting of single-propagator traces

The results of the last two sections suggest to introduce a family of frequency-splitting random-noise estimators of single-propagator zero three-momentum traces defined as

$$\begin{aligned} {{\bar{\tau }}}^{\mathrm{fs}}_{_{\Gamma ,r_1}}(x_0) = {\bar{t}}^{M}_{_{\Gamma ,r_m}}(x_0) + {{\bar{\tau }}}^{R}_{_{\Gamma ,r_m}}(x_0) + \sum _{k=1}^{m-1} {{\bar{\tau }}}_{_{\Gamma ,r_k r_{k+1}}}(x_0) \end{aligned}$$
(6.1)

where \({\bar{t}}^{M}_{_{\Gamma ,r_m}}\), \({{\bar{\tau }}}^{R}_{_{\Gamma ,r_m}}\), and \({{\bar{\tau }}}_{_{\Gamma ,r_k r_{k+1}}}\) are defined in Eqs. (4.4), (4.6), and (5.9) respectively. The corresponding variances are given by

$$\begin{aligned} \sigma ^2_{{{\bar{\tau }}}^{\mathrm{fs}}_{_{\Gamma ,r_1}}}= & {} \sigma ^2_{{\bar{t}}_{_{\Gamma ,r_1}}} + \left\{ \sigma ^2_{{{\bar{\tau }}}^{R}_{_{\Gamma ,r_m}}} - \sigma ^2_{{\bar{t}}^{R}_{_{\Gamma ,r_m}}} \right\} \nonumber \\&+\, \sum _{k=1}^{m-1}\left\{ \sigma ^2_{{{\bar{\tau }}}_{_{\Gamma ,r_k r_{k+1}}}} - \sigma ^2_{{\bar{t}}_{_{\Gamma ,r_k r_{k+1}}}} \right\} , \end{aligned}$$
(6.2)

where the various terms on the r.h.s are defined in Sects. 4 and 5. At high momenta (heavy masses) the contribution from \({\bar{t}}^{M}_{_{\Gamma ,r_m}}\), responsible for the bulk of the variance of the standard random-noise estimator, is computed exactly with a limited number of probing vectors, and only the remainder \({{\bar{\tau }}}^{R}_{_{\Gamma ,r_m}}\) is estimated by a random-noise estimator. The low-frequency contributions \(\tau _{_{\Gamma ,r_k r_{k+1}}}\) can then be estimated by the very efficient split-even estimator. It is rather clear that splitting the single-propagator traces in several parts whose contributions come from different frequency regions is beneficial. It allows us to design a customized estimator for each contribution which profits from its own peculiarities. An important ingredient in this analysis is the fact that solvers invert the Dirac operator with heavier quark masses at a lower numerical cost.

6.1 Numerical tests

The best choice of the number of mass differences, the values of the masses, and the order of the HPE for defining the frequency-splitting estimators in Eq. (6.1) depends on many factors: the bilinear of interest, the target mass, the solver chosen for inverting the Dirac operators and its particular implementation, etc. It is not the aim of this paper to optimize with respect to all these factorsFootnote 8 but, provided a reasonable choice is made, our goal is to give a numerical proof that the frequency-splitting estimators are efficient and allow to reduce significantly the numerical cost for computing single-propagator traces. To this aim we have implemented two such estimators:

  • FS1 is the simplest frequency-splitting estimator with one mass difference only. The masses are \(a m_q=0.00207\) and 0.1, \({{\bar{\tau }}}_{_{\Gamma ,r_0 r_{1}}}\) and \({{\bar{\tau }}}^{R}_{_{\Gamma ,r_1}}\) are defined with \(N_s=1\) and 4 respectively per full evaluation of the estimator. Each evaluation of this estimator costs approximately 2.5 times more than evaluating one random source for the standard estimator.Footnote 9 See Table 2 for a detailed comparison of the relative cost of the estimators for our particular implementation.

  • FS2 is defined by 4 mass splittings corresponding to the masses \(a m_q=0.00207\), 0.02, 0.06, 0.15, 0.3, and the corresponding random-noise estimators are defined with \(N_s=1\), 1, 2, 3, and 10 random sources respectively. Each application of this estimator costs approximately 6 times with respect to evaluating one random source for the standard estimator, see Table 2.

In both cases the solver used is the generalized conjugate residual (GCR) algorithm preconditioned by a Schwarz alternating procedure (SAP) and local deflation as implemented in openQCD-1.6 [19].

In Fig. 5 we show the variances of FS1, FS2 and of the standard estimator as a function of \(N_s\), the number of evaluations of each of them per gauge configuration. A clear message emerges: a large gain is obtained for both frequency-splitting estimators with mild differences in efficiency between them. The FS1 is slightly better for the scalar and pseudoscalar densities, while FS2 is more efficient for the vector, axial-vector and tensor bilinears. In particular, the variance of FS1 is approximately 20 and 15 times smaller than the one of the standard estimators for the scalar and pseudoscalar densities respectively. Taking into account that one application of FS1 costs approximately 2.5 more, the gain in computation cost is 8 and 6 for the scalar and pseudoscalarFootnote 10 densities respectively. For the vector and the axial-vector, the variance of FS2 is approximately 2 orders of magnitude smaller than the one of the standard estimators. As the FS2 is 6 times more expensive, the gain in computational cost is approximately a factor 15. For the tensor the factor gained reaches approximately 20. Figure 10 of Appendix D depicts examples of the frequency-splitting estimators for the E5 and G8 ensembles, which illustrate similar orders of magnitude of improvement. In the vector channel, the improvement is even greater closer to the physical point.

It is worth noting that for the scalar, pseudoscalar and the tensor bilinears just one or a few evaluations of the frequency-splitting estimators are needed for the variance to be comparable to the gauge noise. For the axial-vector and vector currents O(10) and O(100) evaluations of the FS2 estimators are required to reach the same goal. As a result, in all cases the gauge noise is reached with a limited and affordable number of evaluations of the frequency-splitting estimators. If necessary the frequency-splitting estimator can be easily combined with low-mode averaging [20, 21] and its variants [22].

Fig. 6
figure 6

Left: variance of the disconnected contribution in Eq. (7.1) with \(x_0/a=10\) using the standard (red filled squares) and split-even estimator (blue open squares). The stochastic noise of the split-even estimator is comparable with the gauge noise after \(N_s\sim 256\). Right: the disconnected contribution using the split-even estimator from \(N_{\mathrm {cfg}}=1200\) gauge configurations

7 Numerical tests for two-point functions

In this section we discuss the numerical results for two representative examples of disconnected contributions to two-point functions, which are the simplest correlation functions with a non-trivial time dependence composed only of single-propagator traces. We use the estimators proposed in Sects. 5 and 6 to confirm the expected improvement over the standard estimator, and check the factorization formula for the variance given in Sect. 2.

7.1 Split-even estimator for electromagnetic current

As alluded to in Sect. 5, an important application of the split-even estimator is the determination of the disconnected contribution to the correlation function of two electromagnetic currents with three light flavours. In the isospin limit, this gives rise to a difference of single-propagator traces as in Eq. (5.1) with r and s corresponding to the up/down and strange quark flavours respectively. In particular the correlator

$$\begin{aligned} C^{rs}_{VV}(x_0) = - \frac{L^3}{3 L_0}\sum _{k=1}^{3}\sum _{y_0} a\, \left\langle {\bar{t}}_{\gamma _k,rs}(x_0+y_0)\, {\bar{t}}_{\gamma _k,rs}(y_0)\right\rangle , \nonumber \\ \end{aligned}$$
(7.1)

determines the light disconnected contribution, via the time-momentum representation [23], of the leading-order hadronic vacuum polarization, once each current is renormalized by \(Z_V=0.74636(70)\) [24] and the correct electric charge factor of 1 / 9 is included.

In the left-hand panel of Fig. 6, we show the variance of this correlation function for \(x_0/a=10\) computed by using the standard (red filled squares) and split-even estimators (blue open squares) in Eqs. (5.6) and (5.9) respectively. A reduction of the variance of up to four orders of magnitude is obtained with the split-even estimator (two orders of magnitude in the cost), which starts to be comparable to the gauge noise for \(N_s\sim 256\). As expected, the variance is practically constant in \(x_0\) and well-described by the factorization formula in Eq. (2.3) when the averaging over time and the polarizations of the current are taken into account.

In the right-hand panel of Fig. 6 our best estimate of the correlation function using the split-even estimator is shown using an increased number of gauge configurations, with respect to those used for estimating the variances, of \(N_{\mathrm {cfg}}=1200\). This in turn corresponds to a relative statistical precision of approximately \(10\%\) to the disconnected light-quark part of the muon anomalous magnetic moment coming from contributions to the integral up to time-distances of 1.5 fm. If the integral is computed up to 3.0 fm or so, the relative statistical error grows up to \(70\%\), calling for the multi-level integration to determine the contribution from the long distance part of the integrand. To properly renormalize the correlator each current has to be multiplied by the factor \(Z_V\) which brings a negligible error with respect to the statistical error of the bare correlator.Footnote 11

7.2 Frequency-splitting estimator for isoscalar vector currents

In spectroscopic applications, disconnected diagrams arise generically in isoscalar channels. The vector channel, for instance, contains the contribution

$$\begin{aligned} C^{r}_{VV}(x_0) = - \frac{L^3}{3L_0}\sum _{k=1}^{3} \sum _{y_0} a\, \left\langle {\bar{t}}_{\gamma _k,r}(x_0+y_0)\, {\bar{t}}_{\gamma _k,r}(y_0)\right\rangle .\nonumber \\ \end{aligned}$$
(7.2)
Fig. 7
figure 7

Left: variance of the disconnected contribution in Eq. (7.2) with \(x_0/a=10\) using the standard estimator (red filled squares) versus the number of sources, and the FS2 estimator (blue open squares) versus the number of its evaluations per gauge configuration. Recall each evaluation of the FS2 estimator costs approximately 6 times the standard one, see Table 2. Right: the disconnected contribution using the FS2 estimator from \(N_{\mathrm {cfg}}=1200\) gauge configurations. With the same number of configurations and the same numerical cost, no signal is observed with the standard estimator

To evaluate this correlation function, we use the FS2 estimator introduced in Sect. 6 for both single-propagator traces. In the left plot of Fig. 7 we show the variances of the standard estimator (filled symbols) against the number of sources, and the improved FS2 estimator (open symbols) against the number of its evaluations per gauge configuration. The gauge variance is approached with about \(N_s\sim 256\) evaluations of the FS2 estimator, similarly to the case of the one-point function of Sect. 6. In this case, while the disconnected piece gives only a small contribution to the isoscalar channel at intermediate hadronic distances, its variance quickly dominates the statistical error at large distances. The improved estimator thus allows the full correlation function to be resolved at much larger distances.

8 Conclusions

The numerical computation of disconnected Wick contractions is challenging in lattice QCD because (a) their variances are dominated by the vacuum contribution, which in turn implies that statistical errors remain constant with the distance of the disconnected pieces while the signal typically decreases exponentially, and (b) averaging each disconnected sub-diagram over the volume tends to be numerically expensive because the quark propagators must be re-computed at each lattice point.

A milestone for solving the second problem was the introduction of random-noise estimators [3,4,5] which allow one to sum over many or all source points stochastically. However for single-propagator traces, the simplest among the disconnected sub-diagrams, such estimators tend to have variances which are typically orders of magnitude larger than the intrinsic gauge noise. An a priori theoretical analysis of the variances is thus mandatory for deciding how to define exactly the stochastic observables.

Luckily the random-noise contribution to the variances can be re-expressed in the form of simple integrated correlation functions of local composite operators, a fact which allows us to use the quantum field theory machinery for analyzing the origin of the statistical errors and eventually to reduce them.

As a result, we have introduced new stochastic observables for single-propagator traces: the split-even and the frequency-splitting estimators for difference of two traces and for single traces respectively. The former needs from a few random sources for the pseudoscalar density up to O(100) for the vector current to approach the gauge noise. The reduction in numerical cost with respect to the standard estimator ranges from one order of magnitude for the scalar and pseudoscalar densities up to around two orders of magnitude or more for the axial and vector currents as well as for the tensor bilinear. Just one or a few evaluations of the frequency-splitting estimators are needed for the variances of the scalar, pseudoscalar and tensor bilinears to be comparable to the gauge noise, while for the axial-vector and vector currents O(10) and O(100) evaluations are required to reach the same goal. In this case the reduction of the computational cost with respect to the standard estimator is of one order of magnitude or so depending on the bilinear. In all cases considered the variances of the stochastic estimators reach the level of the intrinsic gauge noise with a moderate number of evaluations per gauge configuration.

The use of these new estimators significantly speeds up the computation of disconnected fermion Wick contractions which contribute to many physics processes at the forefront of research in particle and nuclear physics: the hadronic contribution to the muon anomalous magnetic moment, \(K\rightarrow \pi \pi \) decays, nucleon form factors, quantum electrodynamics and strong isospin-breaking contributions to hadronic matrix elements, \(\eta '\) propagator, etc. As an example we have shown their potential for computing the disconnected contribution to the light-quark contribution to the muon anomalous magnetic moment and to the correlator of two singlet vector currents. Theory suggests large gains for disconnected three and higher point correlation functions as well. To solve or mitigate the problem (a) alluded to at the beginning of this section, the next step is to combine these estimators with the newly proposed multi-level integration in the presence of fermions [1, 2].