pub trait Gate: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn compute(&self, angles: &[f64]) -> DataTensor;
// Provided method
fn adjoint(&self, angles: &[f64]) -> DataTensor { ... }
}Expand description
A quantum gate.
Required Methods§
Provided Methods§
Trait Implementations§
Source§impl Borrow<str> for Box<dyn Gate>
This allows us to use a &str as a key in a HashSet of gates.
impl Borrow<str> for Box<dyn Gate>
This allows us to use a &str as a key in a HashSet of gates.