pub enum Operation {
Gate {
name: GateType,
qubits: Vec<usize>,
params: Vec<f64>,
},
Measure {
qubit: usize,
cbit: usize,
},
Reset {
qubit: usize,
},
Barrier {
qubits: Vec<usize>,
},
}Expand description
Represents a single operation in the quantum circuit.
Operations can be quantum gates, measurements, resets, or barriers.
Variants§
Gate
A quantum gate application.
Fields
Measure
A measurement operation.
Fields
Reset
Reset a qubit to the |0> state.
Barrier
A barrier to prevent optimizations across a boundary.
Trait Implementations§
impl StructuralPartialEq for Operation
Auto Trait Implementations§
impl Freeze for Operation
impl RefUnwindSafe for Operation
impl Send for Operation
impl Sync for Operation
impl Unpin for Operation
impl UnsafeUnpin for Operation
impl UnwindSafe for Operation
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