1 Introduction

Hadron structure calculations in lattice QCD have emerged as a powerful tool for providing comparison with and guidance for experiments, see e.g., Refs. [14]. Examples include moments of generalized parton distribution functions as well as form factors. Lattice computations of such quantities have been carried out at several values of the lattice spacing allowing the continuum limit to be taken. In addition, small, sometimes even physical, values of the pion mass have been employed in the calculation of these quantities, leading to an improved understanding of their quark mass dependence and how they approach the physical point. Unfortunately, studies of excited state contributions [59] suggest that for some quantities these effects can play an important role as a systematic uncertainty that affects hadronic three-point function computations. Safely accounting for these effects requires large statistics, hence methods to speed up these calculations are highly desirable.

The progress in nucleon matrix element calculations on the lattice has prompted an effort to go beyond the simplest observables and to pursue a larger variety of interesting hadronic quantities. The evaluation of more observables will deepen our knowledge of the hadron structure and provides a more comprehensive test of QCD. However, using the conventional sequential method [10] to calculate these matrix elements, it is necessary to perform a new computation of the needed quark propagators for each observable of interest.Footnote 1 This then leads to a high computational demand if many physical quantities are being sought.

In this paper, we describe an alternative approach, based on a stochastic method, that allows us to obtain a large class of observables with only a single computation of the propagators. To this end, we employ stochastically computed all-to-all propagators. Since a calculation based on a stochastic evaluation of propagators may lead to very noisy results, we perform a detailed study to determine whether the stochastic noise can be controlled with a moderate number of stochastic sources. We determine the signal-to-noise ratio as a function of the lattice size to test whether our stochastic method can be used in large volumes, such as \(48^3 \times 96\), which are used in contemporary lattice computations. These questions are addressed specifically for the example of the axial charge \(g_\mathrm{A}\) of the nucleon. We would like to emphasize that we do not perform an analysis of systematic effects, since our goal is solely to test the stochastic method.

During the course of our work, a similar stochastic approach was employed in the calculation of meson three-point functions [11], where a (heavy) all-to-all propagator is estimated stochastically. There it was found that the stochastic method is competitive and in some cases even superior to the sequential one. Of course, it is not guaranteed that the same conclusions hold for baryon matrix elements, since those are subject to a stronger exponentially decreasing signal-to-noise ratio [12].

This paper is organized as follows: in Sect. 2 we outline our stochastic method, in Sect. 3 we present the results of this method and compare to those obtained by the fixed sink method, and we summarize our findings in Sect. 4.

2 Stochastic method for baryon three-point functions

Quantities that are needed for investigating hadron structure can be extracted by computing matrix elements of baryons with local operators. In lattice QCD, these baryon matrix elements are obtained from baryon three-point functions in Euclidean space-time that are of the form

$$\begin{aligned}&\sum \limits _{\vec {x},\vec {y}} \mathrm{e}^{-i\vec {p}^\prime \cdot \vec {x}}\mathrm{e}^{-i\vec {p}\cdot \vec {y}}\left\langle B (\vec {x}, t) | \mathcal {O}(\vec {y}, \tau )| {\bar{B}} (0) \right\rangle ,\end{aligned}$$
(1)
$$\begin{aligned}&\mathcal {O}(\vec {y}, \tau ) = \bar{q}(\vec {y}, \tau ) \Gamma q(\vec {y}, \tau ). \end{aligned}$$
(2)

\(\Gamma \) represents a combination of \(\gamma \)-matrices and covariant derivatives, and we have used translational invariance to set the source point to zero. Naively one would need an all-to-all propagator from every lattice point \((\vec {y},\tau )\) to all points \((\vec {x},t)\) for the evaluation of the above three-point function, which is, of course, prohibitively expensive to calculate. Such a demanding computation can be circumvented by applying the sequential method to perform the summation over the spatial coordinates of either the sink or the current [10]. For the example of the fixed sink method, the momentum as well as the time slice of the sink is fixed and an additional inversion for each flavor is needed. An alternative approach is to estimate the all-to-all propagator stochastically, which is the method that we explore in this paper.

A generic three-point function of a baryon \(B\) is defined as

