Hello! Welcome to our next lesson in Computational QFT.
In our last session, we laid the theoretical groundwork for simulating gauge theories. We saw that to preserve gauge invariance on a discrete spacetime, we must abandon the site-based field and instead adopt the link variable as our fundamental degree of freedom. We then constructed the gauge-invariant Wilson action by summing over elementary closed loops, the plaquettes.
Today, we will bring this theory to life. Our goal is to implement a numerical algorithm to generate field configurations for a pure U(1) gauge theory, governed by the Wilson action. We will adapt the Metropolis-Hastings algorithm, which you've already implemented for scalar fields, to handle the unique features of gauge fields.
By the end of this lesson, you will be able to implement a Metropolis-Hastings algorithm to simulate the pure U(1) gauge theory. This is the foundational algorithm for the non-perturbative study of QED and other more complex gauge theories.
1. The Metropolis-Hastings Algorithm Revisited
At its core, the Metropolis-Hastings algorithm is a recipe for generating a sequence of states (in our case, lattice configurations) such that their distribution follows a desired probability law, typically the Boltzmann distribution .
An introduction to the Random Walk Metropolis algorithm
Let's begin with a quick refresher on the logic of the Metropolis-Hastings algorithm. This video by Ben Lambert provides a clear, high-level overview of the main steps.
Please watch from the beginning until 04:43. Focus on the core logic: 1. Propose a new state from a 'jumping distribution'. 2. Calculate the acceptance ratio 'R'. 3. Accept or reject the move based on this ratio. Note the analogy to our Boltzmann factor: the ratio of posterior probabilities corresponds to our e^{-\Delta S}.
The key steps are:
- Propose: Start with a configuration and propose a new one, .
- Calculate: Compute the change in action, .
- Accept/Reject: Accept the proposed configuration with probability . If the proposal is rejected, the next state in the sequence is just a copy of the old one, .
Our task is to define what "proposing a new configuration" and "calculating " mean for our U(1) lattice gauge theory.
2. The Metropolis Update for U(1) Link Variables
In our theory, a "configuration" is the set of all link variables on the lattice. Each link variable is a U(1) group element, which is simply a phase factor , where .
A single Metropolis update step will consist of modifying a single link variable while keeping all others fixed.
The Proposal Step
How do we propose a new link value ? The most straightforward way is to simply pick a new random phase.
- Proposal: Generate a new random angle from a uniform distribution.
- New Link: Set the proposed link to .
This is a valid proposal because it is symmetric: the probability of proposing the old link from the new one is the same as the reverse.
The Acceptance Step: Calculating
This is the most critical part of the implementation. The Wilson action is a sum over all plaquettes on the lattice:
where and .
A naive calculation of would involve recalculating the entire lattice action, which is computationally expensive. However, a change in a single link only affects the action terms of the plaquettes that contain that specific link. This principle of locality is what makes the calculation feasible.
In a -dimensional spacetime, any given link is a border for plaquettes. In our 4D case, each link is part of 6 plaquettes. The contribution to the action that depends on a specific link can be written as:
The term in the parenthesis is the sum of products of the other three links for each of the 6 plaquettes. This sum is called the staple, which we'll denote . The staple is a complex number representing the sum of the 6 open paths that can be closed by the link .
This snippet from the Regensburg lecture notes shows a Python function staple(U, mu) which computes exactly this object: the sum of all partial plaquette loops that connect to a given link U[mu]. The local action is then proportional to the interaction of the link with its staple.
With the staple computed, the part of the action dependent on is simply . The change in action when proposing is therefore:
This is a very efficient local calculation. For each update, you only need to compute one staple (a sum of 6 terms) and perform a few complex multiplications.
3. The Full Algorithm
We can now assemble the complete algorithm for one full "sweep" over the lattice. A sweep consists of visiting every link on the lattice once and attempting a Metropolis update.
Phase Diagram of the 4D U(1) Lattice Pure Gauge Theory
The following thesis chapter provides a clear, step-by-step description of the Metropolis-Hastings algorithm specifically for U(1) Lattice Gauge Theory (LGT), along with crucial practical details for running a simulation.
Please read Section 4.3, 'Metropolis-Hastings Algorithm' (page 31-32), and the beginning of Section 4.4, 'Running the simulation' (pages 32-34), covering Initialization, Thermalization, and Autocorrelation. This will formalize the algorithm we just discussed and introduce the practical steps needed to get meaningful results.
Based on this, here is the pseudocode for your simulation:
-
Initialization:
- Create a 4D lattice of link variables . Each is a complex number.
- Initialize the links. A cold start sets all links to unity (), while a hot start sets them to random U(1) phases ().
- Set the coupling parameter .
-
Simulation Loop (Markov Chain):
- Loop for
N_sweeps(total number of updates):- Loop through all sites
nand all directionsμfrom 0 to 3:
a. Store the old link:U_old = U_μ(n).
b. Calculate the staple: Compute , the sum of the 6 staple terms corresponding to the link(n, μ). This involves products of links on neighboring sites. Be careful with periodic boundary conditions!
c. Propose a new link: Generate a random angle and setU_new = cos(θ_new) + i*sin(θ_new).
d. Calculate ΔS: Compute .
e. Accept/Reject: Generate a random numberrfrom a uniform distributionU(0, 1). Ifr < exp(-ΔS), then update the lattice:U_μ(n) = U_new. Otherwise, the link remainsU_old.
- Loop through all sites
- Loop for
-
Measurements:
- Thermalization: Discard the first
N_thermsweeps to allow the system to reach equilibrium. - Autocorrelation: After thermalization, the configurations are still correlated. Measure observables (like the average plaquette value) only every
N_corrsweeps to ensure your measurements are statistically independent.
- Thermalization: Discard the first
Test your understanding!
In the scalar field simulation, we updated the field value at a site. Here, we update a link. Why would a checkerboard/red-black update scheme, where you update all "even" sites and then all "odd" sites, also be effective here when updating links?
Show answer
The change in action for a link depends on its staple, which is made of links on neighboring sites. If you update two adjacent links simultaneously, their updates would interfere with each other, making parallelization tricky. A checkerboard scheme for the sites can be adapted for links. For example, if you update all links originating from "even" sites, none of these updates will directly interfere with each other (as their staples will involve links originating from "odd" sites). This allows for a degree of parallelization, as all links in the "even" set can be updated independently before moving on to the "odd" set.
4. Improving Efficiency: The Overrelaxation Algorithm
Your background in creating efficient simulations will make this next part particularly interesting. The standard Metropolis algorithm can suffer from high autocorrelation, meaning you need very long runs to get independent configurations. The overrelaxation algorithm is a clever trick to speed up the exploration of the configuration space.
The idea is to propose a new link deterministically in a way that leaves the action unchanged. Since , this move is always accepted.
Let's look at the local action contribution again: .
If we write and the staple , the action is:
This expression is symmetric under the reflection .
This gives us a new angle . The corresponding new link gives the exact same action!
This provides a deterministic update rule that moves the system to a new, decorrelated state for free. A common and very effective simulation strategy is to alternate one Metropolis sweep with several (e.g., 3-5) overrelaxation sweeps.
Phase Diagram of the 4D U(1) Lattice Pure Gauge Theory
The thesis by Carreira, which you've already started, has an excellent and concise explanation of this technique.
Please read the subsection titled 'Overrelaxation' on pages 35-36. It derives the update rule we just discussed and shows a table with data demonstrating how significantly it reduces the autocorrelation time. This is a practical and powerful method used in professional simulations.
Conclusion
You are now equipped with the complete algorithm to perform your first simulation of a pure gauge theory. This is a significant milestone, moving from abstract field theory to a concrete computational tool.
Key Takeaways:
- The Metropolis-Hastings algorithm is adapted to U(1) gauge theory by proposing changes to individual link variables.
- The proposal consists of choosing a new random U(1) phase for a link.
- The change in action, , is calculated locally by computing the staple—the sum of open plaquette paths attached to the link being updated. This makes the algorithm efficient.
- A full simulation requires an initialization step (e.g., hot/cold start), a thermalization period, and measurements spaced by the autocorrelation time.
- Techniques like overrelaxation can dramatically improve simulation efficiency by reducing autocorrelation times.
Preview of the Next Lesson:
Now that we know how to generate field configurations, the next logical question is: what do we do with them? In the next lesson, we will compute the two-point correlation function from the generated lattice configurations and extract the particle mass from its exponential decay. This will be our first physics result from the U(1) simulation, and we can compare it to the scalar field case you've already mastered.