# Efficiencies and optimization of HMC algorithms in pure gauge theory

## Heatbath/Overrelaxation (HOR).

Each update is composed of one heatbath sweep followed by $`N_{or}`$ overrelaxation sweeps.

* Overrelaxation: microcanonical reflections in three SU(2) subgroups.
* Heatbath: Cabbibo-Marinari method with random matrices from SU(2) subgroups. SU(2) matrices are generated with the Fabricius-Haan algorithm.

A sweep consists of loops over $`x`$ and $`\mu `$. The order of these loops turned out to have a significant influence on the autocorrelation times (with the inner loop over $`x`$ being in advantage).

## Hybrid Monte Carlo (HMC).

The HMC is a member of the family of algorithms which are based on classical dynamics. To this end, one considers a Hamiltonian

$$H[P,U]=\frac{1}{2}\underset{x,\mu }{}P_{x,\mu }^2+S[U]$$
(4)   
with momenta $`P_{x\mu }`$ conjugate to the link variables. In each update step, momenta are generated with a Gaussian distribution and a reversible discretized trajectory is computed. Discretization errors are corrected by an acceptance step.

Parameters which can be optimized are the trajectory length $`\tau `$ and the step size $`\delta \tau `$.

## Local Hybrid Monte Carlo (LHMC).

We also consider a local version of the HMC algorithm proposed in . Here one applies the same procedure as for the global HMC algorithm, but for one link while keeping all others fixed. This has some advantages compared to the global HMC:

* The difference in the action accumulated on a trajectory does not contain a volume factor. As a consequence, much greater step sizes sizes are possible without getting poor acceptance rates.
* The staples for a link – which are involved in the computation of the force – have to be computed only once per trajectory, so additional steps on the trajectory are cheap. This point has turned out to be of minor importance, as the optimal parameter set has $`\tau /\delta \tau `$ 2 – 3.

An advantage compared to the HOR algorithm is that $`\mathrm{\Delta }S`$ is only needed for infinitesimal $`\mathrm{\Delta }U`$. This makes no practical difference for the standard Wilson action considered here, but it is relevant for more complicated actions where terms quadratic in $`U`$ appear.

The LHMC algorithm cannot be applied to QCD with pseudofermions in a straightforward way, because the computation of the force would then require the inversion of a fermion matrix in each local step. However, for a simulation of a bermion theory with clover term, which we are preparing, it is an attractive candidate for the update of the gauge field .

We mention here that for a Wilson action, the leapfrog algorithm for generating a candidate configuration can be replaced by an exact integration of the equations of motion . The method used there makes use of the fact that in the case where subgroups of SU(3) are updated separately, the action takes the form of the energy of a ”pendulum”.

We want to represent efficiency measures in a way that allows a machine-independent comparison of algorithms. Thus, we define a measure $`S_{\text{cost}}`$ such that in order to compute $`\overline{g}^2`$ at $`1\%`$ accuracy, the equivalent in complexity of $`S_{\text{cost}}`$ computations of all staples is required.

The optimization of the three algorithms used in this study is shown in figures 1 - 5.

In the following we investigate how the different algorithms scale with $`L/a`$. The variance of the coupling between $`L/a=4`$ and $`L/a=10`$ behaves approximately like $`(L/a)^{1.4}`$. Thus, we expect a behaviour of the cost measure $`S_{\text{cost}}(L/a)^{1.4+z}`$. In figure 6 we have plotted $`S_{\text{cost}}`$ with optimized parameters for each algorithm against $`L/a`$. The dotted lines correspond to exponents $`z=1`$, $`z=2`$ resp.

From our data at $`L/a=8`$ we conclude that typical ratios in $`S_{\text{cost}}`$ for optimized parameters are 1 : 3 : 26 for HOR : LHMC : HMC. This illustrates the cost of HMC even before dynamical quarks are included. A similar performance ratio for HMC and HOR was concluded in , which recently came to our attention.

We thank DESY for allocating computer time to this project and the DFG under GK 271 for financial support.