pub trait GateOp:
Debug
+ Send
+ Sync {
// Required methods
fn name(&self) -> &'static str;
fn qubits(&self) -> Vec<QubitId>;
fn matrix(&self) -> QuantRS2Result<Vec<Complex64>>;
fn as_any(&self) -> &dyn Any;
// Provided methods
fn num_qubits(&self) -> usize { ... }
fn is_parameterized(&self) -> bool { ... }
}Expand description
Trait for quantum gate operations
Required Methods§
Sourcefn matrix(&self) -> QuantRS2Result<Vec<Complex64>>
fn matrix(&self) -> QuantRS2Result<Vec<Complex64>>
Returns the matrix representation of this gate
Provided Methods§
Sourcefn num_qubits(&self) -> usize
fn num_qubits(&self) -> usize
Returns the number of qubits this gate acts on
Sourcefn is_parameterized(&self) -> bool
fn is_parameterized(&self) -> bool
Returns true if this gate is parameterized