pub struct SpinBasisBuilder { /* private fields */ }Expand description
Builder for full, conserved, or symmetry-reduced spin-chain bases.
Implementations§
Source§impl SpinBasisBuilder
impl SpinBasisBuilder
Sourcepub const fn spin_twice(self, spin_twice: u16) -> Self
pub const fn spin_twice(self, spin_twice: u16) -> Self
Select the local spin as twice its quantum number.
For example, 1 selects spin one half and 2 selects spin one.
Sourcepub fn magnetization(self, up: usize) -> Self
pub fn magnetization(self, up: usize) -> Self
Alias for SpinBasisBuilder::up.
Sourcepub fn particle_sectors(self, sectors: impl IntoIterator<Item = usize>) -> Self
pub fn particle_sectors(self, sectors: impl IntoIterator<Item = usize>) -> Self
Select a union of additive spin-occupation sectors.
Sourcepub const fn momentum(self, momentum: i32) -> Self
pub const fn momentum(self, momentum: i32) -> Self
Select a translation-momentum sector.
Negative values are canonicalized modulo the lattice length when the basis is built.
Sourcepub const fn parity(self, parity: i8) -> Self
pub const fn parity(self, parity: i8) -> Self
Select a reflection sector with eigenvalue -1 or 1.
Sourcepub const fn pauli(self, pauli: bool) -> Self
pub const fn pauli(self, pauli: bool) -> Self
Select Cartesian Pauli normalization for a spin-half basis.
Sourcepub const fn normalization(self, normalization: SpinNormalization) -> Self
pub const fn normalization(self, normalization: SpinNormalization) -> Self
Select an explicit local spin normalization.
Sourcepub fn build(self) -> Result<SpinBasis1D>
pub fn build(self) -> Result<SpinBasis1D>
Validate the requested sectors and enumerate the resulting basis.
Fixed additive sectors are generated combinatorially. Translation and parity filters are then applied to physical orbits.
Trait Implementations§
Source§impl Clone for SpinBasisBuilder
impl Clone for SpinBasisBuilder
Source§fn clone(&self) -> SpinBasisBuilder
fn clone(&self) -> SpinBasisBuilder
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 moreAuto Trait Implementations§
impl Freeze for SpinBasisBuilder
impl RefUnwindSafe for SpinBasisBuilder
impl Send for SpinBasisBuilder
impl Sync for SpinBasisBuilder
impl Unpin for SpinBasisBuilder
impl UnsafeUnpin for SpinBasisBuilder
impl UnwindSafe for SpinBasisBuilder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.