pub enum RankOneTwo<T: FloatExt + Hash> {
Rank1(Rank1<T>),
Rank2(Det1<T>),
}Expand description
Represents a 2×2 complex matrix of rank 1 or 2, in a compact structured form.
Variants§
Rank1(Rank1<T>)
A rank-1 matrix of the formM = |ket⟩⟨bra|.
This variant encodes a matrix as the outer product of a normalized ket and bra.
Rank2(Det1<T>)
A full-rank 2×2 complex matrix with unit determinant.
The matrix is expressed in the Pauli (quaternion) basis, and may be Hermitian or non-Hermitian.
Implementations§
Source§impl<T: FloatExt + Hash> RankOneTwo<T>
impl<T: FloatExt + Hash> RankOneTwo<T>
Trait Implementations§
Source§impl<T: Clone + FloatExt + Hash> Clone for RankOneTwo<T>
impl<T: Clone + FloatExt + Hash> Clone for RankOneTwo<T>
Source§fn clone(&self) -> RankOneTwo<T>
fn clone(&self) -> RankOneTwo<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<T: Copy + FloatExt + Hash> Copy for RankOneTwo<T>
impl<T: Eq + FloatExt + Hash> Eq for RankOneTwo<T>
impl<T: FloatExt + Hash> StructuralPartialEq for RankOneTwo<T>
Auto Trait Implementations§
impl<T> Freeze for RankOneTwo<T>where
T: Freeze,
impl<T> RefUnwindSafe for RankOneTwo<T>where
T: RefUnwindSafe,
impl<T> Send for RankOneTwo<T>where
T: Send,
impl<T> Sync for RankOneTwo<T>where
T: Sync,
impl<T> Unpin for RankOneTwo<T>where
T: Unpin,
impl<T> UnwindSafe for RankOneTwo<T>where
T: 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