Struct roqoqo::operations::PragmaChangeDevice
source · pub struct PragmaChangeDevice {
pub wrapped_tags: Vec<String>,
pub wrapped_hqslang: String,
pub wrapped_operation: Vec<u8>,
}
Expand description
A wrapper around backend specific PRAGMA operations capable of changing a device.
This PRAGMA is a thin wrapper around device specific operations that can change device properties.
§NOTE
Since this PRAGMA uses serde and bincode to store a representation of the wrapped
operation internally it is only available when roqoqo is built with the serialize
feature
Fields§
The tags of the wrapped operation.
wrapped_hqslang: String
The hqslang name of the wrapped operation.
wrapped_operation: Vec<u8>
Binary representation of the wrapped operation using serde and bincode.
Implementations§
Trait Implementations§
source§impl Clone for PragmaChangeDevice
impl Clone for PragmaChangeDevice
source§fn clone(&self) -> PragmaChangeDevice
fn clone(&self) -> PragmaChangeDevice
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PragmaChangeDevice
impl Debug for PragmaChangeDevice
source§impl<'de> Deserialize<'de> for PragmaChangeDevice
impl<'de> Deserialize<'de> for PragmaChangeDevice
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<PragmaChangeDevice> for Operation
impl From<PragmaChangeDevice> for Operation
Implements the From trait from this Operation.
source§fn from(v: PragmaChangeDevice) -> Self
fn from(v: PragmaChangeDevice) -> Self
Performs the conversion.
source§impl InvolveQubits for PragmaChangeDevice
impl InvolveQubits for PragmaChangeDevice
source§fn involved_qubits(&self) -> InvolvedQubits
fn involved_qubits(&self) -> InvolvedQubits
Lists all involved qubits.
source§fn involved_classical(&self) -> InvolvedClassical
fn involved_classical(&self) -> InvolvedClassical
source§impl Operate for PragmaChangeDevice
impl Operate for PragmaChangeDevice
source§impl PartialEq for PragmaChangeDevice
impl PartialEq for PragmaChangeDevice
source§fn eq(&self, other: &PragmaChangeDevice) -> bool
fn eq(&self, other: &PragmaChangeDevice) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for PragmaChangeDevice
impl Serialize for PragmaChangeDevice
source§impl Substitute for PragmaChangeDevice
impl Substitute for PragmaChangeDevice
Substitute trait allowing to replace symbolic parameters and to perform qubit mappings.
source§fn remap_qubits(
&self,
mapping: &HashMap<usize, usize>
) -> Result<Self, RoqoqoError>
fn remap_qubits( &self, mapping: &HashMap<usize, usize> ) -> Result<Self, RoqoqoError>
Remaps qubits in clone of the operation. This is not supported for PragmaChangeDevice and should throw and error when a non-trivial remapping is used
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§impl TryFrom<Operation> for PragmaChangeDevice
impl TryFrom<Operation> for PragmaChangeDevice
Implements the core::convert::TryFrom trait into this Operation.
impl Eq for PragmaChangeDevice
impl OperatePragma for PragmaChangeDevice
impl StructuralPartialEq for PragmaChangeDevice
Auto Trait Implementations§
impl Freeze for PragmaChangeDevice
impl RefUnwindSafe for PragmaChangeDevice
impl Send for PragmaChangeDevice
impl Sync for PragmaChangeDevice
impl Unpin for PragmaChangeDevice
impl UnwindSafe for PragmaChangeDevice
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.