Struct roqoqo::operations::PragmaAnnotatedOp
source · pub struct PragmaAnnotatedOp {
pub operation: Box<Operation>,
pub annotation: String,
}
Expand description
This PRAGMA annotates an Operation.
Fields§
§operation: Box<Operation>
The Operation to be annotated.
annotation: String
The annotation.
Implementations§
Trait Implementations§
source§impl Clone for PragmaAnnotatedOp
impl Clone for PragmaAnnotatedOp
source§fn clone(&self) -> PragmaAnnotatedOp
fn clone(&self) -> PragmaAnnotatedOp
Returns a copy 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 Debug for PragmaAnnotatedOp
impl Debug for PragmaAnnotatedOp
source§impl<'de> Deserialize<'de> for PragmaAnnotatedOp
impl<'de> Deserialize<'de> for PragmaAnnotatedOp
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
source§impl From<PragmaAnnotatedOp> for Operation
impl From<PragmaAnnotatedOp> for Operation
Implements the From trait from this Operation.
source§fn from(v: PragmaAnnotatedOp) -> Self
fn from(v: PragmaAnnotatedOp) -> Self
Performs the conversion.
source§impl InvolveQubits for PragmaAnnotatedOp
impl InvolveQubits for PragmaAnnotatedOp
source§fn involved_qubits(&self) -> InvolvedQubits
fn involved_qubits(&self) -> InvolvedQubits
Returns all qubits involved in operation.
source§fn involved_classical(&self) -> InvolvedClassical
fn involved_classical(&self) -> InvolvedClassical
Returns all classical registers involved in operation.
source§impl Operate for PragmaAnnotatedOp
impl Operate for PragmaAnnotatedOp
source§impl PartialEq for PragmaAnnotatedOp
impl PartialEq for PragmaAnnotatedOp
source§fn eq(&self, other: &PragmaAnnotatedOp) -> bool
fn eq(&self, other: &PragmaAnnotatedOp) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for PragmaAnnotatedOp
impl Serialize for PragmaAnnotatedOp
source§impl Substitute for PragmaAnnotatedOp
impl Substitute for PragmaAnnotatedOp
Implements Substitute trait allowing to replace symbolic parameters and to perform qubit mappings.
source§fn remap_qubits(
&self,
mapping: &HashMap<usize, usize>
) -> Result<Self, RoqoqoError>
fn remap_qubits( &self, mapping: &HashMap<usize, usize> ) -> Result<Self, RoqoqoError>
Remaps qubits in operations in clone of the operation.
source§fn substitute_parameters(
&self,
calculator: &Calculator
) -> Result<Self, RoqoqoError>
fn substitute_parameters( &self, calculator: &Calculator ) -> Result<Self, RoqoqoError>
Substitutes symbolic parameters in clone of the operation.
source§impl SupportedVersion for PragmaAnnotatedOp
impl SupportedVersion for PragmaAnnotatedOp
source§impl TryFrom<Operation> for PragmaAnnotatedOp
impl TryFrom<Operation> for PragmaAnnotatedOp
Implements the core::convert::TryFrom trait into this Operation.
impl ImplementedIn1point8 for PragmaAnnotatedOp
impl OperatePragma for PragmaAnnotatedOp
impl StructuralPartialEq for PragmaAnnotatedOp
Auto Trait Implementations§
impl Freeze for PragmaAnnotatedOp
impl RefUnwindSafe for PragmaAnnotatedOp
impl Send for PragmaAnnotatedOp
impl Sync for PragmaAnnotatedOp
impl Unpin for PragmaAnnotatedOp
impl UnwindSafe for PragmaAnnotatedOp
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.