pub enum PartitionRowPolicy {
Seeded(Option<u64>),
Cut(Vec<Vec<usize>>),
SeededExcluding {
seed: Option<u64>,
exclude_x: Vec<usize>,
exclude_z: Vec<usize>,
},
}Expand description
Which partition rows a scatter splits by: a seeded GF(2)-random draw, or a qubit cut that keeps a channel local when its qubits share a block.
Variants§
Seeded(Option<u64>)
PartitionRows::from_seed with this seed, or the sum’s own hash seed at None; the default.
Cut(Vec<Vec<usize>>)
PartitionRows::cut: one disjoint qubit block per rank, in rank order; the rows are z-only.
SeededExcluding
PartitionRows::from_seed_excluding: a seeded draw whose rows read neither the x-bits of exclude_x nor the z-bits of exclude_z, so keys differing only there share a partition.
Implementations§
Source§impl PartitionRowPolicy
impl PartitionRowPolicy
Sourcepub fn rows<const W: usize>(
&self,
num_qubits: usize,
bits: u8,
default_seed: u64,
) -> PartitionRows<W>
pub fn rows<const W: usize>( &self, num_qubits: usize, bits: u8, default_seed: u64, ) -> PartitionRows<W>
The rows for 2^bits partitions of a num_qubits register, with default_seed standing in for a None seed.
§Panics
As PartitionRows::cut or PartitionRows::from_seed_excluding, and if an excluded qubit is out of range.
Trait Implementations§
Source§impl Clone for PartitionRowPolicy
impl Clone for PartitionRowPolicy
Source§fn clone(&self) -> PartitionRowPolicy
fn clone(&self) -> PartitionRowPolicy
Returns a duplicate of the value. Read more
1.0.0 · 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 PartitionRowPolicy
impl Debug for PartitionRowPolicy
Source§impl PartialEq for PartitionRowPolicy
impl PartialEq for PartitionRowPolicy
impl Eq for PartitionRowPolicy
impl StructuralPartialEq for PartitionRowPolicy
Auto Trait Implementations§
impl Freeze for PartitionRowPolicy
impl RefUnwindSafe for PartitionRowPolicy
impl Send for PartitionRowPolicy
impl Sync for PartitionRowPolicy
impl Unpin for PartitionRowPolicy
impl UnwindSafe for PartitionRowPolicy
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<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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more