Updating link variables in lattice $SU(N)$ gauge theory I'm currently writing a basic program in python to simulate a 1 + 1 dimensional yang mills gauge theory with symmetry group $SU(2)$.
On the lattice you work with link variables, which are $SU(N)$ matrices defined formally as $U_u(x) = e^{-igaA_u(x)}$, where $A_u(x) = \sum_{i=0}^{N^2-1}(A_u^iT^i)$ and where $T^i$ is the $i^{th}$ generator of the $SU(N)$ group. The lattice action is related to the plaquettes on the lattice, where a plaquette is the smallest closed product of link variables on the lattice. To be clear: $U_{u}(x)$ is a vector of $SU(N)$ matrices: you'd have one $SU(N)$ matrix for each $u$. So $U_x(x)$ is a SU(N) matrix, as is $U_t(x)$.
The monte carlo update algorithm goes like this. We look at a link on the lattice individually, and we suggest a change to said link variable, $U_u(x) \to U'_u(x)$ (where u is the direction of the link; in 1 + 1 dimensions it's either $x$ or $t$) We then compute the change in the action that would occur if we accepted the change $U_u(x) \to U'_u(x)$. If the change in the action, $dS$, is negative then we accept the change. If the change in the action, $dS$ is positive then we accept the change with a probability of $e^{-dS}$. We do this process for each link variable on the lattice. 
So; here's my question. How do I propose sufficiently small changes to an SU(N) matrix such that the average acceptance probability isn't absurdly small? I don't think I can propose changes of the form $U_u(x) \to U_u(x) + U'_u(x)$, where $U'_u(x)$ is a 'small' SU(N) matrix (if there even is such a thing), as I don't think the sum of two SU(N) matrices is generally SU(N). I could simply generate $K$ random SU(N) matrices, and then randomly select one of those $K$ $SU(N)$ matrices to be my proposed link variable $U_u(x)$. When I implement this however I end up with $dS$'s with large magnitudes, which means low acceptance probabilities. Which means that a large number of iterations must be done to get a configuration independent from your starting one. 
Sorry for the length. If anyone wants my code at the moment let me know. It's written in python, and only has an iterator and a way to generate $K$ random SU(2) matrices. 
EDIT: I think I've found the source of the discrepancy between my initial results and my current results. Let's say I generate 1000 random su(2) matrices using some algorithm. To update the link variables I propose $U_u(x) \mapsto MU_u(x)$, where M is one of my 1000 random su(2) matrices. I'm not sure if you can actually construct the entire space of su(2) by repeatedly multiplying these 1000 random matrices together. Even when I've changed my code to be 2+1 D su(2) yang mills, I still get the problem where my plaquette expectation value changes as I change my step size. In particular the plaquette expectation value goes UP as I decrease the step size. Only when I generate completely random su(2) matrices M to update $U_u(x) \mapsto MU_u(x) $ do I get the minimal plaquette size.
EDIT2: Might it be that I am updating the entire lattice at once? What I'm doing is running through the lattice once without changing any links, then changing all the links at the end of each iteration.
EDIT3: The update algorithm was indeed the problem. You have to randomly select a link variable on a random site, update that, and then continue.
 A: In principle, one can always find a small enough time-step in evolution to have a reasonable acceptance (about 57% for an optimum second-order integrator). So, first, do few checks, 


*

*Does your change in action scales with the time step of your nth-order integrator like $\Delta S \sim (\Delta t)^{n}$?

*Next thing to check is whether your U is traceless at end of evolution stage. Make a routine in the code to reunitarize (i.e make unitary again) if it is not. One efficient way to reunitarize is to use SVD (Singular value decomposition)

*Try to generate one random number for the entire lattice when trying to accept/reject. 

*Also, construct a routine where it spits out random SU($N$) matrix, it might be useful. 


If you plan to get more complicated in the future, I suggest that you attempt to write the code in C/C++ (that’s what MILC based QCD code, http://www.physics.utah.edu/~detar/milc/milcv7.pdf uses) 
Also here is a very useful reference which will be helpful in understanding the missing links: https://arxiv.org/pdf/1506.02567.pdf
There are other tests which I have not mentioned like $ \langle 
e^{-\Delta S} \rangle = 1$ etc. etc. 
A: For updating link variables, you want to take advantage of the fact that $SU(2)$ is a group.  So find a "small" matrix $M = exp(i\epsilon H) \in SU(2)$, and update according to $U_\mu(x) \mapsto M U_\mu(x)$.
I recommend having a look at Le Page's "Lattice QCD for Novices".  There's some hints there you'll find useful.
Also useful if you're not aware of it:  2d lattice QCD is exactly solvable, so you can sanity check your results.
Don't worry about C vs Python for 2d.  Python is fine.
