Skip to content

thchr/GellMannMatrices.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GellMannMatrices

Build status Coverage

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).

Usage

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 to false to include the identity matrix.
  • normalize (default, false): toggle to true to guarantee a fixed (Frobenius) normalization prefactor of 2, in the sense $\mathrm{Tr}(M_i^\dagger M_j) = 2\delta_{ij}$. If false, matrix elements are chosen to be small integers, leaving the normalization prefactor matrix-dependent.

About

Generalized Gell-Mann bases for Hermitian matrices

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages