Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect (or nonstandard?) normalization of the eigth Gell Mann Matrix #2

Closed
MasonProtter opened this issue Nov 2, 2023 · 4 comments

Comments

@MasonProtter
Copy link

julia> using GellMannMatrices

julia> map(gellmann(3)) do λi
           tr(λi * λi)
       end
8-element Vector{ComplexF64}:
 2.0 + 0.0im
 2.0 + 0.0im
 2.0 + 0.0im
 2.0 + 0.0im
 2.0 + 0.0im
 2.0 + 0.0im
 2.0 + 0.0im
 6.0 + 0.0im

Normally the final Gell Mann matrix has a normalization factor of 1/sqrt(3)

@thchr
Copy link
Owner

thchr commented Nov 2, 2023

There's a normalize kwarg that'll enable this. From the doc-string:

"""
    gellmann([T::Type{<:AbstractMatrix} = Matrix{ComplexF64},] d::Integer;
             skip_identity = true, normalize = false)

## Keyword arguments
[...]
- `normalize` (default, `false`): if `true`, matrices are normalized in a manner that
  ensures the orthonormality relation `tr(Mᵢ'*Mⱼ) = 2δᵢⱼ`; if `false`, a choice of matrix
  elements favoring simplicity is made (i.e., integer elements).
[...]

So that:

julia> map(gellmann(3; normalize=true)) do λi
           tr(λi * λi)
       end
8-element Vector{ComplexF64}:
 2.0 + 0.0im
 2.0 + 0.0im
 2.0 + 0.0im
 2.0 + 0.0im
 2.0 + 0.0im
 2.0 + 0.0im
 2.0 + 0.0im
 2.0 + 0.0im

I suppose we could flip the default (it's false because i preferred simplicity of elements for the application I needed this for).

@JaniPenttala
Copy link

julia> map(gellmann(4,normalize=true)) do λi
                  tr(λi * λi)
              end
15-element Vector{ComplexF64}:
                2.0 + 0.0im
                2.0 + 0.0im
                2.0 + 0.0im
                2.0 + 0.0im
                2.0 + 0.0im
                2.0 + 0.0im
                2.0 + 0.0im
                6.0 + 0.0im
                2.0 + 0.0im
                2.0 + 0.0im
                2.0 + 0.0im
                2.0 + 0.0im
                2.0 + 0.0im
                2.0 + 0.0im
 1.9999999999999998 + 0.0im

It seems that there is some bug in normalizing Gell-Mann matrices for higher dimensions. Note that in this example the 8th matrix is normalized to 6.

@thchr
Copy link
Owner

thchr commented Nov 13, 2023

Ah, thanks - there was a bug; I hadn't passed on the normalization kwarg recursively for the diagonal matrices: fixed now by 35068d1 (and fixed on latest version on the registry).

@thchr
Copy link
Owner

thchr commented Nov 13, 2023

Re. the original issue: I've updated the README to now include the normalization kwarg.

With that, I'll close this for now. If you feel we should normalize the matrices by default, I'd be open to that also (but let me know then).

@thchr thchr closed this as completed Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants