Struct roqoqo::measurements::ClassicalRegister [−][src]
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
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
Returns the constant Circuit that is executed before each Circuit in circuits.
Returns
&Option<Circuit
- The constant Circuit (None if not defined).
Returns iterator over circuits for measurement.
Returns
Box<dyn Iterator<Item = &'a Circuit> + 'a>
- The quantum circuits.
fn substitute_parameters(
&self,
substituted_parameters: HashMap<String, f64>
) -> Result<Self, RoqoqoError>
fn substitute_parameters(
&self,
substituted_parameters: HashMap<String, f64>
) -> Result<Self, RoqoqoError>
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for ClassicalRegister
impl Send for ClassicalRegister
impl Sync for ClassicalRegister
impl Unpin for ClassicalRegister
impl UnwindSafe for ClassicalRegister
Blanket Implementations
Mutably borrows from an owned value. Read more
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.