pub enum GateOperation {
U(Box<Expression>, Box<Expression>, Box<Expression>, usize),
CX(usize, usize),
Custom(String, Vec<Box<Expression>>, Vec<usize>),
}
Expand description
Operations which can be used inside of a gate declaration in openqasm. This is a subset of Operation. Unlike Operation, however, they contain Expressions instead of f32 (for reasons described in the Expression documentation) and usize instead of Qubit. The usize arguments specify which qubit to use from the gates argument list, starting from the first one at index zero.
Variants§
U(Box<Expression>, Box<Expression>, Box<Expression>, usize)
CX(usize, usize)
Custom(String, Vec<Box<Expression>>, Vec<usize>)
Implementations§
Source§impl GateOperation
impl GateOperation
Sourcepub fn get_operation(&self, params: &Vec<f32>, args: &Vec<Qubit>) -> Operation
pub fn get_operation(&self, params: &Vec<f32>, args: &Vec<Qubit>) -> Operation
Converts a GateOperation into an Operation.
Auto Trait Implementations§
impl Freeze for GateOperation
impl !RefUnwindSafe for GateOperation
impl !Send for GateOperation
impl !Sync for GateOperation
impl Unpin for GateOperation
impl !UnwindSafe for GateOperation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more