pub struct LatticeSymmetryMap { /* private fields */ }Expand description
Runtime-owned finite symmetry of a packed lattice state.
destinations[source] gives the target site. Each source site also owns a
permutation of its local digits, allowing the same representation to cover
translations, reflections, sublattice maps, and local spin inversion.
Fermionic maps compute the parity of the originally occupied-orbital
permutation instead of requiring a frontend-provided phase callback.
Binary local permutations may also exchange empty and occupied digits.
Such particle-hole flips change the mapped occupation but introduce no
additional Fock-state phase; the orbital reordering alone fixes the sign.
Implementations§
Source§impl LatticeSymmetryMap
impl LatticeSymmetryMap
pub fn new( states_per_site: usize, destinations: impl Into<Vec<usize>>, local_permutations: Option<Vec<Vec<usize>>>, statistics: ExchangeStatistics, ) -> Result<Self>
pub fn site_permutation( states_per_site: usize, destinations: impl Into<Vec<usize>>, ) -> Result<Self>
pub fn fermionic_orbital_permutation( destinations: impl Into<Vec<usize>>, ) -> Result<Self>
pub fn sites(&self) -> usize
pub const fn states_per_site(&self) -> usize
pub fn destinations(&self) -> &[usize]
pub fn local_permutations(&self) -> &[Vec<usize>]
pub const fn statistics(&self) -> ExchangeStatistics
pub const fn period(&self) -> usize
Trait Implementations§
Source§impl Clone for LatticeSymmetryMap
impl Clone for LatticeSymmetryMap
Source§fn clone(&self) -> LatticeSymmetryMap
fn clone(&self) -> LatticeSymmetryMap
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 moreSource§impl Debug for LatticeSymmetryMap
impl Debug for LatticeSymmetryMap
Source§impl SymmetryMap<ErasedState> for LatticeSymmetryMap
impl SymmetryMap<ErasedState> for LatticeSymmetryMap
Source§impl<const WORDS: usize> SymmetryMap<WideState<WORDS>> for LatticeSymmetryMap
impl<const WORDS: usize> SymmetryMap<WideState<WORDS>> for LatticeSymmetryMap
Auto Trait Implementations§
impl Freeze for LatticeSymmetryMap
impl RefUnwindSafe for LatticeSymmetryMap
impl Send for LatticeSymmetryMap
impl Sync for LatticeSymmetryMap
impl Unpin for LatticeSymmetryMap
impl UnsafeUnpin for LatticeSymmetryMap
impl UnwindSafe for LatticeSymmetryMap
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.