pub struct FlowKey<'c> { /* private fields */ }Expand description
A borrowed, translated open-flow boundary key.
The key holds a PauliMap plus its placement offset. Hashing and equality
act on the translated entries, so equal
absolute boundaries match regardless of which (map, offset) pair
produced them, and matching never materializes a translated map. The
translated hash is computed once at construction: table growth re-hashes
every stored key, so a recomputed hash would re-translate every entry on
each rehash.
Implementations§
Source§impl<'c> FlowKey<'c>
impl<'c> FlowKey<'c>
Sourcepub fn try_new(
map: &'c PauliMap,
offset: IVec2,
) -> Result<Self, CoordinateOverflowError>
pub fn try_new( map: &'c PauliMap, offset: IVec2, ) -> Result<Self, CoordinateOverflowError>
Borrow a boundary at a checked placement without allocating a translated map.
§Errors
Returns crate::CoordinateOverflowError if a translated coordinate
exceeds the signed 32-bit lattice.
Trait Implementations§
impl<'c> Copy for FlowKey<'c>
impl Eq for FlowKey<'_>
Auto Trait Implementations§
impl<'c> Freeze for FlowKey<'c>
impl<'c> RefUnwindSafe for FlowKey<'c>
impl<'c> Send for FlowKey<'c>
impl<'c> Sync for FlowKey<'c>
impl<'c> Unpin for FlowKey<'c>
impl<'c> UnsafeUnpin for FlowKey<'c>
impl<'c> UnwindSafe for FlowKey<'c>
Blanket Implementations§
§impl<T, BorrowedSelf> BitwiseMutViaBorrow<BorrowedSelf> for T
impl<T, BorrowedSelf> BitwiseMutViaBorrow<BorrowedSelf> for T
fn assign_index(&mut self, index: usize, to: bool)
fn negate_index(&mut self, index: usize)
fn clear_bits(&mut self)
fn assign_random(
&mut self,
bit_count: usize,
random_number_generator: &mut impl RngExt,
)where
BorrowedSelf: BitLength,
§impl<Bits, Other, BorrowedSelf, BorrowedOther> BitwisePairMutViaBorrow<Other, BorrowedSelf, BorrowedOther> for Bits
impl<Bits, Other, BorrowedSelf, BorrowedOther> BitwisePairMutViaBorrow<Other, BorrowedSelf, BorrowedOther> for Bits
fn assign(&mut self, other: &Other)
fn bitxor_assign(&mut self, other: &Other)
fn bitand_assign(&mut self, other: &Other)
fn bitor_assign(&mut self, other: &Other)
§impl<T, Other, BorrowedSelf, BorrowedOther> BitwisePairViaBorrow<Other, BorrowedSelf, BorrowedOther> for T
impl<T, Other, BorrowedSelf, BorrowedOther> BitwisePairViaBorrow<Other, BorrowedSelf, BorrowedOther> for T
§impl<T, BorrowedSelf> BitwiseViaBorrow<BorrowedSelf> for T
impl<T, BorrowedSelf> BitwiseViaBorrow<BorrowedSelf> for T
fn index(&self, index: usize) -> bool
fn weight(&self) -> usize
fn parity(&self) -> bool
fn is_zero(&self) -> bool
fn is_unit(&self, index: usize) -> bool
fn support<'a>(&'a self) -> impl SortedIteratorwhere
BorrowedSelf: 'a,
fn max_support(&self) -> Option<usize>
fn min_support(&self) -> Option<usize>
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.