$$\begin{aligned}&C_3^{(B)}(t,\tau ;\vec {p},\vec {p}^\prime )\\&\quad =\zeta ^{(B)}_{AA^\prime } \sum \limits _{\vec {x},\vec {y}} \mathrm{e}^{-i\vec {p}\cdot \vec {y}}\mathrm{e}^{-i\vec {p}^\prime \cdot \vec {x}} \left\langle {\mathcal I}^{(B)}_{A^\prime }(\vec {x},t) \mathcal {O}(\vec {y}, \tau ) {\bar{\mathcal I}}^{(B)}_{A} (0)\right\rangle . \end{aligned}$$

\({\mathcal I}_{B}\) is the baryon interpolating field and \(A\) and \(A^\prime \) summarize the indices depending on the quantum numbers of the baryon \(B\), which are appropriately contracted with the function \(\zeta ^{(B)}_{A A^\prime }\). The insertion time of the operator is denoted by \(\tau \). For illustration, let us now consider the three-point function of a proton and the operator \({\bar{d}}\Gamma d\). We use the interpolating field \({\mathcal I}_p\) possessing the quantum numbers of the proton, namely,

$$\begin{aligned} {\mathcal I}^{(p)}_{\alpha }(\vec {x},t)=\varepsilon ^{abc} u_\alpha ^a (\vec {x},t)\left( \left( d^b (\vec {x},t)\right) ^\mathrm{T}{\mathcal C}\gamma _5 \, u^c(\vec {x},t)\right) , \end{aligned}$$

where \({\mathcal C}=i \gamma _0 \gamma _2\) is the charge conjugation operator. In terms of quark propagators, the connected piece of this three-point function reads

$$\begin{aligned}&C_3^{(p)}(t,\tau ;\vec {p},\vec {p}^\prime ;{\mathbb {P}})\nonumber \\&\quad ={\mathbb {P}}^{\alpha \alpha ^\prime }\sum \limits _{\vec {x},\vec {y}}\, \mathrm{e}^{-i\vec {p}\cdot \vec {y}}\mathrm{e}^{-i\vec {p}^\prime \cdot \vec {x}}\; \varepsilon _{cba}\, \varepsilon _{a^\prime b^\prime c^\prime }\,\left( {\mathcal C}\gamma _5\right) _{\beta ^\prime \gamma ^\prime }\, \left( {\mathcal C}\gamma _5\right) ^*_{\gamma \beta }\; \Gamma ^{\delta ^\prime \delta } \delta _{d^\prime d}\nonumber \\&\qquad \times \left[ S^{(u)}_{(\alpha ^\prime a^\prime ) (\alpha a)} (x, 0)\, S^{(d)}_{(\beta ^\prime b^\prime ) (\delta d)} (x, y)\,S^{(d)}_{(\delta ^\prime d^\prime ) (\beta b)} (y, 0)\, S^{(u)}_{(\gamma ^\prime c^\prime ) (\gamma c)} (x, 0)\right. \nonumber \\&\qquad -S^{(u)}_{(\alpha ^\prime a^\prime ) (\gamma c)} (x, 0)\, S^{(d)}_{(\beta ^\prime b^\prime ) (\delta d)} (x, y)\,\left. S^{(d)}_{(\delta ^\prime d^\prime ) (\beta b)} (y, 0)\, S^{(u)}_{(\gamma ^\prime c^\prime ) (\alpha a)} (x, 0) \right] ,\!\!\nonumber \\ \end{aligned}$$
(3)

where \(x=(\vec {x},t)\) and \(y=(\vec {y},\tau )\), and where the up (down) quark propagator is denoted by \(S^{(u)}\) (\(S^{(d)}\)). \({\mathbb {P}}\) is an appropriate spin projector, which we will specify later.

The sequential method with fixed sink makes use of the fact that we can perform the sum over \(\vec {x}\) in Eq. (1) by an additional inversion. Then a generalized propagator for fixed time slice, projector \({\mathbb {P}}\), and sink momentum \(\vec {p}^\prime \) is obtained, as indicated by the shaded area in the left diagram of Fig. 1. This renders the explicit calculation of an all-to-all propagator unnecessary.

Our alternative method uses a stochastic estimate of the all-to-all propagator appearing in three-point functions like Eq. (3). Such an estimate is obtained via

