pub trait OptimizationPass {
// Required methods
fn optimize(
&self,
gates: Vec<Box<dyn GateOp>>,
) -> QuantRS2Result<Vec<Box<dyn GateOp>>>;
fn name(&self) -> &str;
// Provided method
fn is_applicable(&self, gates: &[Box<dyn GateOp>]) -> bool { ... }
}
Expand description
Trait for optimization passes
Required Methods§
Provided Methods§
Sourcefn is_applicable(&self, gates: &[Box<dyn GateOp>]) -> bool
fn is_applicable(&self, gates: &[Box<dyn GateOp>]) -> bool
Check if this pass is applicable to the given gates