Skip to main content

ConformalFieldTheory

Struct ConformalFieldTheory 

Source
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: f64

Central charge c.

§primaries: Vec<(f64, i32)>

List of (scaling dimension Δ, spin s) for primary operators.

§name: String

Theory name.

Implementations§

Source§

impl ConformalFieldTheory

Source

pub fn new(c: f64, name: impl Into<String>) -> Self

Construct a CFT with central charge c and no primaries yet.

Source

pub fn add_primary(&mut self, delta: f64, spin: i32)

Add a primary operator with scaling dimension Δ and spin s.

Source

pub fn casimir_energy(&self, l: f64) -> f64

Casimir energy on a cylinder of circumference L: E_0 = −π c / (6 L).

Source

pub fn holomorphic_dimensions(&self) -> Vec<(f64, f64)>

Conformal dimensions h = (Δ + s)/2, h̄ = (Δ − s)/2.

Source

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.

Source

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.

Source

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)|².

Source

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)⟩.

Source

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

Source§

fn clone(&self) -> ConformalFieldTheory

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ConformalFieldTheory

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.