pub fn matrix_su3_exp_i(matrix: CMatrix3) -> CMatrix3
Expand description

the input must be a su(3) matrix (generator of SU(3)), gives the SU3 matrix from the adjoint rep, i.e compute exp(i v^a T^a )

The algorithm use is much more efficient the diagonalization method. It use the Cayley–Hamilton theorem. If you wish to find more about it you can read the OpenQCD documentation that can be found here or by downloading a release. Note that the documentation above explain the algorithm for exp(X) here it is a modified version for exp(i X).

Panic

The input matrix must be an su(3) (Lie algebra of SU(3)) matrix or approximately su(3), otherwise the function will panic in debug mod, in release the output gives unexpected values.

use lattice_qcd_rs::{
    assert_eq_matrix,
    su3::{matrix_su3_exp_i, MatrixExp},
};
use nalgebra::{Complex, Matrix3};
let i = Complex::new(0_f64, 1_f64);
let matrix = Matrix3::identity(); // this is NOT an su(3) matrix
let output = matrix_su3_exp_i(matrix);
// We panic in debug. In release the following asset will fail.
// assert_eq_matrix!(output, (matrix* i).exp(), f64::EPSILON * 100_000_f64);