A Julia package to compute the generalized Gell-Mann matrices in d
dimensions.
The generalized Gell-Mann matrices provide a traceless basis for the space of Hermitian matrices, with elements that are orthogonal under the Frobenius inner product.
Notable special cases include the Pauli matrices σᵢ (d = 2
) and the standard Gell-Mann matrices Λᵢ (d = 3
).
GellMannMatrices.jl exports a single function gellmann(d)
which returns the d^2 - 1
generalized Gell-Mann matrices in d
dimensions.
The signature gellmann(T, d)
allows specifying the matrix type T
(which must be a mutable AbstractMatrix
with complex element type).
As examples, we can compute the Pauli matrices and the standard Gell-Mann matrices:
julia> gellmann(2) # Pauli matrices
[0.0 + 0.0im 1.0 + 0.0im; 1.0 + 0.0im 0.0 + 0.0im]
[0.0 + 0.0im 0.0 - 1.0im; 0.0 + 1.0im 0.0 + 0.0im]
[1.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im -1.0 + 0.0im]
julia> gellmann(3) # Standard Gell-Mann matrices
[0.0 + 0.0im 1.0 + 0.0im 0.0 + 0.0im; 1.0 + 0.0im 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im 0.0 + 0.0im]
[0.0 + 0.0im 0.0 - 1.0im 0.0 + 0.0im; 0.0 + 1.0im 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im 0.0 + 0.0im]
[...]
Keyword arguments:
-
skip_identity
(default,true
): toggle tofalse
to include the identity matrix. -
normalize
(default,false
): toggle totrue
to guarantee a fixed (Frobenius) normalization prefactor of 2, in the sense$\mathrm{Tr}(M_i^\dagger M_j) = 2\delta_{ij}$ . Iffalse
, matrix elements are chosen to be small integers, leaving the normalization prefactor matrix-dependent.