Struct roqoqo::operations::DefinitionFloat
source · pub struct DefinitionFloat {
name: String,
length: usize,
is_output: bool,
}
Expand description
DefinitionFloat is the Definition for a floating point type register.
Fields§
§name: String
The name of the register that is defined.
length: usize
The length of the register that is defined, usually the number of qubits to be measured.
is_output: bool
True/False if the variable is an output to the program.
Implementations§
Trait Implementations§
source§impl Clone for DefinitionFloat
impl Clone for DefinitionFloat
source§fn clone(&self) -> DefinitionFloat
fn clone(&self) -> DefinitionFloat
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DefinitionFloat
impl Debug for DefinitionFloat
source§impl Define for DefinitionFloat
impl Define for DefinitionFloat
source§impl<'de> Deserialize<'de> for DefinitionFloat
impl<'de> Deserialize<'de> for DefinitionFloat
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<DefinitionFloat> for Definition
impl From<DefinitionFloat> for Definition
Implements the From trait from this Operation.
source§fn from(v: DefinitionFloat) -> Self
fn from(v: DefinitionFloat) -> Self
Performs the conversion.
source§impl From<DefinitionFloat> for Operation
impl From<DefinitionFloat> for Operation
Implements the From trait from this Operation.
source§fn from(v: DefinitionFloat) -> Self
fn from(v: DefinitionFloat) -> Self
Performs the conversion.
source§impl InvolveQubits for DefinitionFloat
impl InvolveQubits for DefinitionFloat
source§fn involved_qubits(&self) -> InvolvedQubits
fn involved_qubits(&self) -> InvolvedQubits
source§fn involved_classical(&self) -> InvolvedClassical
fn involved_classical(&self) -> InvolvedClassical
source§impl Operate for DefinitionFloat
impl Operate for DefinitionFloat
Implements the universal basic trait Operate for this Operation.
source§impl PartialEq for DefinitionFloat
impl PartialEq for DefinitionFloat
source§fn eq(&self, other: &DefinitionFloat) -> bool
fn eq(&self, other: &DefinitionFloat) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for DefinitionFloat
impl Serialize for DefinitionFloat
source§impl Substitute for DefinitionFloat
impl Substitute for DefinitionFloat
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 DefinitionFloat
impl SupportedVersion for DefinitionFloat
source§impl TryFrom<Definition> for DefinitionFloat
impl TryFrom<Definition> for DefinitionFloat
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<Operation> for DefinitionFloat
impl TryFrom<Operation> for DefinitionFloat
Implements the core::convert::TryFrom trait into this Operation.
impl Eq for DefinitionFloat
impl StructuralPartialEq for DefinitionFloat
Auto Trait Implementations§
impl Freeze for DefinitionFloat
impl RefUnwindSafe for DefinitionFloat
impl Send for DefinitionFloat
impl Sync for DefinitionFloat
impl Unpin for DefinitionFloat
impl UnwindSafe for DefinitionFloat
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.