Struct roqoqo::measurements::ClassicalRegister
source · pub struct ClassicalRegister {
pub constant_circuit: Option<Circuit>,
pub circuits: Vec<Circuit>,
}
Expand description
Classical register measurement.
Runs a sequence of circuits and returns the classical registers written during circuit execution.
Fields§
§constant_circuit: Option<Circuit>
Constant Circuit that is executed before each Circuit in circuits.
circuits: Vec<Circuit>
Collection of quantum circuits for the separate basis rotations.
Trait Implementations§
source§impl Clone for ClassicalRegister
impl Clone for ClassicalRegister
source§fn clone(&self) -> ClassicalRegister
fn clone(&self) -> ClassicalRegister
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 ClassicalRegister
impl Debug for ClassicalRegister
source§impl<'de> Deserialize<'de> for ClassicalRegister
impl<'de> Deserialize<'de> for ClassicalRegister
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 Measure for ClassicalRegister
impl Measure for ClassicalRegister
source§fn constant_circuit(&self) -> &Option<Circuit>
fn constant_circuit(&self) -> &Option<Circuit>
Returns the constant Circuit that is executed before each Circuit in circuits.
§Returns
&Option<Circuit
- The constant Circuit (None if not defined).
source§fn circuits<'a>(&'a self) -> Box<dyn Iterator<Item = &'a Circuit> + 'a>
fn circuits<'a>(&'a self) -> Box<dyn Iterator<Item = &'a Circuit> + 'a>
Returns iterator over circuits for measurement.
§Returns
Box<dyn Iterator<Item = &'a Circuit> + 'a>
- The quantum circuits.
source§fn substitute_parameters(
&self,
substituted_parameters: HashMap<String, f64>
) -> Result<Self, RoqoqoError>
fn substitute_parameters( &self, substituted_parameters: HashMap<String, f64> ) -> Result<Self, RoqoqoError>
source§impl PartialEq for ClassicalRegister
impl PartialEq for ClassicalRegister
source§fn eq(&self, other: &ClassicalRegister) -> bool
fn eq(&self, other: &ClassicalRegister) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for ClassicalRegister
impl Serialize for ClassicalRegister
source§impl SupportedVersion for ClassicalRegister
impl SupportedVersion for ClassicalRegister
impl StructuralPartialEq for ClassicalRegister
Auto Trait Implementations§
impl Freeze for ClassicalRegister
impl RefUnwindSafe for ClassicalRegister
impl Send for ClassicalRegister
impl Sync for ClassicalRegister
impl Unpin for ClassicalRegister
impl UnwindSafe for ClassicalRegister
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.