pub struct GroupCommutingOpsPass { /* private fields */ }Expand description
Groups commuting PauliGraph operations by inserting Op::SetBoundary
operations.
This pass checks only the commutation of Op::Rotation, Op::Measure,
Op::Reset, and Op::ConditionalBox. All other operations are treated
as non-commuting.
Consider running the CanonicalFormPass first.
§Warning
This pass does not insert group boundaries inside an Op::ConditionalBox.
§Fields
max_set_size(usize) - Maximum size of a commuting set. The default is 50.
§Examples
use tk_pg_optimize::GroupCommutingOpsPass;
let s = GroupCommutingOpsPass::new().with_max_set_size(100);Implementations§
Source§impl GroupCommutingOpsPass
impl GroupCommutingOpsPass
Sourcepub fn with_max_set_size(self, max_set_size: usize) -> Self
pub fn with_max_set_size(self, max_set_size: usize) -> Self
Trait Implementations§
Source§impl Default for GroupCommutingOpsPass
impl Default for GroupCommutingOpsPass
Source§impl PGPass for GroupCommutingOpsPass
impl PGPass for GroupCommutingOpsPass
Source§fn transform(&self, pg: &PauliGraph) -> PauliGraph
fn transform(&self, pg: &PauliGraph) -> PauliGraph
Produces a transformed Pauli graph from the provided input graph.
Auto Trait Implementations§
impl Freeze for GroupCommutingOpsPass
impl RefUnwindSafe for GroupCommutingOpsPass
impl Send for GroupCommutingOpsPass
impl Sync for GroupCommutingOpsPass
impl Unpin for GroupCommutingOpsPass
impl UnsafeUnpin for GroupCommutingOpsPass
impl UnwindSafe for GroupCommutingOpsPass
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> 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