pub enum Instruction<Q> {
Gate {
gate: QuantumGate,
target: Q,
control: Vec<Q>,
},
Identity,
Measure {
qubits: Vec<Q>,
index: usize,
},
Sample {
qubits: Vec<Q>,
index: usize,
shots: usize,
},
Dump {
qubits: Vec<Q>,
index: usize,
},
ExpValue {
hamiltonian: Hamiltonian<Q>,
index: usize,
},
U2Gates {
gates: Vec<QuantumGate>,
qubit: Q,
},
}Variants§
Trait Implementations§
Source§impl<Q: Clone> Clone for Instruction<Q>
impl<Q: Clone> Clone for Instruction<Q>
Source§fn clone(&self) -> Instruction<Q>
fn clone(&self) -> Instruction<Q>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<Q: Debug> Debug for Instruction<Q>
impl<Q: Debug> Debug for Instruction<Q>
Source§impl<Q> Default for Instruction<Q>
impl<Q> Default for Instruction<Q>
Source§fn default() -> Instruction<Q>
fn default() -> Instruction<Q>
Returns the “default value” for a type. Read more
Source§impl<'de, Q> Deserialize<'de> for Instruction<Q>where
Q: Deserialize<'de>,
impl<'de, Q> Deserialize<'de> for Instruction<Q>where
Q: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<Q> Freeze for Instruction<Q>where
Q: Freeze,
impl<Q> RefUnwindSafe for Instruction<Q>where
Q: RefUnwindSafe,
impl<Q> Send for Instruction<Q>where
Q: Send,
impl<Q> Sync for Instruction<Q>where
Q: Sync,
impl<Q> Unpin for Instruction<Q>where
Q: Unpin,
impl<Q> UnwindSafe for Instruction<Q>where
Q: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more