$$\begin{aligned}&\frac{1}{N_\mathrm{S}} \sum \limits _{r=1}^{N_\mathrm{S}} \eta _r^\dagger (\vec {y},\tau ) \phi (x,t)\mathop {\longrightarrow }\limits ^{N_\mathrm{S} \rightarrow \infty } {\mathcal M}^{-1} ((\vec {x},t),(\vec {y},\tau )),\\&\phi (x,t)=\sum \limits _{\tilde{\vec {x}}} {\mathcal M}^{-1}((\vec {x},t),\tilde{x})\ \eta _r(\tilde{x}) \nonumber \end{aligned}$$
(4)

where \({\mathcal M}\) is the Dirac matrix. In the above equations, we have suppressed Dirac and color indices. \(\eta _r\) is a random source obeying

$$\begin{aligned} \frac{1}{N_\mathrm{S}}\sum \limits _{r=1}^{N_\mathrm{S}} \eta _{r,a,\alpha }^*(x)\eta _{r,b, \beta } (y) \mathop {\longrightarrow }\limits ^{N_\mathrm{S} \rightarrow \infty } \delta _{xy}\delta _{ab} \delta _{\alpha \beta }. \end{aligned}$$

The stochastic method is diagrammatically illustrated in the right diagram of Fig. 1. Using the stochastic estimate, we can decompose the double sum in Eq. (3) into the product of two single sums, which is significantly computationally cheaper than the naive double sum and reads

$$\begin{aligned}&C_3^{(p)}\left( t,\tau ;\vec {p},\vec {p}^\prime ;{\mathbb {P}} \right) \\&\quad ={\mathbb {P}}^{\alpha \alpha ^\prime } \sum \limits _{\vec {x}}\, \mathrm{e}^{-i\vec {p}^\prime \cdot \vec {x}}\; \varepsilon _{cba}\, \varepsilon _{a^\prime b^\prime c^\prime }\, \left( {\mathcal C}\gamma _5 \right) _{\beta ^\prime \gamma ^\prime }\, \left( {\mathcal C} \gamma _5 \right) _{\gamma \beta } \; \Gamma ^{\delta ^\prime \delta } \delta _{d^\prime d}\\&\qquad \times \left[ S^{(u)}_{(\alpha ^\prime a^\prime ) (\alpha a)} (x, 0)\, S^{(u)}_{(\gamma ^\prime c^\prime ) (\gamma c)} (x, 0)\, \left( \eta (x) \gamma _5\right) _{\beta ^\prime b^\prime }\;\right. \\&\qquad \times \sum \limits _{\vec {y}} \mathrm{e}^{-i\vec {p}\cdot \vec {y}}\, S^{(d)}_{(\delta ^\prime d^\prime ) (\beta b)} (y, 0)\, \left( \gamma _5 \phi ^{*\,(d)} (y)\right) _{\delta d}\\&\qquad -\,\, S^{(u)}_{(\alpha ^\prime a^\prime ) (\gamma c)} (x, 0)\, S^{(u)}_{(\gamma ^\prime c^\prime ) (\alpha a)} (x, 0)\, \left( \eta (x) \gamma _5\right) _{(\beta ^\prime b^\prime )}\;\\&\qquad \times \left. \sum \limits _{\vec {y}}\mathrm{e}^{-i\vec {p}\cdot \vec {y}}\, S^{(d)}_{(\delta ^\prime d^\prime )(\beta b)} (y, 0)\, \left( \gamma _5 \phi ^{*\,(d)}(y)\right) _{\delta d} \right] \end{aligned}$$

where \(x=(\vec {x},t)\) and \(y=(\vec {y},\tau )\). We have suppressed the average over the number of stochastic samples, cf. Eq. (4), and used the \(\gamma _5\) Hermiticity property of the Dirac matrix to obtain the above expression. As before, we use superscripts to denote the quark flavor.

Fig. 1
figure 1

Diagrammatic illustration of the sequential method through the sink (left) and the stochastic method (right)

The drawback of the stochastic method is that we have to average over a sample of \(N_\mathrm{S}\) stochastic sources. This requires \(N_\mathrm{S}\) inversions compared to just 12 (one inversion per Dirac and color index) in the sequential method. However, a major benefit of this method is its flexibility, since we do not need to fix the spin projector or the sink momentum, nor even the sink time slice, in principle.

3 Assessment of the stochastic method

