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