pub struct HilbertState<R: RealField> { /* private fields */ }Expand description
A strong type representing a Quantum State Vector (Ket) |ψ>.
This represents a Minimal Left Ideal of the algebra Cl(10) (or others), acting as the Hilbert Space.
§Invariants
- The coefficients are
Complex<R>for anyR: RealFieldchosen by the caller (f32,f64,Float106, …). The type parameter has no default — call sites must spell the precision explicitly (e.g.HilbertState::<f64>::new(...)). - The Metric is fixed at construction time (preventing mixed-algebra operations).
Implementations§
Source§impl<R: RealField> HilbertState<R>
impl<R: RealField> HilbertState<R>
Sourcepub fn new_spin10(data: Vec<Complex<R>>) -> Result<Self, CausalMultiVectorError>
pub fn new_spin10(data: Vec<Complex<R>>) -> Result<Self, CausalMultiVectorError>
Creates a new Hilbert State for the Grand Unified Algebra (Spin(10)). This enforces the metric Cl(10) (NonEuclidean, 10D).
Sourcepub fn new(
data: Vec<Complex<R>>,
metric: Metric,
) -> Result<Self, CausalMultiVectorError>
pub fn new( data: Vec<Complex<R>>, metric: Metric, ) -> Result<Self, CausalMultiVectorError>
Generic constructor for other quantum systems (e.g. Qubits / Cl(2)).
pub fn new_unchecked(data: Vec<Complex<R>>, metric: Metric) -> Self
pub fn from_multivector(mv: CausalMultiVector<Complex<R>>) -> Self
Sourcepub fn into_inner(self) -> CausalMultiVector<Complex<R>>
pub fn into_inner(self) -> CausalMultiVector<Complex<R>>
Unwraps the state to access the underlying algebraic object. Useful when you need to perform raw geometric operations.
Sourcepub fn as_inner(&self) -> &CausalMultiVector<Complex<R>>
pub fn as_inner(&self) -> &CausalMultiVector<Complex<R>>
Borrows the underlying algebraic object.
pub fn mv(&self) -> &CausalMultiVector<Complex<R>>
Trait Implementations§
Source§impl<R: RealField> Add for HilbertState<R>
impl<R: RealField> Add for HilbertState<R>
Source§impl<R: Clone + RealField> Clone for HilbertState<R>
impl<R: Clone + RealField> Clone for HilbertState<R>
Source§fn clone(&self) -> HilbertState<R>
fn clone(&self) -> HilbertState<R>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<R: RealField> Default for HilbertState<R>
impl<R: RealField> Default for HilbertState<R>
Source§impl<R: PartialEq + RealField> PartialEq for HilbertState<R>
impl<R: PartialEq + RealField> PartialEq for HilbertState<R>
Source§fn eq(&self, other: &HilbertState<R>) -> bool
fn eq(&self, other: &HilbertState<R>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<R: RealField> StructuralPartialEq for HilbertState<R>
Source§impl<R: RealField> TryFrom<&HilbertState<R>> for HopfState<R>
Conversion: Quantum State (Spinor) -> Topological Rotor (Hopf).
impl<R: RealField> TryFrom<&HilbertState<R>> for HopfState<R>
Conversion: Quantum State (Spinor) -> Topological Rotor (Hopf).
Source§type Error = CausalMultiVectorError
type Error = CausalMultiVectorError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl<R> Freeze for HilbertState<R>
impl<R> RefUnwindSafe for HilbertState<R>where
R: RefUnwindSafe,
impl<R> Send for HilbertState<R>where
R: Send,
impl<R> Sync for HilbertState<R>where
R: Sync,
impl<R> Unpin for HilbertState<R>where
R: Unpin,
impl<R> UnsafeUnpin for HilbertState<R>
impl<R> UnwindSafe for HilbertState<R>where
R: UnwindSafe,
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