To test the applicability of the stochastic method, we need to determine how large \(N_\mathrm{S}\) must be to keep the stochastic noise under control. This depends on the observable of interest. To be concrete, we compute a relatively simple benchmark observable of nucleon structure, namely, the nucleon axial charge \(g_\mathrm{A}\), using our stochastic method. This quantity can be obtained from a nucleon matrix element of the isovector axial current. For the evaluation of matrix elements of the nucleon, we need to introduce the zero momentum nucleon two-point function,

$$\begin{aligned} C_{2}^{(N)}(t)=\sum \limits _{\vec {x}} \,\mathrm {Tr}\,\left[ \frac{1}{2} \left( {\mathbf {1}}+\gamma _0 \right) \left\langle {\mathcal I}^{(N)}(\vec {x},t) \right. \left. {\bar{\mathcal I}}^{(N)}(0) \right\rangle \right] . \end{aligned}$$

We then examine the ratio \(R_{g_\mathrm{A}}\) of the nucleon three-point and two-point correlation functions,

$$\begin{aligned}&R_{g_\mathrm{A}}(t,\tau ) =\frac{C_{3,\mathcal {O}_{k}}^{(N)} (t, \tau )}{C_{2}^{(N)}(t)}\\&C_{3,\mathcal {O}_{k}}^{(N)}(t,\tau ;\vec {p}=\vec {p}^\prime =0)\nonumber \\&\quad =\sum \limits _{\vec {x},\vec {y}} \,\mathrm {Tr}\,\left[ \Gamma _k \left\langle {\mathcal I}^{(N)}(\vec {x},t)\right| \mathcal {O}_{k}(\vec {y},\tau ) \left| \bar{{\mathcal I}}^{(N)}(0) \right\rangle \right] \nonumber \\&\mathcal {O}_{k}\left( \vec {y},\tau \right) ={\bar{u}}(\vec {y},\tau ) \gamma _5 \gamma _k u(\vec {y},\tau )-{\bar{d}}(\vec {y},\tau ) \gamma _5 \gamma _k d(\vec {y},\tau ), \nonumber \\&\Gamma _k =\frac{i}{2}\left( 1+\gamma _0\right) \gamma _5 \gamma _k, \quad k=1,2,3\nonumber \end{aligned}$$
(5)

In the limit of large Euclidean time separations, \(R_{g_\mathrm{A}}\) converges to \(g_\mathrm{A}\) up to the renormalization factor \(Z_\mathrm{A}\),

$$\begin{aligned}&Z_\mathrm{A} R_{g_\mathrm{A}}(t,\tau )\, \longrightarrow \, g_\mathrm{A}\quad \text {for } t\rightarrow \infty ,\\&\quad \tau \rightarrow \infty \text { and } (t-\tau )\rightarrow \infty . \end{aligned}$$

In this paper, we use the value of the renormalization constant \(Z_\mathrm{A}=0.757(3)\) determined non-perturbatively [13, 14].

In order to demonstrate that the stochastic method can indeed produce results with a reasonable computational effort and is potentially competitive with the sequential method, we performed a benchmark calculation with \(N_\mathrm{f}=2+1+1\) flavors of quarks. We employed twisted mass fermions at maximal twist with a lattice spacing of \(a\approx 0.082~\hbox {fm}\), determined from the nucleon mass [14], a pion mass of \(m_\pi \sim 370~\hbox {MeV}\), and a volume of \(L^3\approx (2.6~\hbox {fm})^3\). In Fig. 2, we show \(R_{g_\mathrm{A}}(t,\tau )\) obtained using the stochastic method as a function of the insertion time \(\tau \) for a fixed source–sink separation \(t=12a\). We make a comparison with the value \(R_{g_\mathrm{A}}(t=12a,\tau =6a)\) obtained using the sequential method. For different values of \(\tau \) close to the middle of the plateau the picture is similar. We use spin-color-diluted random \(Z(4)\) vectors as stochastic sources,

$$\begin{aligned}&\eta ^{a}_{\alpha } (\vec {x},t)=\delta _{a,a_0} \delta _{\alpha ,\alpha _0} \delta _{t,t_0} \tilde{\eta }(\vec {x}),\\&\quad a_0 \in \{0,1,2\},\quad \alpha _0 \in \{0,1,2,3\}, \quad \tilde{\eta }(\vec {x}) \in Z(4). \end{aligned}$$

