pub trait ParametricGate:
Debug
+ Send
+ Sync {
// Required methods
fn to_concrete_gates(
&self,
target_indices: &[usize],
control_indices: &[usize],
) -> Vec<Gate>;
fn box_clone(&self) -> Box<dyn ParametricGate>;
}Expand description
A trait for gates that can be parametrised.
The trait defines the to_concrete_gate method for creating a concrete gate from the parametrised gate.
This is required for applying the parametrised gate in a circuit or compiling it into OpenQASM.
Required Methods§
Sourcefn to_concrete_gates(
&self,
target_indices: &[usize],
control_indices: &[usize],
) -> Vec<Gate>
fn to_concrete_gates( &self, target_indices: &[usize], control_indices: &[usize], ) -> Vec<Gate>
Sourcefn box_clone(&self) -> Box<dyn ParametricGate>
fn box_clone(&self) -> Box<dyn ParametricGate>
Clones the trait object.
This is required by the Gate trait.