pub struct WeightCutoff(pub u32);Expand description
Drop terms whose Pauli weight (number of non-identity qubits) exceeds k.
Tuple Fields§
§0: u32Maximum allowed Pauli weight. Terms with weight > k are dropped.
Trait Implementations§
Source§impl Clone for WeightCutoff
impl Clone for WeightCutoff
Source§fn clone(&self) -> WeightCutoff
fn clone(&self) -> WeightCutoff
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 WeightCutoff
impl Debug for WeightCutoff
Source§impl From<WeightCutoff> for BuiltinTruncation
impl From<WeightCutoff> for BuiltinTruncation
Source§fn from(p: WeightCutoff) -> Self
fn from(p: WeightCutoff) -> Self
Converts to this type from the input type.
Source§impl PartialEq for WeightCutoff
impl PartialEq for WeightCutoff
Source§impl<const W: usize> TruncationPolicy<W> for WeightCutoff
impl<const W: usize> TruncationPolicy<W> for WeightCutoff
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 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(&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 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 Copy for WeightCutoff
impl StructuralPartialEq for WeightCutoff
Auto Trait Implementations§
impl Freeze for WeightCutoff
impl RefUnwindSafe for WeightCutoff
impl Send for WeightCutoff
impl Sync for WeightCutoff
impl Unpin for WeightCutoff
impl UnwindSafe for WeightCutoff
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