We have used a fixed number of gauge field configurations \(N_\mathrm{gauge}=460\) in both our stochastic and sequential approaches. Our observation is that using at most \(N_\mathrm{S}=4\) spin-color-diluted stochastic noise vectors per configuration for the estimate of the all-to-all propagator is sufficient to reach the same statistical accuracy as with the sequential method.

Fig. 2
figure 2

Plateau region of the ratio \(R_{g_\mathrm{A}}(t=12a,\tau )\) obtained from the stochastic method on one \(N_\mathrm{f}=2+1+1\) ensembles with a pion mass of \(m_\pi \approx 370~\mathrm {MeV}\) and a lattice spacing \(a \approx 0.082 ~\mathrm {fm}\). We use \(N_\mathrm{S}=2\), four and six spin-color-diluted stochastic time-slice sources, with the source located at the sink. The source–sink separation is \(12a\) and we compare to the standard sequential method, of which we show the ratio \(R_{g_\mathrm{A}}(t=12a,\tau =6a)\) with the light gray band. The dark gray band indicates the PDG value [15]

In terms of inversions, \(N_\mathrm{S}=1\) corresponds to using the same number of inversions as in the sequential method, i.e., (\(4 \times 12\)) per gauge field configuration, for every additional set of stochastic sources we need (\(2 \times 12\)) additional inversions to obtain the forward and back propagators, respectively. Thus this method would require four times more inversions. We would like to remark, however, that in the stochastic approach we can compute the correlation functions of proton and neutron without additional inversions, in contrast to the sequential method. In addition, we used three operators \(k=1,2,3\) in Eq. (5), and correspondingly three spin projectors for the stochastic method, again without the need of additional inversions when using the stochastic method. Our observation is that this procedure reduces the statistical error by about a factor \(\sqrt{6}\), corresponding to a factor of about \(6\) in statistics. We would like to remark, however, that this effective gain in statistics is rather specific for \(g_\mathrm{A}\) and will change for other observables.

Having demonstrated that it is in fact possible to compute \(g_\mathrm{A}\) using the stochastic method with a reasonable computational effort compared to the sequential method, we would like to know how the situation changes when the volume is varied. A potential danger of our stochastic method is that the number of stochastic sources required to reach the same precision as the sequential method may increase rapidly as the volume increases.

To study the volume effects, we use \(N_\mathrm{f}=2\) flavors of maximally twisted mass fermions, instead of the \(N_\mathrm{f}=2+1+1\). We expect that the stochastic noise should not noticeably depend on the number of dynamical flavors, and that, for the \(N_\mathrm{f}=2\) case, there exists a series of four different volumes at the same value of the lattice spacing, \(a\approx 0.082~\mathrm {fm}\) [16] and a pion mass, \(m_\pi \approx 370~\mathrm {MeV}\) [17]. These volumes are \(V=L^3\times T\), where \(L/a=16, 20, 24, 32\), and the temporal extent of the lattice is \(T=2L\) in all cases. This enables us to thoroughly study the volume dependence of the stochastic method over a relatively large range of spatial volumes, from about \((1.4~\mathrm {fm})^3\) to \((2.8~\mathrm {fm})^3\). This corresponds to \(1.95 \lessapprox m_\pi L \lessapprox 3.9\).

We performed an analysis using the stochastic method on a fixed number of gauge field configurations \(N_\mathrm{gauge}=200\) at each of the four volumes. The source–sink separation is fixed to \(12a\) in all cases, which corresponds to about \(1.067\) fm.

In Fig. 3, we show the relative error of \(g_\mathrm{A}\) as a function of the number of stochastic sources for two of the four volumes, \(L/a=24\) and \(L/a=32\), where also the sequential method has been applied. For both volumes, a convergence towards the error of the sequential method can be seen, which looks better for the larger volume, where the error is close to the error of the sequential method for \(N_\mathrm{S}=4\), to be conservative. This confirms the observation in the \(N_\mathrm{f}=2+1+1\) calculation mentioned above, which was done at about the same physical volume. The error of the error is not shown, but it is roughly of order \(10~\%\) of the error.

