pub struct SingleExcitationStore {
qubit: usize,
mode: usize,
}
Expand description
Stores a single excitation from the involved qubit into the involved bosonic mode as follows |0⟩_B ⨂ (a |0⟩_Q + b |1⟩_Q) -> (a|0⟩_B + b |1⟩_B ) ⨂ |0⟩_Q
Note: not defined if the bosonic mode is in a state |n⟩ with n != 0
Fields§
§qubit: usize
The qubit involved.
mode: usize
The bosonic mode involved.
Implementations§
Trait Implementations§
source§impl Clone for SingleExcitationStore
impl Clone for SingleExcitationStore
source§fn clone(&self) -> SingleExcitationStore
fn clone(&self) -> SingleExcitationStore
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SingleExcitationStore
impl Debug for SingleExcitationStore
source§impl<'de> Deserialize<'de> for SingleExcitationStore
impl<'de> Deserialize<'de> for SingleExcitationStore
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<SingleExcitationStore> for ModeGateOperation
impl From<SingleExcitationStore> for ModeGateOperation
Implements the From trait from this Operation.
source§fn from(v: SingleExcitationStore) -> Self
fn from(v: SingleExcitationStore) -> Self
Performs the conversion.
source§impl From<SingleExcitationStore> for Operation
impl From<SingleExcitationStore> for Operation
Implements the From trait from this Operation.
source§fn from(v: SingleExcitationStore) -> Self
fn from(v: SingleExcitationStore) -> Self
Performs the conversion.
source§impl From<SingleExcitationStore> for SingleModeGateOperation
impl From<SingleExcitationStore> for SingleModeGateOperation
Implements the From trait from this Operation.
source§fn from(v: SingleExcitationStore) -> Self
fn from(v: SingleExcitationStore) -> Self
Performs the conversion.
source§impl From<SingleExcitationStore> for SingleModeOperation
impl From<SingleExcitationStore> for SingleModeOperation
Implements the From trait from this Operation.
source§fn from(v: SingleExcitationStore) -> Self
fn from(v: SingleExcitationStore) -> Self
Performs the conversion.
source§impl From<SingleExcitationStore> for SingleQubitOperation
impl From<SingleExcitationStore> for SingleQubitOperation
Implements the From trait from this Operation.
source§fn from(v: SingleExcitationStore) -> Self
fn from(v: SingleExcitationStore) -> Self
Performs the conversion.
source§impl InvolveModes for SingleExcitationStore
impl InvolveModes for SingleExcitationStore
Implements InvolveModes trait for the bosonic modes involved in this Operation.
source§fn involved_modes(&self) -> InvolvedModes
fn involved_modes(&self) -> InvolvedModes
Returns a list of all involved bosonic modes.
source§impl InvolveQubits for SingleExcitationStore
impl InvolveQubits for SingleExcitationStore
Implements InvolveQubits trait for the qubits involved in this Operation.
source§fn involved_qubits(&self) -> InvolvedQubits
fn involved_qubits(&self) -> InvolvedQubits
Returns a list of all involved qubits.
source§fn involved_classical(&self) -> InvolvedClassical
fn involved_classical(&self) -> InvolvedClassical
source§impl Operate for SingleExcitationStore
impl Operate for SingleExcitationStore
Implements the universal basic trait Operate for this Operation.
source§impl OperateSingleMode for SingleExcitationStore
impl OperateSingleMode for SingleExcitationStore
Implements OperateSingleMode trait for this Operation acting on exactly one bosonic mode.
source§impl OperateSingleQubit for SingleExcitationStore
impl OperateSingleQubit for SingleExcitationStore
Implements OperateSingleQubit trait for this Operation acting on exactly one qubit.
source§impl PartialEq for SingleExcitationStore
impl PartialEq for SingleExcitationStore
source§fn eq(&self, other: &SingleExcitationStore) -> bool
fn eq(&self, other: &SingleExcitationStore) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for SingleExcitationStore
impl Serialize for SingleExcitationStore
source§impl Substitute for SingleExcitationStore
impl Substitute for SingleExcitationStore
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 SubstituteModes for SingleExcitationStore
impl SubstituteModes for SingleExcitationStore
Implements SubstituteModes trait allowing to perform bosonic mode mappings.
source§fn remap_modes(
&self,
mapping: &HashMap<usize, usize>
) -> Result<Self, RoqoqoError>
fn remap_modes( &self, mapping: &HashMap<usize, usize> ) -> Result<Self, RoqoqoError>
Remaps the modes in clone of the operation.
source§impl TryFrom<ModeGateOperation> for SingleExcitationStore
impl TryFrom<ModeGateOperation> for SingleExcitationStore
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<Operation> for SingleExcitationStore
impl TryFrom<Operation> for SingleExcitationStore
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<SingleModeGateOperation> for SingleExcitationStore
impl TryFrom<SingleModeGateOperation> for SingleExcitationStore
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<SingleModeOperation> for SingleExcitationStore
impl TryFrom<SingleModeOperation> for SingleExcitationStore
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<SingleQubitOperation> for SingleExcitationStore
impl TryFrom<SingleQubitOperation> for SingleExcitationStore
Implements the core::convert::TryFrom trait into this Operation.
impl ImplementedIn1point11 for SingleExcitationStore
impl OperateModeGate for SingleExcitationStore
impl OperateSingleModeGate for SingleExcitationStore
impl StructuralPartialEq for SingleExcitationStore
Auto Trait Implementations§
impl Freeze for SingleExcitationStore
impl RefUnwindSafe for SingleExcitationStore
impl Send for SingleExcitationStore
impl Sync for SingleExcitationStore
impl Unpin for SingleExcitationStore
impl UnwindSafe for SingleExcitationStore
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<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.