Skip to main content

CartanSubalgebra

Struct CartanSubalgebra 

Source
pub struct CartanSubalgebra { /* private fields */ }
Expand description

Cartan subalgebra of a semisimple Lie algebra.

The Cartan subalgebra 𝔥 is the maximal abelian subalgebra consisting of simultaneously diagonalizable elements. For SU(n+1) (type Aₙ), it consists of traceless diagonal matrices.

§Mathematical Background

  • Dimension: rank of the Lie algebra
  • Basis: {H₁, …, Hₙ} where [Hᵢ, Hⱼ] = 0 (all commute)
  • For SU(n+1): Hᵢ = Eᵢᵢ - Eᵢ₊₁,ᵢ₊₁ (diagonal matrices)
  • Roots are functionals α: 𝔥 → ℝ

§Example

use lie_groups::root_systems::CartanSubalgebra;

// SU(3) Cartan subalgebra (2-dimensional)
let cartan = CartanSubalgebra::type_a(2);
assert_eq!(cartan.dimension(), 2);

let basis = cartan.basis_matrices();
assert_eq!(basis.len(), 2);

Implementations§

Source§

impl CartanSubalgebra

Source

pub fn type_a(n: usize) -> Self

Create Cartan subalgebra for type Aₙ (SU(n+1)).

The Cartan subalgebra consists of traceless diagonal matrices. Basis: Hᵢ = Eᵢᵢ - Eᵢ₊₁,ᵢ₊₁ for i = 1, …, n

§Example
use lie_groups::root_systems::CartanSubalgebra;

// SU(2) Cartan subalgebra: 1-dimensional
let h = CartanSubalgebra::type_a(1);
assert_eq!(h.dimension(), 1);

// First basis element: diag(1, -1)
let h1 = &h.basis_matrices()[0];
assert!((h1[(0,0)].re - 1.0).abs() < 1e-10);
assert!((h1[(1,1)].re + 1.0).abs() < 1e-10);
Source

pub fn dimension(&self) -> usize

Dimension of the Cartan subalgebra (rank).

Source

pub fn basis_matrices(&self) -> &[Array2<Complex64>]

Basis matrices for the Cartan subalgebra.

Source

pub fn matrix_size(&self) -> usize

Matrix size (N for SU(N)).

Source

pub fn evaluate_root(&self, root: &Root, coefficients: &[f64]) -> Complex64

Evaluate a root functional on a Cartan element.

For a root α and Cartan element H = Σ cᵢ Hᵢ, computes α(H) = Σ cᵢ α(Hᵢ).

§Arguments
  • root - Root as a vector of coordinates
  • coefficients - Coefficients [c₁, …, cₙ] in basis {H₁, …, Hₙ}
§Returns

The value α(H) ∈ ℂ

Source

pub fn project_matrix(&self, matrix: &Array2<Complex64>) -> Option<Vec<f64>>

Project a matrix onto the Cartan subalgebra.

For a matrix M, finds coefficients [c₁, …, cₙ] such that Σ cᵢ Hᵢ best approximates M in the Frobenius norm.

Since the basis {H₁, …, Hₙ} is not necessarily orthogonal, we solve the linear system: G c = g where Gᵢⱼ = ⟨Hᵢ, Hⱼ⟩.

§Arguments
  • matrix - Matrix to project
§Returns

Some(coefficients) in the Cartan basis for rank ≤ 2, None for rank > 2 (Gaussian elimination not yet implemented).

§Limitations

Currently only supports rank 1 (SU(2)) and rank 2 (SU(3)) systems. Higher rank systems require general Gaussian elimination.

Source

pub fn from_coefficients(&self, coefficients: &[f64]) -> Array2<Complex64>

Construct a Cartan element from coefficients.

Given coefficients [c₁, …, cₙ], returns H = Σ cᵢ Hᵢ.

Source

pub fn contains(&self, matrix: &Array2<Complex64>, tolerance: f64) -> bool

Check if a matrix is in the Cartan subalgebra.

Returns true if the matrix is diagonal (or nearly diagonal within tolerance).

Source

pub fn killing_form(&self, coeffs1: &[f64], coeffs2: &[f64]) -> f64

Killing form restricted to Cartan subalgebra.

For H, H’ ∈ 𝔥, the Killing form is κ(H, H’) = Tr(ad_Had_H’). For type A_n, this simplifies significantly.

§Arguments
  • coeffs1 - First Cartan element as coefficients
  • coeffs2 - Second Cartan element as coefficients
§Returns

The value κ(H₁, H₂)

Source

pub fn dual_basis(&self) -> Vec<Root>

Dual basis in 𝔥* (root space).

Returns roots {α₁, …, αₙ} such that αᵢ(Hⱼ) = δᵢⱼ. For type A_n, these correspond to the simple roots.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V