## GellMannMatrices.jl

Generalized Gell-Mann bases for Hermitian matrices
Author thchr
Popularity
2 Stars
Updated Last
1 Year Ago
Started In
February 2022

# GellMannMatrices

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]
[...]```

A keyword argument `skip_identity` (default, `true`) can be toggled to `false` to include the identity matrix.