Skip to main content

QuantumOps

Trait QuantumOps 

Source
pub trait QuantumOps {
    // Required methods
    fn dag(&self) -> Self;
    fn bracket(&self, other: &Self) -> Complex<f64>;
    fn expectation_value(&self, operator: &Self) -> Complex<f64>;
    fn normalize(&self) -> Self;
}
Expand description

Core Quantum State Operations (Dirac Notation).

Required Methods§

Source

fn dag(&self) -> Self

Hermitian Conjugate (Adjoint) $A^\dagger$.

Source

fn bracket(&self, other: &Self) -> Complex<f64>

Inner Product (Dirac Bracket): $\langle \phi | \psi \rangle$.

Source

fn expectation_value(&self, operator: &Self) -> Complex<f64>

Expectation Value: $\langle \psi | A | \psi \rangle$.

Source

fn normalize(&self) -> Self

Normalize the state vector: $|\psi\rangle / \sqrt{\langle\psi|\psi\rangle}$.

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.

Implementations on Foreign Types§

Source§

impl QuantumOps for CausalMultiVector<Complex<f64>>

Source§

fn dag(&self) -> Self

Source§

fn bracket(&self, other: &Self) -> Complex<f64>

Source§

fn expectation_value(&self, operator: &Self) -> Complex<f64>

Source§

fn normalize(&self) -> Self

Implementors§