This section describes in some detail the names and functionality for all functions in the interface involving linear algebra with and without shifts.
All QDP objects are of type QDPType, and QDP functions act on objects of this base class type. Unless otherwise indicated, operations occur on all sites in the specified subset of the target, often an assignment statement or object definition. The indexing of a QDPType returns an lvalue suitable for assignment (but not object definition). It is also used to narrow the lattice sites participating in a global reduction since the result of such a reduction is a lattice scalar, hence are independent of lattice sites.
Supported operations are listed below. Convention: prototypes are basically of the form:
Epsilon contract 2 quark propagators and return a quark propagator. This is used for diquark constructions. Eventually, it could handle larger QDP::Nc. The numbers represent which spin index to sum over.
The sources and targets must all be propagators but not necessarily of the same lattice type. Effectively, one can use this to construct an anti-quark from a di-quark contraction. In explicit index form, the operation quarkContract13 does
and is (currently) only appropriate for QPD::Nc=3 (i.e. SU(3)).
Epsilon contract 3 color primitives and return a primitive scalar.
The sources and targets must all be of the same primitive type (a matrix or vector) but not necessarily of the same lattice type. In explicit index form, the operation colorContract does
or
and is (currently) only appropriate for Nc=3 (or SU(3)).
Operations on subtypes
Subtypes
Types in the QDP interface are parameterized by a variety of types, and can look like the following:
The purpose of this section is to show some explicit prototypes and usages for the functions described in Section Supported Operations. In that section, all the functions are shown with complete information on which operations and their meaning are supported on some combination of types. The purpose of this section is something like the inverse - namely show all the functions and what are some (selected) usages.
This function will extract the desired color component with all the other indices unchanged.
A lattice color vector is another name (typedef) for a QDP::LatticeStaggeredFermion. Namely, an object that is vector in color spin and a scalar in spin space. Together with spin accessors, one can build a QPD::LatticeDiracFermion.
Traces only over color matrix indices. It is an error to trace over a color vector index. All other indices are left untouched. It will trivially trace a scalar variable.
Traces only over spin matrix indices. It is an error to trace over a spin vector index. All other indices are left untouched. It will trivially trace a scalar variable.
The call Layout::latticeCoordinate (d) returns an integer lattice field with a value on each site equal to the integer value of the dth space-time coordinate on that site.
Constant fills
Syntax
LatticeType operator=(LatticeType& r, const Type& a)
Constant (or lattice global) fills are always defined for lattice scalar objects broadcasting to all lattice sites. These are broadcasts of a lattice scalar type to a conforming lattice type.
Only sets the diagonal part of a field to a constant a times the identity.
This fill can only be used on primitive types that are scalars or matrices. E.g., it can not be used for a vector field since there is no meaning of diagonal. N.B., a zero cannot be distinguished from a constant like 1. To initialize to zero the zero argument must be used.