Struct roqoqo::operations::PragmaOverrotation
source · pub struct PragmaOverrotation {
gate_hqslang: String,
qubits: Vec<usize>,
amplitude: f64,
variance: f64,
}
Expand description
The statistical overrotation PRAGMA operation.
This PRAGMA applies a statistical overrotation to the next rotation gate in the circuit, which
matches the hqslang name in the gate
parameter of PragmaOverrotation and the involved qubits in qubits
.
The applied overrotation corresponds to adding a random number to the rotation angle.
The random number is drawn from a normal distribution with mean 0
and standard deviation variance
and is multiplied by the amplitude
.
Fields§
§gate_hqslang: String
The unique hqslang name of the gate to overrotate.
qubits: Vec<usize>
The qubits of the gate to overrotate.
amplitude: f64
The amplitude the random number is multiplied by.
variance: f64
The standard deviation of the normal distribution the random number is drawn from.
Implementations§
source§impl PragmaOverrotation
impl PragmaOverrotation
sourcepub fn gate_hqslang(&self) -> &String
pub fn gate_hqslang(&self) -> &String
Returns the value of the field gate_hqslang
.
Trait Implementations§
source§impl Clone for PragmaOverrotation
impl Clone for PragmaOverrotation
source§fn clone(&self) -> PragmaOverrotation
fn clone(&self) -> PragmaOverrotation
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PragmaOverrotation
impl Debug for PragmaOverrotation
source§impl<'de> Deserialize<'de> for PragmaOverrotation
impl<'de> Deserialize<'de> for PragmaOverrotation
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>,
source§impl From<PragmaOverrotation> for MultiQubitOperation
impl From<PragmaOverrotation> for MultiQubitOperation
Implements the From trait from this Operation.
source§fn from(v: PragmaOverrotation) -> Self
fn from(v: PragmaOverrotation) -> Self
Performs the conversion.
source§impl From<PragmaOverrotation> for Operation
impl From<PragmaOverrotation> for Operation
Implements the From trait from this Operation.
source§fn from(v: PragmaOverrotation) -> Self
fn from(v: PragmaOverrotation) -> Self
Performs the conversion.
source§impl From<PragmaOverrotation> for PragmaOperation
impl From<PragmaOverrotation> for PragmaOperation
Implements the From trait from this Operation.
source§fn from(v: PragmaOverrotation) -> Self
fn from(v: PragmaOverrotation) -> Self
Performs the conversion.
source§impl InvolveQubits for PragmaOverrotation
impl InvolveQubits for PragmaOverrotation
Implements InvolveQubits trait for the qubits involved in this Operation.
source§fn involved_qubits(&self) -> InvolvedQubits
fn involved_qubits(&self) -> InvolvedQubits
Returns a list of all involved qubits.
source§fn involved_classical(&self) -> InvolvedClassical
fn involved_classical(&self) -> InvolvedClassical
source§impl Operate for PragmaOverrotation
impl Operate for PragmaOverrotation
Implements the universal basic trait Operate for this Operation.
source§impl OperateMultiQubit for PragmaOverrotation
impl OperateMultiQubit for PragmaOverrotation
Implements OperateMultiQubit trait for this Operation acting on a set of qubits.
source§impl PartialEq for PragmaOverrotation
impl PartialEq for PragmaOverrotation
source§fn eq(&self, other: &PragmaOverrotation) -> bool
fn eq(&self, other: &PragmaOverrotation) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for PragmaOverrotation
impl Serialize for PragmaOverrotation
source§impl Substitute for PragmaOverrotation
impl Substitute for PragmaOverrotation
Implements Substitute trait allowing to replace symbolic parameters and to perform qubit mappings.
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§fn remap_qubits(
&self,
mapping: &HashMap<usize, usize>
) -> Result<Self, RoqoqoError>
fn remap_qubits( &self, mapping: &HashMap<usize, usize> ) -> Result<Self, RoqoqoError>
Remaps the qubits in clone of the operation.
source§impl TryFrom<MultiQubitOperation> for PragmaOverrotation
impl TryFrom<MultiQubitOperation> for PragmaOverrotation
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<Operation> for PragmaOverrotation
impl TryFrom<Operation> for PragmaOverrotation
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<PragmaOperation> for PragmaOverrotation
impl TryFrom<PragmaOperation> for PragmaOverrotation
Implements the core::convert::TryFrom trait into this Operation.
impl OperatePragma for PragmaOverrotation
impl StructuralPartialEq for PragmaOverrotation
Auto Trait Implementations§
impl Freeze for PragmaOverrotation
impl RefUnwindSafe for PragmaOverrotation
impl Send for PragmaOverrotation
impl Sync for PragmaOverrotation
impl Unpin for PragmaOverrotation
impl UnwindSafe for PragmaOverrotation
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
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>
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.