pub struct ConformalFieldTheory {
pub c: f64,
pub primaries: Vec<(f64, i32)>,
pub name: String,
}Expand description
Conformal field theory (CFT) data for a 2-D critical theory.
Contains central charge c, operator content (scaling dimensions and spins), and utilities for computing the partition function and modular invariants.
Fields§
§c: f64Central charge c.
primaries: Vec<(f64, i32)>List of (scaling dimension Δ, spin s) for primary operators.
name: StringTheory name.
Implementations§
Source§impl ConformalFieldTheory
impl ConformalFieldTheory
Sourcepub fn new(c: f64, name: impl Into<String>) -> Self
pub fn new(c: f64, name: impl Into<String>) -> Self
Construct a CFT with central charge c and no primaries yet.
Sourcepub fn add_primary(&mut self, delta: f64, spin: i32)
pub fn add_primary(&mut self, delta: f64, spin: i32)
Add a primary operator with scaling dimension Δ and spin s.
Sourcepub fn casimir_energy(&self, l: f64) -> f64
pub fn casimir_energy(&self, l: f64) -> f64
Casimir energy on a cylinder of circumference L: E_0 = −π c / (6 L).
Sourcepub fn holomorphic_dimensions(&self) -> Vec<(f64, f64)>
pub fn holomorphic_dimensions(&self) -> Vec<(f64, f64)>
Conformal dimensions h = (Δ + s)/2, h̄ = (Δ − s)/2.
Sourcepub fn virasoro_character(&self, h: f64, q: f64, n_terms: usize) -> f64
pub fn virasoro_character(&self, h: f64, q: f64, n_terms: usize) -> f64
Virasoro character χ_h(τ) in the high-temperature limit (simplified).
χ_h(q) ≈ q^{h − c/24} / η(q), where η(q) ≈ q^{1/24} ∏(1−q^n). Here we use a truncated expansion up to q^N_terms.
Sourcepub fn s_matrix_wzw(&self, n: usize, m: usize, k: usize) -> f64
pub fn s_matrix_wzw(&self, n: usize, m: usize, k: usize) -> f64
Modular S-matrix element S_{h h’} for a compact boson CFT (c = 1).
S_{nm} = √(2/k) sin(π n m / k) for level-k SU(2) WZW model.
Sourcepub fn partition_function(&self, q: f64, n_terms: usize) -> f64
pub fn partition_function(&self, q: f64, n_terms: usize) -> f64
Partition function on a torus: Z(τ) = Tr[q^{L_0 − c/24} q̄^{L̄_0 − c/24}].
Simplified: sum over primaries of |χ_h(q)|².
Sourcepub fn central_charge_from_tt(&self, z: f64, tt_correlator: f64) -> f64
pub fn central_charge_from_tt(&self, z: f64, tt_correlator: f64) -> f64
Central charge from the two-point function of the stress tensor T(z):
⟨T(z)T(0)⟩ = c/(2z⁴), extract c = 2 z⁴ ⟨T(z)T(0)⟩.
Sourcepub fn satisfies_unitarity_bound(&self) -> bool
pub fn satisfies_unitarity_bound(&self) -> bool
Unitary bound: all primary operators must satisfy Δ ≥ |s| (Δ ≥ 0 for scalars).
Trait Implementations§
Source§impl Clone for ConformalFieldTheory
impl Clone for ConformalFieldTheory
Source§fn clone(&self) -> ConformalFieldTheory
fn clone(&self) -> ConformalFieldTheory
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ConformalFieldTheory
impl RefUnwindSafe for ConformalFieldTheory
impl Send for ConformalFieldTheory
impl Sync for ConformalFieldTheory
impl Unpin for ConformalFieldTheory
impl UnsafeUnpin for ConformalFieldTheory
impl UnwindSafe for ConformalFieldTheory
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.