Regularizing QL on the lattice
The Topological charge on the lattice is defined as
Where is a local charge defined over a triangle, in a technique developed by Berg and Lüscher, 1981 to regularize the charge (i.e. ensure that it is always an integer). This technique is detailed below, but involves enforcing the fields to obey certain configurations to ensure that the topological charge is a conserved, integer quantity.
Triangles on the Lattice
The topological charge has been defined via sums over triangles created by cutting each square plaquette along the diagonal. Each vertex is labeled (numbered counter-clockwise), such that we call the fields at the sites of the vertices
and
.

At each lattice site, there are six adjacent triangles which have a vertex that includes that site. To avoid triple-counting, we “assign” each vertex the two triangles in the positive direction (in x and y), as shown for lattice site (0,0) in the image above. Note the directionality – contributions to the charge from each triangle are calculated moving counter-clockwise from its primary vertex.
The topological charge over each triangle obeys
with
and
We use the arcsin of the quantity to compute
, as in C++ the domain of arcsin is symmetric about
, which prevents the need to adjust the domain to fit the expectation given above.
One challenge in calculating this on the lattice is that the spin configurations on a triangle must obey a specific set of relationships, as given in Berg and Lüscher, 1981:
and
Where and
here represent the vector fields
(which we refer to as
in this work) on the three counterclockwise vertices of the triangles defined above.
The randomness introduced in Monte Carlo simulations can make it challenging to ensure that the spin configurations we choose satisfy these equations, but it is crucial that we do so. In all cases where either of these relations is defied, the total topological charge returns non-integer (i.e. invalid) numbers. Ensuring that these relations are met adds computational time to our simulation, but is well worth the effort.
Non-integer 
Early tests of the code revealed that it was not yielding integer values for , at least not all the time. When the code returned an integer value for
, it was always one of the following:
. And in the event that
was a non-integer, it would often be a very large number. This is true for calculations of
using both arccos and arcsin, but the problem is much more severe for arccos (e.g. when arccos was used to compute
, it could go up to
, while arcsin’s largest values were under
).
In the figure below, we can see results for calculated using arccos (top) and arcsin (bottom). The x-axis represents individual runs (the numbering is arbitrary, but represents unique parameter combinations). On the y-axis are the values of
calculated at 100 steps in the Monte Carlo trajectory, demonstrating the spread of values.

Figure and analysis credit: Andy Esseln, Smith College
Length and topological term clearly both have an effect on the number of integer values of
. The effect of length appears to be stronger than that of
, and its existence makes sense, as there are more lattice sites and more places where problems can arise and compound. Interestingly, though, it appears not just to decrease the number of integer values, but the fraction of values which are integers decreases rapidly with lattice length.
It is less clear how introduces this issue, although it could be as simple as shifting
away from zero shifts
away from zero (an integer) and therefore the effects of length are more obvious at higher
. The figure below clearly illustrates the larger effect of length, as for
, we have almost zero integer values for
even at
.

Figure and analysis credit: Andy Esseln, Smith College
Exceptional triangles
The method used to regularize the topological charge by defining it on triangles rather than points is meant to yield integer values for . However, this is only the case if the field configurations are not exceptional (see Berg and Lüscher, 1981). Exceptional configurations occur when either of the following conditions are met:
or
.
While it appears that the existence of exceptional configurations always leads to non-integer values of , it is also the case that in some instances with no exceptional configurations, we still have non-integer values for the topological charge. This means that exceptional configurations cannot be the only cause of this breakdown, although it does appear to be a factor.
Add a figure here that shows the rate at which our code produces exceptional triangles. Does it vary by lattice size? Analyze how much that will affect our statistics if we have to throw away any data where there are non integer Q