Struct roqoqo::operations::DefinitionUsize
source · pub struct DefinitionUsize {
name: String,
length: usize,
is_output: bool,
}
Expand description
DefinitionUsize is the Definition for an Integer 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 DefinitionUsize
impl Clone for DefinitionUsize
source§fn clone(&self) -> DefinitionUsize
fn clone(&self) -> DefinitionUsize
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DefinitionUsize
impl Debug for DefinitionUsize
source§impl Define for DefinitionUsize
impl Define for DefinitionUsize
source§impl<'de> Deserialize<'de> for DefinitionUsize
impl<'de> Deserialize<'de> for DefinitionUsize
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<DefinitionUsize> for Definition
impl From<DefinitionUsize> for Definition
Implements the From trait from this Operation.
source§fn from(v: DefinitionUsize) -> Self
fn from(v: DefinitionUsize) -> Self
Performs the conversion.
source§impl From<DefinitionUsize> for Operation
impl From<DefinitionUsize> for Operation
Implements the From trait from this Operation.
source§fn from(v: DefinitionUsize) -> Self
fn from(v: DefinitionUsize) -> Self
Performs the conversion.
source§impl InvolveQubits for DefinitionUsize
impl InvolveQubits for DefinitionUsize
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 DefinitionUsize
impl Operate for DefinitionUsize
Implements the universal basic trait Operate for this Operation.
source§impl PartialEq for DefinitionUsize
impl PartialEq for DefinitionUsize
source§fn eq(&self, other: &DefinitionUsize) -> bool
fn eq(&self, other: &DefinitionUsize) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for DefinitionUsize
impl Serialize for DefinitionUsize
source§impl Substitute for DefinitionUsize
impl Substitute for DefinitionUsize
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 DefinitionUsize
impl SupportedVersion for DefinitionUsize
source§impl TryFrom<Definition> for DefinitionUsize
impl TryFrom<Definition> for DefinitionUsize
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<Operation> for DefinitionUsize
impl TryFrom<Operation> for DefinitionUsize
Implements the core::convert::TryFrom trait into this Operation.
impl Eq for DefinitionUsize
impl StructuralPartialEq for DefinitionUsize
Auto Trait Implementations§
impl Freeze for DefinitionUsize
impl RefUnwindSafe for DefinitionUsize
impl Send for DefinitionUsize
impl Sync for DefinitionUsize
impl Unpin for DefinitionUsize
impl UnwindSafe for DefinitionUsize
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.