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>>
Source§impl<R: RealField + Default> HilbertState<R>
impl<R: RealField + Default> HilbertState<R>
Sourcepub fn to_ket(&self) -> Result<CausalTensor<Complex<R>>, CausalMultiVectorError>
pub fn to_ket(&self) -> Result<CausalTensor<Complex<R>>, CausalMultiVectorError>
The d-dimensional complex column of this ket in the matrix
representation: column KET_COLUMN of to_matrix(), scaled by
1/√D so that the raw column inner product k(φ)ᴴ · k(ψ) equals the
metric-correct Dirac product ⟨φ|ψ⟩ on the minimal left ideal (and a
Dirac-normalized ket yields a unit-trace ρ = k·kᴴ).
Defined only for even-dimensional metrics, where to_matrix() is
a bijection (D² = 2ⁿ) — including Cl(0,10) (D = 32).
§Errors
Returns a DimensionMismatch for an odd-dimensional metric (the
expected field carries the next even dimension).
Sourcepub fn from_ket(
ket: &CausalTensor<Complex<R>>,
metric: Metric,
) -> Result<Self, CausalMultiVectorError>
pub fn from_ket( ket: &CausalTensor<Complex<R>>, metric: Metric, ) -> Result<Self, CausalMultiVectorError>
Embeds a d-dimensional complex column as a minimal-left-ideal ket:
the column is placed (scaled by √D, the inverse of the Self::to_ket
gain) at column KET_COLUMN of a D×D matrix and mapped back via
from_matrix, so to_ket(from_ket(v)) == v exactly.
Accepts a ket of shape [D] or [D, 1] with D = 2^(n/2); defined
only for even-dimensional metrics.
§Errors
Returns a DimensionMismatch for an odd-dimensional metric, or a
DataLengthMismatch if the ket is not a D-vector / D×1 column.
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>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<R: RealField> Default for HilbertState<R>
impl<R: RealField> Default for HilbertState<R>
impl<R: PartialEq + 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).