Skip to main content

spin_expectation

Function spin_expectation 

Source
pub fn spin_expectation(state: &SpinState, axis: Vec3) -> f64
Expand description

Expectation value of spin along an axis: <S.n> = (hbar/2)*<psi|sigma.n|psi>. Returns the value in units of hbar/2 (i.e., between -1 and 1).