Trait GateComposable

Source
pub trait GateComposable: GateOp {
    // Required methods
    fn compose_with(
        &self,
        other: &dyn GateOp,
    ) -> QuantRS2Result<Box<dyn GateOp>>;
    fn can_compose_with(&self, other: &dyn GateOp) -> bool;
}
Expand description

Trait for gate composition

Required Methods§

Source

fn compose_with(&self, other: &dyn GateOp) -> QuantRS2Result<Box<dyn GateOp>>

Compose this gate with another gate

Source

fn can_compose_with(&self, other: &dyn GateOp) -> bool

Check if this gate can be composed with another gate

Implementors§