We show the combined statistical and stochastic error of \(g_\mathrm{A}\) obtained using the stochastic method with \(N_\mathrm{S}=8\) for four different volumes in Fig. 4. In order not to be subject to a systematic error, we do not fit the ratio given in Eq. (5) using an estimated plateau range \(\tau \) between source and sink. Instead, we take the renormalized ratio \(R_{g_\mathrm{A}}(t=12a,\tau =6a)\) and its error in the middle between source and sink as our estimate for \(g_\mathrm{A}\), where contributions from excited states are expected to be the smallest. For the larger volumes the error scales like the one of the sequential method, \(V^{-0.5}\) [18]. Therefore, the plot is consistent with the error being dominated by the gauge noise for larger volumes, which we have demonstrated above, see Fig. 3. Thus, this method appears to work as well or even better at the larger volumes typically employed in current calculations, an observation which, of course, needs to be verified for other quantities and different physical situations.

Fig. 3
figure 3

The filled circles show the relative error on the value obtained for \(g_\mathrm{A}\) as a function of the number of spin-color-diluted stochastic sources \(N_\mathrm{S}\) per gauge field configuration. In the left panel we show results for a lattice extent of \(L/a=24\), and in the right panel we show results for \(L/a=32\). The dashed lines represent the error when using the sequential method. A fixed number of gauge field configurations \(N_\mathrm{gauge}=200\) was used with a pion mass of \(m_\pi \approx 370~\mathrm {MeV}\) and a lattice spacing of \(a\approx 0.082~\mathrm {fm}\)

Fig. 4
figure 4

The filled circles show the error of \(g_\mathrm{A}\) using the stochastic method with a fixed number of stochastic sources \(N_\mathrm{S}=8\) on a fixed number of gauge fields \(N_\mathrm{gauge}=200\) for four different lattice sizes. The pion mass is \(m_\pi \approx 370~\mathrm {MeV}\), and the lattice spacing is \(a\approx 0.082~\mathrm {fm}\). The dashed lines indicate a scaling proportional to \(V^{-1/2}\) and \(V^{-1}\), and they are solely meant to guide the eye. The error of the error is not much bigger than the symbol size, hence we do not show it. Please note the double logarithmic scale

The suitability of the method is demonstrated in Fig. 5 where we compare the nucleon axial form factors \(G_\mathrm{A}(Q^2)\) and \(G_p(Q^2)\) [14] computed using the standard approach and our new method. For this comparison, we use the same number of configurations and one projector. Since we use four stochastic noises diluted in color and spin, the computation is four times more expensive producing errors that are comparable to the exact case. However, the new method allows us to compute the three-point functions of the neutron as well as for three different projectors for free; thus, compensating for the increases cost. This compared with the fact that one can consider different final states, e.g., a nucleon carrying momentum, for free makes the new method more versatile.

Fig. 5
figure 5

Comparison of \(G_\mathrm{A}(Q^2)\) and \(G_p(Q^2)\) computed with the stochastic and standard sequential method (referred as exact in the legend). For the stochastic estimate, we use a fixed number of stochastic sources \(N_\mathrm{S}=4\), and we use one projector for the proton correlators. The computation is performed using \(N_\mathrm{f}=2+1+1\) configurations fixed to \(N_\mathrm{gauge}=500\) with a pion mass of \(m_\pi \approx 370~\mathrm {MeV}\) and a lattice spacing of \(a\approx 0.082~\mathrm {fm}\)

4 Conclusion

We have applied a stochastic method for the calculation of nucleon matrix elements using spin-color-diluted time-slice sources. We have taken the case of the nucleon axial charge as a typical example of a three-point function to explore the method. The conclusion for our test case is that the error is comparable to the error of the sequential method already at a moderate number of stochastic sources, namely, four spin- and color-diluted time-slice stochastic sources, when using the same number of gauge field configurations. In this particular case, we have effectively increased the statistics used in the stochastic method by a factor \(6\) through averaging over neutron and proton correlators and using three different currents, which does not require the computation of new propagators. Moreover, our results indicate that the convergence behavior in the number of stochastic sources, \(N_\mathrm{S}\), appears to improve when the volume is increased.

Since the stochastic method needs \({\mathcal O}(10)\) more inversions (we needed \(N_\mathrm{S}=4\) for \(g_\mathrm{A}\), but this may be different for other matrix elements) it is competitive with the sequential method when one computes \({\mathcal O}(10)\) more types of matrix elements. In the case of \(g_\mathrm{A}\), the increase in computational effort is easily compensated for by computing six different matrix elements with three different spin projections for the proton and the neutron. Thus, even with the additional computational overhead, the great versatility of the stochastic method explained in this paper outweighs the sequential method when many baryon matrix elements or form factors are computed.