opbasis

This Python package allows the derivation of a minimal operator basis for typical use cases of lattice gauge theory practicioners. After specifying the transformation properties of the operator basis of interest, the package allows to derive the full basis at a given canonical mass-dimension. This includes the use of integration-by-parts identites and equations of motions to work out the minimal operator basis while allowing the user some control which operators to prioritise. Depending on the problem the user might, e.g., prefer to keep massive operators or total derivatives in favour of other variants.

Definition of a model amounts to declaring the flavour content, any transformation properties of the target basis, and possibly any Spurion symmetries to filter out unwanted operators. The specific transformations have to be implemented by the user in a dedicated Python file leaving in principle total freedom to the user what transformations are being realised. Similarly, to take equations of motions into account the user has to specify them, which then allows for example to consider a theory with a canonical or chirally-twisted mass term.

A lot of freedom is added by allowing the user to further introduce custom Block implementations, which may for example be used to introduce generators of a specific flavour symmetry like isospin or tastes for Staggered quarks.

A Minimal working example is presented in the following and various other examples are available as well. For a more focused discussion of the package you may also have a look at [1].

The package consists of multiple submodules, whose features can be explored via the corresponding sub-pages in the sidebar.

Installation

There are three ways to make this package available on your client:

  • Use pip to install the latest version supplied in the git.

pip3 install opbasis-0.9.6-py3-none-any.whl
  • Run the Makefile to build and install the latest version yourself.

  • Add the opbasis folder containing all the Python source files to your work directory or to sys.path.

The package requires Python in version 3.10 or higher and NumPy in version 1.21 or higher.

Minimal working example

To highlight the general workflow we derive the mass-dimension 6 operator basis describing all O() lattice artifacts for a pure gauge action compatible with the symmetry transformations left on a hypercubic lattice. First we set up the directory structure

  • Work directory

    Contains the main script, here findBasis.py, controlling the details of deriving the basis.

    • models

      Contains the declaration of transformations and other details of the current model, here pureGauge.in including the Transf: default directive declaring the associated Python implementation.

    • transformations

      Contains the Python implementation of the transformations required for the current model, here default.py. This already implements all the spacetime symmetry transformation one typically requires in a theory on a hypercubic lattice.

In the model file we denote the following tranformation properties

Discrete: P ++++
Discrete: C +
Discrete: H4 ++++++

Each line corresponds to another transformation, here Euclidean reflections, charge conjugation, and hypercubic rotations. The transformation behaviour is then denoted by either + or -. If a particular direction should be omitted x can be chosen instead.

Running findBasis.py with this input (and specifying the proper gluon EOM) then yields the expected operator basis.