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

the input must be a su(3) matrix (generator of SU(3)), gives the value exp(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.

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_r, MatrixExp},
};
use nalgebra::{Complex, Matrix3};
let i = Complex::new(0_f64, 1_f64);
let matrix = Matrix3::identity(); // this is NOT an su(3)
let output = matrix_su3_exp_r(matrix);
// We panic in debug. In release the following asset will fail.
// assert_eq_matrix!(output, matrix.exp(), f64::EPSILON * 100_000_f64);