pub trait QuantumOps {
// Required methods
fn dag(&self) -> Self;
fn bracket(&self, other: &Self) -> Complex64;
fn expectation_value(&self, operator: &Self) -> Complex64;
fn normalize(&self) -> Self;
}Expand description
Operations specific to Quantum Mechanics / Hilbert Spaces. These correspond to Bra-Ket notation operations.
Required Methods§
Sourcefn dag(&self) -> Self
fn dag(&self) -> Self
The Hermitian Conjugate (The “Bra” <psi|) Corresponds to Reversion (Geometry) + Complex Conjugation (Coefficients).
Sourcefn bracket(&self, other: &Self) -> Complex64
fn bracket(&self, other: &Self) -> Complex64
The Inner Product <self | other> Returns the Probability Amplitude (Scalar).
Sourcefn expectation_value(&self, operator: &Self) -> Complex64
fn expectation_value(&self, operator: &Self) -> Complex64
The Expectation Value <self | Operator | self> Returns the observable value (Scalar).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.