some small groundwork for Langevin/HMC
This PR contains some small additions I needed to make make my Langevin code run. My Langevin(/HMC) code itself is by far not general enough to put it into gpt, so I dont plan to. But these utils might be useful for others doing similar things.
qcd.gauge.staple()to create force-term of gauge-actionsoperator.deriv()to create force-term of fermion-actionsreunitize()obviouslyqcd.gauge.field_strength()andmatrix.inv()for some clover-term-based preconditioning (also added clover-term to the wilson-reference-implementation in order to test that I got the signs/prefactors correct)
There are a lot of useful things in this PR. Thank you! I will, however, need to make some changes before merging. Unfortunately, at earliest I can look into it next week. For now, let me share some thoughts:
- This adds features without associated tests, i.e., our test coverage will decrease after this merge.
- Some features may be better suited for gpt versus gpt+cgpt such as reunitize and I already have a draft implementation that does not need the added cgpt function.
I re-implemented "reunitize()" to not add any cgpt functions, i.e. its pure python now.
While doing so I noticed that Grids "ProjectOnGroup()" actually only produces U(N) matrices, not SU(N) (see here). My new implementation fixes this, i.e. it forces Det=1.
from my side, this is ready to be merged