Struct roqoqo::operations::InputBit
source · pub struct InputBit {
name: String,
index: usize,
value: bool,
}
Expand description
InputBit sets a certain bit in an existing BitRegister of the circuit.
Fields§
§name: String
The name of the register that where the bit is set.
index: usize
The index in the register that is set.
value: bool
The value the bit is set to
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for InputBit
impl<'de> Deserialize<'de> for InputBit
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 InvolveQubits for InputBit
impl InvolveQubits for InputBit
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
Returns all classical registers involved in operation.
source§impl PartialEq for InputBit
impl PartialEq for InputBit
source§impl Substitute for InputBit
impl Substitute for InputBit
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 InputBit
impl SupportedVersion for InputBit
source§impl TryFrom<Definition> for InputBit
impl TryFrom<Definition> for InputBit
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<Operation> for InputBit
impl TryFrom<Operation> for InputBit
Implements the core::convert::TryFrom trait into this Operation.
impl Eq for InputBit
impl ImplementedIn1point1 for InputBit
impl StructuralPartialEq for InputBit
Auto Trait Implementations§
impl Freeze for InputBit
impl RefUnwindSafe for InputBit
impl Send for InputBit
impl Sync for InputBit
impl Unpin for InputBit
impl UnwindSafe for InputBit
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<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
Compare self to
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>
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.