pub struct Su2Algebra(/* private fields */);Expand description
Lie algebra su(2) ≅ ℝ³
The Lie algebra of SU(2) consists of 2×2 traceless anti-Hermitian matrices. We represent these using 3 real coordinates.
§Convention
We identify su(2) with ℝ³ via the basis {e₀, e₁, e₂} = {iσₓ/2, iσᵧ/2, iσᵤ/2},
where σᵢ are the Pauli matrices:
σₓ = [[0, 1], [1, 0]] e₀ = iσₓ/2 = [[0, i/2], [i/2, 0]]
σᵧ = [[0, -i], [i, 0]] e₁ = iσᵧ/2 = [[0, 1/2], [-1/2, 0]]
σᵤ = [[1, 0], [0, -1]] e₂ = iσᵤ/2 = [[i/2, 0], [0, -i/2]]An element Su2Algebra::new([a, b, c]) corresponds to the matrix
(a·iσₓ + b·iσᵧ + c·iσᵤ)/2, and the parameter ‖(a,b,c)‖ is the
rotation angle in the exponential map.
§Structure Constants
With this basis, the Lie bracket satisfies [eᵢ, eⱼ] = -εᵢⱼₖ eₖ, giving
structure constants fᵢⱼₖ = -εᵢⱼₖ (negative Levi-Civita symbol).
In ℝ³ coordinates, [X, Y] = -(X × Y).
§Isomorphism with ℝ³
su(2) is isomorphic to ℝ³ as a vector space, and as a Lie algebra
the bracket is the negative cross product. The norm ‖v‖ equals the
rotation angle θ, matching the exponential map
exp(v) = cos(θ/2)I + i·sin(θ/2)·v̂·σ.
§Examples
use lie_groups::su2::Su2Algebra;
use lie_groups::traits::LieAlgebra;
// Create algebra element in X direction
let v = Su2Algebra::from_components(&[1.0, 0.0, 0.0]);
// Scale and add
let w = v.scale(2.0);
let sum = v.add(&w);Implementations§
Source§impl Su2Algebra
impl Su2Algebra
Trait Implementations§
Source§impl AbsDiffEq for Su2Algebra
impl AbsDiffEq for Su2Algebra
Source§fn default_epsilon() -> Self::Epsilon
fn default_epsilon() -> Self::Epsilon
Source§fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool
fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool
Source§fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
AbsDiffEq::abs_diff_eq.Source§impl Add<&Su2Algebra> for &Su2Algebra
impl Add<&Su2Algebra> for &Su2Algebra
Source§type Output = Su2Algebra
type Output = Su2Algebra
+ operator.Source§fn add(self, rhs: &Su2Algebra) -> Su2Algebra
fn add(self, rhs: &Su2Algebra) -> Su2Algebra
+ operation. Read moreSource§impl Add<&Su2Algebra> for Su2Algebra
impl Add<&Su2Algebra> for Su2Algebra
Source§type Output = Su2Algebra
type Output = Su2Algebra
+ operator.Source§fn add(self, rhs: &Su2Algebra) -> Su2Algebra
fn add(self, rhs: &Su2Algebra) -> Su2Algebra
+ operation. Read moreSource§impl Add<Su2Algebra> for &Su2Algebra
impl Add<Su2Algebra> for &Su2Algebra
Source§type Output = Su2Algebra
type Output = Su2Algebra
+ operator.Source§fn add(self, rhs: Su2Algebra) -> Su2Algebra
fn add(self, rhs: Su2Algebra) -> Su2Algebra
+ operation. Read moreSource§impl Add for Su2Algebra
impl Add for Su2Algebra
Source§impl Casimir for Su2Algebra
impl Casimir for Su2Algebra
Source§type Representation = Spin
type Representation = Spin
Source§fn quadratic_casimir_eigenvalue(irrep: &Self::Representation) -> f64
fn quadratic_casimir_eigenvalue(irrep: &Self::Representation) -> f64
Source§fn higher_casimir_eigenvalues(_irrep: &Self::Representation) -> Vec<f64>
fn higher_casimir_eigenvalues(_irrep: &Self::Representation) -> Vec<f64>
Source§fn num_casimirs() -> usize
fn num_casimirs() -> usize
Source§impl Clone for Su2Algebra
impl Clone for Su2Algebra
Source§fn clone(&self) -> Su2Algebra
fn clone(&self) -> Su2Algebra
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Su2Algebra
impl Debug for Su2Algebra
Source§impl Display for Su2Algebra
impl Display for Su2Algebra
Source§impl LieAlgebra for Su2Algebra
impl LieAlgebra for Su2Algebra
Source§fn bracket(&self, other: &Self) -> Self
fn bracket(&self, other: &Self) -> Self
Lie bracket for su(2): [X, Y] = -(X × Y)
§Convention
We represent su(2) as ℝ³ with basis {eᵢ} = {iσᵢ/2}. The matrix
commutator gives:
[iσᵢ/2, iσⱼ/2] = (i²/4)[σᵢ, σⱼ] = -(1/4)(2iεᵢⱼₖσₖ) = -εᵢⱼₖ(iσₖ/2)In ℝ³ coordinates, this is the negative cross product:
[X, Y] = -(X × Y)The negative sign is the unique bracket consistent with the half-angle
exponential map exp(v) = cos(‖v‖/2)I + i·sin(‖v‖/2)·v̂·σ, ensuring
the BCH formula exp(X)·exp(Y) = exp(X + Y - ½(X×Y) + ...) holds.
§Properties
- Structure constants:
fᵢⱼₖ = -εᵢⱼₖ - Antisymmetric:
[X, Y] = -[Y, X] - Jacobi identity:
[X, [Y, Z]] + [Y, [Z, X]] + [Z, [X, Y]] = 0 - Killing form:
B(X, Y) = -2(X · Y)
§Examples
use lie_groups::Su2Algebra;
use lie_groups::LieAlgebra;
let e1 = Su2Algebra::basis_element(0); // (1, 0, 0)
let e2 = Su2Algebra::basis_element(1); // (0, 1, 0)
let bracket = e1.bracket(&e2); // [e₁, e₂] = -e₃
// Should give -e₃ = (0, 0, -1)
assert!((bracket.components()[0]).abs() < 1e-10);
assert!((bracket.components()[1]).abs() < 1e-10);
assert!((bracket.components()[2] - (-1.0)).abs() < 1e-10);Source§fn basis_element(i: usize) -> Self
fn basis_element(i: usize) -> Self
Source§fn from_components(components: &[f64]) -> Self
fn from_components(components: &[f64]) -> Self
Source§impl Mul<Su2Algebra> for f64
impl Mul<Su2Algebra> for f64
Source§type Output = Su2Algebra
type Output = Su2Algebra
* operator.Source§fn mul(self, rhs: Su2Algebra) -> Su2Algebra
fn mul(self, rhs: Su2Algebra) -> Su2Algebra
* operation. Read moreSource§impl Mul<f64> for Su2Algebra
impl Mul<f64> for Su2Algebra
Source§impl Neg for Su2Algebra
impl Neg for Su2Algebra
Source§impl PartialEq for Su2Algebra
impl PartialEq for Su2Algebra
Source§impl RelativeEq for Su2Algebra
impl RelativeEq for Su2Algebra
Source§fn default_max_relative() -> Self::Epsilon
fn default_max_relative() -> Self::Epsilon
Source§fn relative_eq(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon,
) -> bool
fn relative_eq( &self, other: &Self, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool
Source§fn relative_ne(
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon,
) -> bool
fn relative_ne( &self, other: &Rhs, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool
RelativeEq::relative_eq.Source§impl Sub for Su2Algebra
impl Sub for Su2Algebra
impl AntiHermitianByConstruction for Su2Algebra
su(2) algebra elements are anti-Hermitian by construction.
The representation uses {iσ₁, iσ₂, iσ₃} where σᵢ are Hermitian. Since (iσ)† = -iσ† = -iσ, each basis element is anti-Hermitian, and any real linear combination is also anti-Hermitian.
§Lean Connection
Combined with exp_antiHermitian_unitary: exp(X)† · exp(X) = I.
Therefore SU2::exp always produces unitary elements.
impl Copy for Su2Algebra
impl StructuralPartialEq for Su2Algebra
impl TracelessByConstruction for Su2Algebra
su(2) algebra elements are traceless by construction.
The representation Su2Algebra::new([f64; 3]) stores coefficients in the
Pauli basis {iσ₁, iσ₂, iσ₃}. Since each Pauli matrix is traceless,
any linear combination is also traceless.
§Lean Connection
Combined with det_exp_eq_exp_trace: det(exp(X)) = exp(tr(X)) = exp(0) = 1.
Therefore SU2::exp always produces elements with determinant 1.
Auto Trait Implementations§
impl Freeze for Su2Algebra
impl RefUnwindSafe for Su2Algebra
impl Send for Su2Algebra
impl Sync for Su2Algebra
impl Unpin for Su2Algebra
impl UnsafeUnpin for Su2Algebra
impl UnwindSafe for Su2Algebra
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.