pub struct GeneralBasis<Parent>{ /* private fields */ }Implementations§
Source§impl<Parent> GeneralBasis<Parent>
impl<Parent> GeneralBasis<Parent>
pub fn new( parent: Parent, sector: SymmetryReducer<Parent::State>, ) -> Result<Self>
Sourcepub fn from_reducer(
parent: Parent,
reducer: SymmetryReducer<Parent::State>,
) -> Result<Self>
pub fn from_reducer( parent: Parent, reducer: SymmetryReducer<Parent::State>, ) -> Result<Self>
Materialize a reduced basis from an independently reusable reducer.
Sourcepub fn from_reducer_with_ordering(
parent: Parent,
reducer: SymmetryReducer<Parent::State>,
ordering: RepresentativeOrdering,
) -> Result<Self>
pub fn from_reducer_with_ordering( parent: Parent, reducer: SymmetryReducer<Parent::State>, ordering: RepresentativeOrdering, ) -> Result<Self>
Materialize a reduced basis with an explicit canonical representative convention. The native default is the minimum state; compatibility frontends with descending basis order may select the maximum state without changing the physical symmetry subspace.
Sourcepub fn from_orbit_seeds(
parent: Parent,
reducer: SymmetryReducer<Parent::State>,
) -> Result<Self>
pub fn from_orbit_seeds( parent: Parent, reducer: SymmetryReducer<Parent::State>, ) -> Result<Self>
Materialize symmetry vectors whose seed states come from parent.
Unlike GeneralBasis::from_reducer, the finite symmetry orbit may
contain states outside the parent’s enumerated constraint. The parent
still supplies the local operator algebra, while its state list selects
which physical orbits enter the reduced space. This is the natural
construction for particle-hole or species-exchange symmetries acting
on a fixed additive sector: one seed sector selects an orbit, and the
normalized reduced vector contains the complete symmetry orbit.
The parent’s local action must therefore be defined for every state generated by the reducer. Built-in packed bases and callback bases satisfy this contract because local actions operate on the encoded state rather than its row index.
pub fn from_orbit_seeds_with_ordering( parent: Parent, reducer: SymmetryReducer<Parent::State>, ordering: RepresentativeOrdering, ) -> Result<Self>
pub fn parent(&self) -> &Parent
pub const fn reducer(&self) -> &SymmetryReducer<Parent::State>
pub fn representative(&self, state: Parent::State) -> Result<Parent::State>
pub fn orbit_size(&self, state: Parent::State) -> Result<usize>
Sourcepub fn symmetry_amplitude(&self, state: Parent::State) -> Result<Complex64>
pub fn symmetry_amplitude(&self, state: Parent::State) -> Result<Complex64>
Normalized coefficient of a parent state in its reduced representative.
Trait Implementations§
Source§impl<Parent> Basis for GeneralBasis<Parent>
impl<Parent> Basis for GeneralBasis<Parent>
Source§fn state(&self, index: usize) -> Result<Self::State>
fn state(&self, index: usize) -> Result<Self::State>
Source§fn apply_local(
&self,
state: Self::State,
operator: &str,
sites: &[usize],
) -> Result<Option<(Self::State, Complex64)>>
fn apply_local( &self, state: Self::State, operator: &str, sites: &[usize], ) -> Result<Option<(Self::State, Complex64)>>
Source§fn apply_local_transitions(
&self,
state: Self::State,
operator: &str,
sites: &[usize],
) -> Result<LocalTransitions<Self::State>>
fn apply_local_transitions( &self, state: Self::State, operator: &str, sites: &[usize], ) -> Result<LocalTransitions<Self::State>>
Source§fn apply_local_unreduced_transitions(
&self,
state: Self::State,
operator: &str,
sites: &[usize],
) -> Result<LocalTransitions<Self::State>>
fn apply_local_unreduced_transitions( &self, state: Self::State, operator: &str, sites: &[usize], ) -> Result<LocalTransitions<Self::State>>
Source§fn visit_local_unreduced_transitions<F>(
&self,
state: Self::State,
operator: &str,
sites: &[usize],
visit: F,
) -> Result<()>
fn visit_local_unreduced_transitions<F>( &self, state: Self::State, operator: &str, sites: &[usize], visit: F, ) -> Result<()>
Source§fn transition_orbit_size(&self, state: Self::State) -> Result<usize>
fn transition_orbit_size(&self, state: Self::State) -> Result<usize>
Source§fn reduction_image(
&self,
state: Self::State,
) -> Result<Option<ReductionImage<Self::State>>>
fn reduction_image( &self, state: Self::State, ) -> Result<Option<ReductionImage<Self::State>>>
Source§fn reduce_transition(
&self,
state: Self::State,
source_orbit_size: usize,
) -> Result<Option<(Self::State, Complex64)>>
fn reduce_transition( &self, state: Self::State, source_orbit_size: usize, ) -> Result<Option<(Self::State, Complex64)>>
Source§fn index_transition(
&self,
state: Self::State,
source_orbit_size: usize,
) -> Result<Option<(usize, Complex64)>>
fn index_transition( &self, state: Self::State, source_orbit_size: usize, ) -> Result<Option<(usize, Complex64)>>
Source§fn operator_preserves_particle_sector(&self, operator: &str) -> Result<bool>
fn operator_preserves_particle_sector(&self, operator: &str) -> Result<bool>
Source§impl<Parent> Clone for GeneralBasis<Parent>
impl<Parent> Clone for GeneralBasis<Parent>
Source§fn clone(&self) -> GeneralBasis<Parent>
fn clone(&self) -> GeneralBasis<Parent>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<Parent> Debug for GeneralBasis<Parent>
impl<Parent> Debug for GeneralBasis<Parent>
Source§impl From<GeneralBasis<BosonBasis1D>> for PackedBasis
impl From<GeneralBasis<BosonBasis1D>> for PackedBasis
Source§fn from(basis: BosonBasisGeneral) -> Self
fn from(basis: BosonBasisGeneral) -> Self
Source§impl From<GeneralBasis<SpinBasis1D>> for PackedBasis
impl From<GeneralBasis<SpinBasis1D>> for PackedBasis
Source§fn from(basis: SpinBasisGeneral) -> Self
fn from(basis: SpinBasisGeneral) -> Self
Source§impl From<GeneralBasis<SpinfulFermionBasis1D>> for PackedBasis
impl From<GeneralBasis<SpinfulFermionBasis1D>> for PackedBasis
Source§fn from(basis: SpinfulFermionBasisGeneral) -> Self
fn from(basis: SpinfulFermionBasisGeneral) -> Self
Source§impl From<GeneralBasis<SpinlessFermionBasis1D>> for PackedBasis
impl From<GeneralBasis<SpinlessFermionBasis1D>> for PackedBasis
Source§fn from(basis: SpinlessFermionBasisGeneral) -> Self
fn from(basis: SpinlessFermionBasisGeneral) -> Self
Source§impl From<GeneralBasis<UserBasis<u128>>> for PackedBasis
impl From<GeneralBasis<UserBasis<u128>>> for PackedBasis
Source§fn from(basis: UserBasisGeneral) -> Self
fn from(basis: UserBasisGeneral) -> Self
Source§impl From<GeneralBasis<WideSpinBasis<16>>> for WidePackedBasis
impl From<GeneralBasis<WideSpinBasis<16>>> for WidePackedBasis
Source§fn from(basis: WideSpinBasisGeneral1024) -> Self
fn from(basis: WideSpinBasisGeneral1024) -> Self
Source§impl From<GeneralBasis<WideSpinBasis<256>>> for WidePackedBasis
impl From<GeneralBasis<WideSpinBasis<256>>> for WidePackedBasis
Source§fn from(basis: WideSpinBasisGeneral16384) -> Self
fn from(basis: WideSpinBasisGeneral16384) -> Self
Source§impl From<GeneralBasis<WideSpinBasis<4>>> for WidePackedBasis
impl From<GeneralBasis<WideSpinBasis<4>>> for WidePackedBasis
Source§fn from(basis: WideSpinBasisGeneral256) -> Self
fn from(basis: WideSpinBasisGeneral256) -> Self
Source§impl From<GeneralBasis<WideSpinBasis<64>>> for WidePackedBasis
impl From<GeneralBasis<WideSpinBasis<64>>> for WidePackedBasis
Source§fn from(basis: WideSpinBasisGeneral4096) -> Self
fn from(basis: WideSpinBasisGeneral4096) -> Self
Auto Trait Implementations§
impl<Parent> Freeze for GeneralBasis<Parent>where
Parent: Freeze,
impl<Parent> !RefUnwindSafe for GeneralBasis<Parent>
impl<Parent> Send for GeneralBasis<Parent>
impl<Parent> Sync for GeneralBasis<Parent>
impl<Parent> Unpin for GeneralBasis<Parent>
impl<Parent> UnsafeUnpin for GeneralBasis<Parent>where
Parent: UnsafeUnpin,
impl<Parent> !UnwindSafe for GeneralBasis<Parent>
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
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>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.