QuantumOps

Trait QuantumOps 

Source
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§

Source

fn dag(&self) -> Self

The Hermitian Conjugate (The “Bra” <psi|) Corresponds to Reversion (Geometry) + Complex Conjugation (Coefficients).

Source

fn bracket(&self, other: &Self) -> Complex64

The Inner Product <self | other> Returns the Probability Amplitude (Scalar).

Source

fn expectation_value(&self, operator: &Self) -> Complex64

The Expectation Value <self | Operator | self> Returns the observable value (Scalar).

Source

fn normalize(&self) -> Self

Normalizes the state so <psi|psi> = 1

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.

Implementors§