Struct roqoqo::operations::PhotonDetection
source · pub struct PhotonDetection {
mode: usize,
readout: String,
readout_index: usize,
}
Expand description
The photon number-resolving detector measurement for bosons.
This can be used as a single-shot measurement of the photon number. https://arxiv.org/pdf/0902.4824.pdf
Fields§
§mode: usize
The mode the detector (measurement) is applied to.
readout: String
The register for the readout.
readout_index: usize
The index in the readout the result is saved to.
Implementations§
Trait Implementations§
source§impl Clone for PhotonDetection
impl Clone for PhotonDetection
source§fn clone(&self) -> PhotonDetection
fn clone(&self) -> PhotonDetection
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PhotonDetection
impl Debug for PhotonDetection
source§impl<'de> Deserialize<'de> for PhotonDetection
impl<'de> Deserialize<'de> for PhotonDetection
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<PhotonDetection> for Operation
impl From<PhotonDetection> for Operation
Implements the From trait from this Operation.
source§fn from(v: PhotonDetection) -> Self
fn from(v: PhotonDetection) -> Self
Performs the conversion.
source§impl From<PhotonDetection> for SingleModeOperation
impl From<PhotonDetection> for SingleModeOperation
Implements the From trait from this Operation.
source§fn from(v: PhotonDetection) -> Self
fn from(v: PhotonDetection) -> Self
Performs the conversion.
source§impl InvolveModes for PhotonDetection
impl InvolveModes for PhotonDetection
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 PhotonDetection
impl InvolveQubits for PhotonDetection
source§fn involved_qubits(&self) -> InvolvedQubits
fn involved_qubits(&self) -> InvolvedQubits
Returns all qubits involved in operation.
source§fn involved_classical(&self) -> InvolvedClassical
fn involved_classical(&self) -> InvolvedClassical
source§impl Operate for PhotonDetection
impl Operate for PhotonDetection
Implements the universal basic trait Operate for this Operation.
source§impl OperateSingleMode for PhotonDetection
impl OperateSingleMode for PhotonDetection
Implements OperateSingleMode trait for this Operation acting on exactly one bosonic mode.
source§impl PartialEq for PhotonDetection
impl PartialEq for PhotonDetection
source§fn eq(&self, other: &PhotonDetection) -> bool
fn eq(&self, other: &PhotonDetection) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for PhotonDetection
impl Serialize for PhotonDetection
source§impl Substitute for PhotonDetection
impl Substitute for PhotonDetection
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 PhotonDetection
impl SubstituteModes for PhotonDetection
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 SupportedVersion for PhotonDetection
impl SupportedVersion for PhotonDetection
source§impl TryFrom<Operation> for PhotonDetection
impl TryFrom<Operation> for PhotonDetection
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<SingleModeOperation> for PhotonDetection
impl TryFrom<SingleModeOperation> for PhotonDetection
Implements the core::convert::TryFrom trait into this Operation.
impl ImplementedIn1point6 for PhotonDetection
impl StructuralPartialEq for PhotonDetection
Auto Trait Implementations§
impl Freeze for PhotonDetection
impl RefUnwindSafe for PhotonDetection
impl Send for PhotonDetection
impl Sync for PhotonDetection
impl Unpin for PhotonDetection
impl UnwindSafe for PhotonDetection
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.