Struct roqoqo::operations::PragmaSetNumberOfMeasurements
source · pub struct PragmaSetNumberOfMeasurements {
number_measurements: usize,
readout: String,
}
Expand description
This PRAGMA Operation sets the number of measurements of the circuit.
This is used for backends that allow setting the number of tries. However, setting the number of measurements does not allow access to the underlying wavefunction or density matrix.
Fields§
§number_measurements: usize
The number of measurements.
readout: String
The register for the readout.
Implementations§
source§impl PragmaSetNumberOfMeasurements
impl PragmaSetNumberOfMeasurements
sourcepub fn number_measurements(&self) -> &usize
pub fn number_measurements(&self) -> &usize
Returns the value of the field number_measurements
.
Trait Implementations§
source§impl Clone for PragmaSetNumberOfMeasurements
impl Clone for PragmaSetNumberOfMeasurements
source§fn clone(&self) -> PragmaSetNumberOfMeasurements
fn clone(&self) -> PragmaSetNumberOfMeasurements
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<'de> Deserialize<'de> for PragmaSetNumberOfMeasurements
impl<'de> Deserialize<'de> for PragmaSetNumberOfMeasurements
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<PragmaSetNumberOfMeasurements> for Operation
impl From<PragmaSetNumberOfMeasurements> for Operation
Implements the From trait from this Operation.
source§fn from(v: PragmaSetNumberOfMeasurements) -> Self
fn from(v: PragmaSetNumberOfMeasurements) -> Self
Performs the conversion.
source§impl From<PragmaSetNumberOfMeasurements> for PragmaOperation
impl From<PragmaSetNumberOfMeasurements> for PragmaOperation
Implements the From trait from this Operation.
source§fn from(v: PragmaSetNumberOfMeasurements) -> Self
fn from(v: PragmaSetNumberOfMeasurements) -> Self
Performs the conversion.
source§impl InvolveQubits for PragmaSetNumberOfMeasurements
impl InvolveQubits for PragmaSetNumberOfMeasurements
source§fn involved_qubits(&self) -> InvolvedQubits
fn involved_qubits(&self) -> InvolvedQubits
Lists all involved qubits (here, none).
source§fn involved_classical(&self) -> InvolvedClassical
fn involved_classical(&self) -> InvolvedClassical
source§impl Operate for PragmaSetNumberOfMeasurements
impl Operate for PragmaSetNumberOfMeasurements
Implements the universal basic trait Operate for this Operation.
source§impl PartialEq for PragmaSetNumberOfMeasurements
impl PartialEq for PragmaSetNumberOfMeasurements
source§fn eq(&self, other: &PragmaSetNumberOfMeasurements) -> bool
fn eq(&self, other: &PragmaSetNumberOfMeasurements) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Substitute for PragmaSetNumberOfMeasurements
impl Substitute for PragmaSetNumberOfMeasurements
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<Operation> for PragmaSetNumberOfMeasurements
impl TryFrom<Operation> for PragmaSetNumberOfMeasurements
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<PragmaOperation> for PragmaSetNumberOfMeasurements
impl TryFrom<PragmaOperation> for PragmaSetNumberOfMeasurements
Implements the core::convert::TryFrom trait into this Operation.
impl Eq for PragmaSetNumberOfMeasurements
impl OperatePragma for PragmaSetNumberOfMeasurements
impl StructuralPartialEq for PragmaSetNumberOfMeasurements
Auto Trait Implementations§
impl Freeze for PragmaSetNumberOfMeasurements
impl RefUnwindSafe for PragmaSetNumberOfMeasurements
impl Send for PragmaSetNumberOfMeasurements
impl Sync for PragmaSetNumberOfMeasurements
impl Unpin for PragmaSetNumberOfMeasurements
impl UnwindSafe for PragmaSetNumberOfMeasurements
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.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.