Function lattice_qcd_rs::su3::random_su3_close_to_unity
source · pub fn random_su3_close_to_unity<R>(
spread_parameter: Real,
rng: &mut R
) -> CMatrix3where
R: Rng + ?Sized,
Expand description
Get a radom SU(3) matrix close to [get_r] (+/- 1) * [get_s] (+/- 1) * [get_t] (+/- 1)
.
Note that it diverges from SU(3) slightly.
spread_parameter
should be between between 0 and 1 both excluded to generate valid data.
outside this bound it will not panic but can have unexpected results.
Example
for _ in 0..10 {
assert_matrix_is_su_3!(
random_su3_close_to_unity(0.000_000_001_f64, &mut rng),
0.000_000_1_f64
);
}
but it will be not close to SU(3) up to f64::EPSILON
.
ⓘ
assert_matrix_is_su_3!(
random_su3_close_to_unity(0.000_000_001_f64, &mut rng),
f64::EPSILON * 180_f64
);