Characters

SU(d) characters can be evaluated directly with character(irrep, U). They are the traces of the corresponding irreducible representation matrices, so character is the direct way to ask for that quantity without building the whole matrix yourself.

Example: character as the trace of a representation

julia> using GroupFunctions
julia> λ = [2, 0];
julia> U = su2_block(2, 1, (0.0, pi/3, 0.0));
julia> χ = character(λ, U)2.0000000000000004 + 0.0im
julia> values, basis = group_function(λ, U);
julia> χ_from_matrix = sum(values[i, i] for i in axes(values, 1))2.0000000000000004 + 0.0im
julia> χ ≈ χ_from_matrixtrue

Example: symbolic character

julia> using GroupFunctions
julia> character([2, 0])u_2_1*u_1_2 + u_2_2*u_1_1 + u_1_1^2 + u_2_2^2