pub struct QuantumState {
pub psi: Array1<Complex64>,
pub x: Array1<f64>,
pub t: f64,
pub mass: f64,
pub dx: f64,
}Expand description
Quantum state representation
Fields§
§psi: Array1<Complex64>Wave function values (complex)
x: Array1<f64>Spatial grid points
t: f64Time
mass: f64Mass of the particle
dx: f64Spatial step size
Implementations§
Source§impl QuantumState
impl QuantumState
Sourcepub fn new(psi: Array1<Complex64>, x: Array1<f64>, t: f64, mass: f64) -> Self
pub fn new(psi: Array1<Complex64>, x: Array1<f64>, t: f64, mass: f64) -> Self
Create a new quantum state
Sourcepub fn expectation_position(&self) -> f64
pub fn expectation_position(&self) -> f64
Calculate expectation value of position
Sourcepub fn expectation_position_simd(&self) -> f64
pub fn expectation_position_simd(&self) -> f64
SIMD-optimized expectation value of position
Sourcepub fn expectation_position_scalar(&self) -> f64
pub fn expectation_position_scalar(&self) -> f64
Fallback scalar implementation for expectation value of position
Sourcepub fn expectation_momentum(&self) -> f64
pub fn expectation_momentum(&self) -> f64
Calculate expectation value of momentum
Sourcepub fn probability_density(&self) -> Array1<f64>
pub fn probability_density(&self) -> Array1<f64>
Calculate probability density
Sourcepub fn probability_density_simd(&self) -> Array1<f64>
pub fn probability_density_simd(&self) -> Array1<f64>
SIMD-optimized probability density calculation
Sourcepub fn probability_density_scalar(&self) -> Array1<f64>
pub fn probability_density_scalar(&self) -> Array1<f64>
Fallback scalar implementation for probability density
Trait Implementations§
Source§impl Clone for QuantumState
impl Clone for QuantumState
Source§fn clone(&self) -> QuantumState
fn clone(&self) -> QuantumState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for QuantumState
impl RefUnwindSafe for QuantumState
impl Send for QuantumState
impl Sync for QuantumState
impl Unpin for QuantumState
impl UnwindSafe for QuantumState
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more