Groups and Algebras
The module Groups
contain generic data types to deal with group and algebra elements. Group elements $g\in SU(N)$ are represented in some compact notation. For the case $N=2$ we use two complex numbers (Caley-Dickson representation, i.e. $g=(z_1,z_2)$ with $|z_1|^2 + |z_2|^2=1$). For the case $N=3$ we only store two rows of the $N\times N$ unitary matrix.
Group operations translate straightforwardly in matrix operations, except for $SU(2)$, where we use
\[\forall g=(z_1, z_2)\in SU(2)\, \Longrightarrow\, g^{-1} = (\overline z_1, -z_2)\]
and
\[\forall g=(z_1, z_2), g'=(w_1,w_2)\in SU(2)\, \Longrightarrow \, g g'= (z_1w_1 - \overline w_2 z_2, w_2z_1 + z_2\overline w_1)\,.\]
Group elements can be "casted" into arrays. The abstract type GMatrix
represent generic $ N\times N$ complex arrays.
Algebra elements $X \in \mathfrak{su}(N)$ are traceless anti-hermitian matrices represented trough $N^2-1$ real numbers $X^a$. We have
\[ X = \sum_{a=1}^{N^2-1} X^a T^a\]
where $T^a$ are a basis of the $\mathfrak{su}(N)$ algebra with the conventions
\[ (T^a)^+ = -T^a \,\qquad {\rm Tr}(T^aT^b) = -\frac{1}{2}\delta_{ab}\,.\]
If we denote by $\{\mathbf{e}_i\}$ the usual ortonormal basis of $\mathbb R^N$, the $N^2-1$ matrices $T^a$ can always be written in the following way
- symmetric matrices ($N(N-1)/2$)
\[(T^a)_{ij} = \frac{\imath}{2}(\mathbf{e}_i\otimes\mathbf{e}_j + \mathbf{e}_j\otimes \mathbf{e}_i)\quad (1\le i < j \le N)\]
- anti-symmetric matrices ($N(N-1)/2$)
\[(T^a)_{ij} = \frac{1}{2}(\mathbf{e}_i\otimes\mathbf{e}_j - \mathbf{e}_j\otimes \mathbf{e}_i)\quad (1\le i < j \le N)\]
- diagonal matrices ($N-1$). With $l=1,...,N-1$ and $a=l+N(N-1)$
\[(T^a)_{ij} = \frac{\imath}{2}\sqrt{\frac{2}{l(l+1)}} \left(\sum_{j=1}^l\mathbf{e}_j\otimes\mathbf{e}_j - l\mathbf{e}_{l+1}\otimes \mathbf{e}_{l+1}\right) \quad (l=1,\dots,N-1;\, a=l+N(N-1))\]
For example in the case of $\mathfrak{su}(2)$, and denoting the Pauli matrices by $\sigma^a$ we have
\[ T^a = \frac{\imath}{2}\sigma^a \quad(a=1,2,3)\,,\]
while for $\mathfrak{su}(3)$ we have $T^a=\imath \lambda^a/2$ (with $\lambda^a$ the Gell-Mann matrices) up to a permutation.
Some examples
Here we just show some example codes playing with groups and elements. The objective is to get an idea on how group operations We can generate some random group elements.
julia> # Generate random groups elements, # check they are actually from the grup g = rand(SU2{Float64})
SU2{Float64}(0.9154681663196551 + 0.2637902296887592im, -0.08034061087910395 + 0.29304971834085125im)
julia> println("Are we in a group?: ", isgroup(g))
Are we in a group?: true
julia> g = rand(SU3{Float64})
SU3{Float64}(0.6330191263379481 + 0.0247764538258321im, 0.13452427190841937 + 0.13297550094266142im, 0.2674991009275957 - 0.7009549774740482im, 0.030337217379665618 - 0.41625385033478457im, 0.7190077338452694 - 0.1849539019970855im, 0.4406022060383238 + 0.2837287686577288im)
julia> println("Are we in a group?: ", isgroup(g))
Are we in a group?: true
We can also do some simple operations
julia> X = rand(SU3alg{Float64})
SU3alg{Float64}(0.7357704410675996, 0.677567701812993, -1.2471125281053408, 1.538242954898855, 0.006436970564730746, 0.9551567867335838, -0.11377685163248084, -0.058632951175543055)
julia> g1 = exp(X);
julia> g2 = exp(X, -2.0); # e^{-2X}
julia> g = g1*g1*g2;
julia> println("Is this one? ", dev_one(g))
Is this one? 7.300918441513223e-13
Types
Groups
The generic interface reads
LatticeGPU.Groups.Group
— Typeabstract type Group
This abstract type encapsulates group types (i.e. $SU(N)$). The following operations/methods are assumed to be defined for a each group.
Concrete supported implementations are
LatticeGPU.Groups.SU2
— Typestruct SU2{T} <: Group
$SU(2)$ elements. The type T <: AbstractFloat
can be used to define single or double precision elements.
LatticeGPU.Groups.SU3
— Typestruct SU3{T} <: Group
$SU(3)$ elements. The type T <: AbstractFloat
can be used to define single or double precision elements.
Algebras
The generic interface reads
LatticeGPU.Groups.Algebra
— Typeabstract type Algebra
This abstract type encapsulates algebra types (i.e. ${\rm su}(N)$). The following operations/methods are assumed to be defined for each algebra:
With the following concrete implementations
LatticeGPU.Groups.SU2alg
— Typestruct SU2alg{T} <: Algebra
${\rm su}(2)$ Algebra elements.
LatticeGPU.Groups.SU3alg
— Typestruct SU3alg{T} <: Group
$su(3)$ elements. The type T <: AbstractFloat
can be used to define single or double precision elements.
GMatrix
The generic interface reads
LatticeGPU.Groups.GMatrix
— Typeabstract type GM
This abstract type encapsulates $N\times N$ matrix types. The usual matrix operations (+,-,*,/
) are expected to be defined for this case.
With the following concrete implementations
LatticeGPU.Groups.M2x2
— Typestruct M2x2{T} <: GMatrix
Generic $2\times 2$ complex matrix.
LatticeGPU.Groups.M3x3
— Typestruct M3x3{T} <: Group
3x3 Complex matrix. The type T <: AbstractFloat
can be used to define single or double precision elements.
Generic Group
methods
LatticeGPU.Groups.inverse
— Functioninverse(g::T) where T <: Group
Returns the group inverse of g
.
LatticeGPU.Groups.dag
— Functiondag(g::T) where T <: Group
Returns the group inverse of g
.
dag(a::SU2fund{T})
Returns the conjugate of a fundamental element.
dag(a::SU3fund{T})
Returns the conjugate of a fundamental element.
LatticeGPU.Groups.tr
— Functiontr(g::T) where T <: Group
Returns the trace of the groups element g
.
LatticeGPU.Groups.dev_one
— Functiondev_one(T) where T <: Group
Returns the distance to the unit group element
LatticeGPU.Groups.unitarize
— Functionunitarize(a::T) where {T <: Group}
Return a unitarized element of the group.
LatticeGPU.Groups.isgroup
— Functionisgroup(g::T) where T <: Group
Returns true
if g
is a group element, false
otherwise.
LatticeGPU.Groups.projalg
— Functionprojalg([z::Complex,] g::T) where T <: Union{Group, GMatrix}
Projects the group element/matrix g
(or zg
) to the algebra. This amounts to the following operation:
$X = {\rm projalg}(g) = -X^a\frac{1}{2} {\rm tr}\{T^a(g - g^{\dagger})\}$
where the substraction of group elements has to be understood in the matrix sense. This method returns an Algebra
type. The generators of the algebra are the elements $T^a$.
Generic Algebra
methods
LatticeGPU.Groups.dot
— Functiondot(a::SU2fund{T},b::SU2fund{T})
Returns the scalar product of two fundamental elements. The convention is for the product to the linear in the second argument, and anti-linear in the first argument.
dot(a::SU3fund{T},b::SU3fund{T})
Returns the scalar product of two fundamental elements. The convention is for the product to the linear in the second argument, and anti-linear in the first argument.
dot(a::Spinor,b::Spinor)
Returns the scalar product of two spinors.
LatticeGPU.Groups.norm
— Functionnorm(a::SU2fund{T})
Returns the norm of a fundamental element. Same result as dot(a,a).
norm(a::SU3fund{T})
Returns the norm of a fundamental element. Same result as dot(a,a).
norm(a::Spinor)
Returns the norm of a fundamental element. Same result as sqrt(dot(a,a)).
LatticeGPU.Groups.norm2
— Functionnorm(a::SU2fund{T})
Returns the norm of a fundamental element. Same result as sqrt(dot(a,a)).
norm(a::SU3fund{T})
Returns the norm of a fundamental element. Same result as sqrt(dot(a,a)).
norm2(a::Spinor)
Returns the norm squared of a fundamental element. Same result as dot(a,a)
.
Missing docstring for normalize
. Check Documenter's build log for details.
Base.exp
— Functionexp(a::T, t::Number=1) where {T <: Algebra}
Computes exp(ta)
LatticeGPU.Groups.expm
— Functionexpm(g::G, a::A, t=1) where {G <: Group, A <: Algebra}
Computes g*exp(ta)
LatticeGPU.Groups.alg2mat
— Function