Struct roqoqo::operations::PragmaSleep
source · pub struct PragmaSleep {
qubits: Vec<usize>,
sleep_time: CalculatorFloat,
}
Expand description
This PRAGMA Operation makes the quantum hardware wait a given amount of time.
This PRAGMA Operation is used for error mitigation reasons, for instance. It can be used to boost the noise on the qubits since it gets worse with time.
Fields§
§qubits: Vec<usize>
The qubits involved in the sleep block.
sleep_time: CalculatorFloat
Time for the execution of the operation in seconds.
Implementations§
source§impl PragmaSleep
impl PragmaSleep
sourcepub fn sleep_time(&self) -> &CalculatorFloat
pub fn sleep_time(&self) -> &CalculatorFloat
Returns the value of the field sleep_time
.
sourcepub fn new(qubits: Vec<usize>, sleep_time: CalculatorFloat) -> Self
pub fn new(qubits: Vec<usize>, sleep_time: CalculatorFloat) -> Self
Creates a new instance of PragmaSleep
.
Trait Implementations§
source§impl Clone for PragmaSleep
impl Clone for PragmaSleep
source§fn clone(&self) -> PragmaSleep
fn clone(&self) -> PragmaSleep
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PragmaSleep
impl Debug for PragmaSleep
source§impl<'de> Deserialize<'de> for PragmaSleep
impl<'de> Deserialize<'de> for PragmaSleep
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<PragmaSleep> for MultiQubitOperation
impl From<PragmaSleep> for MultiQubitOperation
Implements the From trait from this Operation.
source§fn from(v: PragmaSleep) -> Self
fn from(v: PragmaSleep) -> Self
Performs the conversion.
source§impl From<PragmaSleep> for Operation
impl From<PragmaSleep> for Operation
Implements the From trait from this Operation.
source§fn from(v: PragmaSleep) -> Self
fn from(v: PragmaSleep) -> Self
Performs the conversion.
source§impl From<PragmaSleep> for PragmaOperation
impl From<PragmaSleep> for PragmaOperation
Implements the From trait from this Operation.
source§fn from(v: PragmaSleep) -> Self
fn from(v: PragmaSleep) -> Self
Performs the conversion.
source§impl InvolveQubits for PragmaSleep
impl InvolveQubits for PragmaSleep
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 PragmaSleep
impl Operate for PragmaSleep
Implements the universal basic trait Operate for this Operation.
source§impl OperateMultiQubit for PragmaSleep
impl OperateMultiQubit for PragmaSleep
Implements OperateMultiQubit trait for this Operation acting on a set of qubits.
source§impl PartialEq for PragmaSleep
impl PartialEq for PragmaSleep
source§fn eq(&self, other: &PragmaSleep) -> bool
fn eq(&self, other: &PragmaSleep) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for PragmaSleep
impl Serialize for PragmaSleep
source§impl Substitute for PragmaSleep
impl Substitute for PragmaSleep
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 SupportedVersion for PragmaSleep
impl SupportedVersion for PragmaSleep
source§impl TryFrom<MultiQubitOperation> for PragmaSleep
impl TryFrom<MultiQubitOperation> for PragmaSleep
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<Operation> for PragmaSleep
impl TryFrom<Operation> for PragmaSleep
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<PragmaOperation> for PragmaSleep
impl TryFrom<PragmaOperation> for PragmaSleep
Implements the core::convert::TryFrom trait into this Operation.
impl OperatePragma for PragmaSleep
impl StructuralPartialEq for PragmaSleep
Auto Trait Implementations§
impl Freeze for PragmaSleep
impl RefUnwindSafe for PragmaSleep
impl Send for PragmaSleep
impl Sync for PragmaSleep
impl Unpin for PragmaSleep
impl UnwindSafe for PragmaSleep
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.