pub struct SpinfulFermionBasisBuilder { /* private fields */ }Expand description
Builder for full or number-conserving two-species fermion spaces.
Implementations§
Source§impl SpinfulFermionBasisBuilder
impl SpinfulFermionBasisBuilder
Sourcepub const fn particles_up(self, particles: usize) -> Self
pub const fn particles_up(self, particles: usize) -> Self
Restrict only the up-species particle number.
Sourcepub const fn particles_down(self, particles: usize) -> Self
pub const fn particles_down(self, particles: usize) -> Self
Restrict only the down-species particle number.
Sourcepub fn particles(self, up: usize, down: usize) -> Self
pub fn particles(self, up: usize, down: usize) -> Self
Restrict both species to one fixed (up, down) sector.
Sourcepub fn particle_sectors(
self,
sectors: impl IntoIterator<Item = (usize, usize)>,
) -> Self
pub fn particle_sectors( self, sectors: impl IntoIterator<Item = (usize, usize)>, ) -> Self
Select a union of fixed (N_up, N_down) sectors.
Sourcepub fn local_occupation_constraint(
self,
constraint: LocalOccupationConstraint,
) -> Self
pub fn local_occupation_constraint( self, constraint: LocalOccupationConstraint, ) -> Self
Restrict the allowed site-local occupation masks for the two binary fermion species.
Sourcepub fn build(self) -> Result<SpinfulFermionBasis1D>
pub fn build(self) -> Result<SpinfulFermionBasis1D>
Validate species sectors and enumerate the spinful Fock basis.
Trait Implementations§
Source§impl Clone for SpinfulFermionBasisBuilder
impl Clone for SpinfulFermionBasisBuilder
Source§fn clone(&self) -> SpinfulFermionBasisBuilder
fn clone(&self) -> SpinfulFermionBasisBuilder
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 SpinfulFermionBasisBuilder
impl RefUnwindSafe for SpinfulFermionBasisBuilder
impl Send for SpinfulFermionBasisBuilder
impl Sync for SpinfulFermionBasisBuilder
impl Unpin for SpinfulFermionBasisBuilder
impl UnsafeUnpin for SpinfulFermionBasisBuilder
impl UnwindSafe for SpinfulFermionBasisBuilder
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.