Utility Functions

MetaQCD.Utils.ckronMethod
ckron(a, b)
ckron(A, B)

Return the complex Kronecker(outer) product of vectors a and b, i.e. a ⊗ b†, or of two matrices A and B, i.e. A ⊗ B.

source
MetaQCD.Utils.cmvmul_blockMethod
cmvmul_block(P::PauliMatrix, x::SVector)

Return the matrix-vector product of the block diagonal matrix containing A₊ and A₋ and the vector x

source
MetaQCD.Utils.cmvmul_spin_projMethod
cmvmul_spin_proj(A, x, ::Val{ρ}, ::Val{is_adjoint}=Val(false))

Return A * (1 ± γᵨ) * x where γᵨ is the ρ-th Euclidean gamma matrix in the Chiral basis. x is assumed to be a 4xN component complex vector. The third argument is ρ wrapped in a Val and must be within the range [-4,4]. Its sign determines the sign in front of the γᵨ matrix. If is_adjoint is true, A† is used instead of A.

source
MetaQCD.Utils.cnorm2Method
cnorm2(A::SMatrix{N,N,Complex{T},N²}) where {N,N²,T}

Calculate the 2-norm of the complex NxN matrix M

source
MetaQCD.Utils.cvmmul_dMethod
cvmmul_d(x, A)

Return the vector-matrix product of x and the adjoint of A. x is implicitly assumed to be a column vector and therefore the adjoint of x is used

source
MetaQCD.Utils.exp_iQMethod
exp_iQ(Q::SU{3,9,T}) where {T}
exp_iQ(e::exp_iQ_su3{T}) where {T}

Compute the exponential of a traceless Hermitian 3x3 matrix Q or return the exp_iQ field of the exp_iQ_su3{T}-object e.
From Morningstar & Peardon (2008) arXiv:hep-lat/0311018v1

source
MetaQCD.Utils.exp_iQ_coeffsMethod
exp_iQ_coeffs(Q::SU{3,9,T}) where {T}

Return a exp_iQ_su3 object that contains the exponential of Q and all parameters obtained in the Cayley-Hamilton algorithm that are needed for Stout force recursion.

source
MetaQCD.Utils.gen_SU2_matrixMethod

genSU2matrix(ϵ, ::Type{T}) where {T}

Generate a Matrix X ∈ SU(2) with precision T near the identity with spread ϵ.
From Gattringer C. & Lang C.B. (Springer, Berlin Heidelberg 2010)

source
MetaQCD.Utils.gen_SU3_matrixMethod

genSU3matrix(ϵ, ::Type{T}) where {T}

Generate a Matrix X ∈ SU(3) with precision T near the identity with spread ϵ.
From Gattringer C. & Lang C.B. (Springer, Berlin Heidelberg 2010)

source
MetaQCD.Utils.kenney_laubMethod

kenney_laub(M::SMatrix{3,3,Complex{T},9}) where {T}

Compute the SU(3) matrix closest to M using the Kenney-Laub algorithm.

source
MetaQCD.Utils.moveMethod
move(s::SiteCoords, μ, steps, lim)

Move a site s in the direction μ by steps steps with periodic boundary conditions. The maximum extent of the lattice in the direction μ is lim.

source
MetaQCD.Utils.multrMethod
multr(A::SMatrix{N,N,Complex{T},N²}, B::SMatrix{N,N,Complex{T},N²}) where {N,N²,T}

Calculate the trace of the product of two complex NxN matrices A and B of precision T.

source
MetaQCD.Utils.spin_projMethod
spin_proj(x, ::Val{ρ})

Return (1 ± γᵨ) * x where γᵨ is the ρ-th Euclidean gamma matrix in the Chiral basis. and x is a 4xN component complex vector. The second argument is ρ wrapped in a Val and must be within the range [-4,4]. Its sign determines the sign in front of the γᵨ matrix.

source
MetaQCD.Utils.spintraceMethod
spintrace(a, b)

Return the complex Kronecker(outer) product of vectors a and b, summing over dirac indices, i.e. ∑ ᵨ aᵨ ⊗ bᵨ†

source
MetaQCD.Utils.switch_sidesMethod
switch_sides(site::CartesianIndex, NX, NY, NZ, NT, NV)

Return the cartesian index equivalent to site but with opposite parity. E.g., switch_sides((1, 1, 1, 1), 4, 4, 4, 4, 256) = (1, 1, 1, 3) and reverse

source
MetaQCD.Utils.σμν_spin_mulMethod
σμν_spin_mul(x, ::Val{μ}, ::Val{ν})

Return σμν * x where σμν = i/2 * [γμ, γν] with the gamma matrices in the Chiral basis and x is a 4xN component complex vector. The latter two arguments are μ and ν wrapped in a Val and must be within the range [1,4] with μ < ν

source