Expand description
Generic SU(N) - Special unitary N×N matrices
This module provides a compile-time generic implementation of SU(N) for arbitrary N. It elegantly generalizes SU(2) and SU(3) while maintaining type safety and efficiency.
§Mathematical Structure
SU(N) = { U ∈ ℂᴺˣᴺ | U† U = I, det(U) = 1 }§Lie Algebra
The Lie algebra su(N) consists of N×N traceless anti-Hermitian matrices:
su(N) = { X ∈ ℂᴺˣᴺ | X† = -X, Tr(X) = 0 }
dim(su(N)) = N² - 1§Design Philosophy
- Type Safety: Const generics ensure dimension errors are caught at compile time
- Efficiency: Lazy matrix construction, SIMD-friendly operations
- Elegance: Unified interface for all N (including N=2,3)
- Generality: Works for arbitrary N ≥ 2
§Examples
ⓘ
use lie_groups::sun::SunAlgebra;
use lie_groups::LieAlgebra;
// SU(4) for grand unified theories
type Su4Algebra = SunAlgebra<4>;
let x = Su4Algebra::zero();
assert_eq!(Su4Algebra::DIM, 15); // 4² - 1 = 15
// Type safety: dimensions checked at compile time
let su2 = SunAlgebra::<2>::basis_element(0); // dim = 3
let su3 = SunAlgebra::<3>::basis_element(0); // dim = 8
// su2.add(&su3); // Compile error! Incompatible types§Physics Applications
- SU(2): Weak force, isospin
- SU(3): Strong force (QCD), color charge
- SU(4): Pati-Salam model, flavor symmetry
- SU(5): Georgi-Glashow GUT
- SU(6): Flavor SU(3) × color SU(2)
§Performance
- Algebra operations: O(N²)
[optimal] - Matrix construction: O(N²)
[lazy, only when needed] - Exponential map: O(N³) via scaling-and-squaring
- Memory: (N²-1)·sizeof(f64) bytes for algebra
Structs§
- SUN
- SU(N) group element - N×N unitary matrix with det = 1
- SunAlgebra
- Lie algebra su(N) - (N²-1)-dimensional space of traceless anti-Hermitian matrices
Type Aliases§
- SU4
- Type alias for SU(4) - Pati-Salam model
- SU5
- Type alias for SU(5) - Georgi-Glashow GUT
- SU2Generic
- Type alias for SU(2) via generic implementation
- SU3Generic
- Type alias for SU(3) via generic implementation