pub struct And<A, B>(pub A, pub B);Expand description
Both policies: a term is kept if both keep it, and both layer passes run, first then second.
Tuple Fields§
§0: AFirst policy.
1: BSecond policy.
Trait Implementations§
Source§impl<A: Into<BuiltinTruncation>, B: Into<BuiltinTruncation>> From<And<A, B>> for BuiltinTruncation
impl<A: Into<BuiltinTruncation>, B: Into<BuiltinTruncation>> From<And<A, B>> for BuiltinTruncation
Source§impl<const W: usize, A, B> TruncationPolicy<W> for And<A, B>where
A: TruncationPolicy<W>,
B: TruncationPolicy<W>,
impl<const W: usize, A, B> TruncationPolicy<W> for And<A, B>where
A: TruncationPolicy<W>,
B: TruncationPolicy<W>,
Source§fn keep_term(&self, x: &[u64; W], z: &[u64; W], c: Complex64) -> bool
fn keep_term(&self, x: &[u64; W], z: &[u64; W], c: Complex64) -> bool
Per-term filter, run inside the merge on every output, so it must be cheap. Read more
Source§fn finalize_layer(&self, sum: &mut PauliSum<W>)
fn finalize_layer(&self, sum: &mut PauliSum<W>)
Pass over the whole sum after each layer;
PauliSum::retain is the easy way to write a filter here.Source§fn finalizes_layer(&self) -> bool
fn finalizes_layer(&self) -> bool
Whether
finalize_layer does anything, a hint that lets the engine skip it. Read moreSource§fn finalize_layer_partitioned(
&self,
local: &mut PauliSum<W>,
collectives: &dyn Collectives,
)
fn finalize_layer_partitioned( &self, local: &mut PauliSum<W>, collectives: &dyn Collectives, )
The layer pass over one partition’s slice of the layer, run on every layer on every partition in lock-step. Read more
Source§fn supports_partitioned(&self) -> bool
fn supports_partitioned(&self) -> bool
Whether
finalize_layer_partitioned runs above one partition; every partitioned driver checks it before the first layer. Read moreimpl<A: Copy, B: Copy> Copy for And<A, B>
impl<A, B> StructuralPartialEq for And<A, B>
Auto Trait Implementations§
impl<A, B> Freeze for And<A, B>
impl<A, B> RefUnwindSafe for And<A, B>where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B> Send for And<A, B>
impl<A, B> Sync for And<A, B>
impl<A, B> Unpin for And<A, B>
impl<A, B> UnwindSafe for And<A, B>where
A: UnwindSafe,
B: UnwindSafe,
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,
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