The Dirac algebra

A gamma value is an element of the Clifford algebra over the four Dirac matrices — a general linear combination, not just a basis element. Sums, differences and products of gammas are gammas, so projectors such as (1 + gamma{mu=3}) / 2 are written directly.

gamma

gamma{mu = d}                                     --> gamma
gamma{n  = k}                                     --> gamma

mu is 0, 1, 2 or 3 for the four Dirac matrices, or 5 for γ5.

n is a number from 0 to 15 naming a basis element by its bit pattern: bit i of n, counted from 0, set means a factor of γi in the product, taken in increasing order of i.

nbitselement
00000the identity
10001γ0
20010γ1
40100γ2
81000γ3
30011γ0γ1
151111γ0γ1γ2γ3, which is γ5

So gamma{n=4} is γ2, the same matrix as gamma{mu=2}, and gamma{n=15} is gamma{mu=5}. The two forms differ only in which elements they can name: mu reaches the five single matrices, n reaches all sixteen basis elements of the algebra.

local P_plus = (1 + gamma{mu=3}) / 2              -- a projector
local g5     = gamma{mu=5}                        -- = gamma{n=15}
local g2     = gamma{n=4}                         -- = gamma{mu=2}
local sigma  = gamma{n=3}                         -- the product g0 g1

gamma:conj

g:conj()                                          --> gamma

gamma:transpose

g:transpose()                                     --> gamma

gamma:adjoin

g:adjoin()                                        --> gamma

The Hermitian conjugate.

gamma:trace

g:trace()                                         --> complex

gamma:norm2

g:norm2()                                         --> number

gamma:matrix

g:matrix()                                        --> matrix.complex

The 4×4 complex matrix of g in the representation qlua uses. Present only in a build with GSL, which the reference build has.

Projection and reconstruction

Half-spinor projection, as the Level III libraries use it. These are functions of the qcd table, not methods, and they work on lattice Dirac propagators.

qcd.left_project

qcd.left_project(sign, {mu = d}, P)               --> table

sign is "plus" or "minus"; the second argument names the direction the same way the gamma constructor does, as a table with mu set to 0..3 or 5 — not as a bare number. P is a lattice DiracPropagator.

The result is a table of Nc tables, each of Ns/2 lattice DiracFermions: the half-spinor components of (1 ± γd)P/2, indexed [color][spin] from 1.

local h = qcd.left_project("plus", {mu = 0}, P)
print(#h, #h[1])                                  --> 3  2

qcd.right_project

qcd.right_project(sign, {mu = d}, P)              --> table

As qcd.left_project, projecting from the right.

qcd.left_reconstruct

qcd.left_reconstruct(sign, {mu = d}, t)           --> DiracPropagator

The inverse of qcd.left_project: t is the nested table it produced, and the number of colors is read from its length.

qcd.right_reconstruct

qcd.right_reconstruct(sign, {mu = d}, t)          --> DiracPropagator