Struct roqoqo::operations::spin_boson_operations::CZQubitResonator
source · pub struct CZQubitResonator {
qubit: usize,
mode: usize,
}
Expand description
Controlled-Z operation between a qubit and a bosonic mode, where the two-dimensional subspace of the bosonic mode spanned by the occupation number states |0⟩_B and |1⟩_B is considered as the second qubit involved in the CZ operation.
Fields§
§qubit: usize
The qubit involved.
mode: usize
The bosonic mode involved.
Implementations§
Trait Implementations§
source§impl Clone for CZQubitResonator
impl Clone for CZQubitResonator
source§fn clone(&self) -> CZQubitResonator
fn clone(&self) -> CZQubitResonator
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CZQubitResonator
impl Debug for CZQubitResonator
source§impl<'de> Deserialize<'de> for CZQubitResonator
impl<'de> Deserialize<'de> for CZQubitResonator
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<CZQubitResonator> for ModeGateOperation
impl From<CZQubitResonator> for ModeGateOperation
Implements the From trait from this Operation.
source§fn from(v: CZQubitResonator) -> Self
fn from(v: CZQubitResonator) -> Self
Performs the conversion.
source§impl From<CZQubitResonator> for Operation
impl From<CZQubitResonator> for Operation
Implements the From trait from this Operation.
source§fn from(v: CZQubitResonator) -> Self
fn from(v: CZQubitResonator) -> Self
Performs the conversion.
source§impl From<CZQubitResonator> for SingleModeGateOperation
impl From<CZQubitResonator> for SingleModeGateOperation
Implements the From trait from this Operation.
source§fn from(v: CZQubitResonator) -> Self
fn from(v: CZQubitResonator) -> Self
Performs the conversion.
source§impl From<CZQubitResonator> for SingleModeOperation
impl From<CZQubitResonator> for SingleModeOperation
Implements the From trait from this Operation.
source§fn from(v: CZQubitResonator) -> Self
fn from(v: CZQubitResonator) -> Self
Performs the conversion.
source§impl From<CZQubitResonator> for SingleQubitOperation
impl From<CZQubitResonator> for SingleQubitOperation
Implements the From trait from this Operation.
source§fn from(v: CZQubitResonator) -> Self
fn from(v: CZQubitResonator) -> Self
Performs the conversion.
source§impl InvolveModes for CZQubitResonator
impl InvolveModes for CZQubitResonator
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 CZQubitResonator
impl InvolveQubits for CZQubitResonator
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 CZQubitResonator
impl Operate for CZQubitResonator
Implements the universal basic trait Operate for this Operation.
source§impl OperateSingleMode for CZQubitResonator
impl OperateSingleMode for CZQubitResonator
Implements OperateSingleMode trait for this Operation acting on exactly one bosonic mode.
source§impl OperateSingleQubit for CZQubitResonator
impl OperateSingleQubit for CZQubitResonator
Implements OperateSingleQubit trait for this Operation acting on exactly one qubit.
source§impl PartialEq for CZQubitResonator
impl PartialEq for CZQubitResonator
source§fn eq(&self, other: &CZQubitResonator) -> bool
fn eq(&self, other: &CZQubitResonator) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for CZQubitResonator
impl Serialize for CZQubitResonator
source§impl Substitute for CZQubitResonator
impl Substitute for CZQubitResonator
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 CZQubitResonator
impl SubstituteModes for CZQubitResonator
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 CZQubitResonator
impl SupportedVersion for CZQubitResonator
source§impl TryFrom<ModeGateOperation> for CZQubitResonator
impl TryFrom<ModeGateOperation> for CZQubitResonator
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<Operation> for CZQubitResonator
impl TryFrom<Operation> for CZQubitResonator
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<SingleModeGateOperation> for CZQubitResonator
impl TryFrom<SingleModeGateOperation> for CZQubitResonator
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<SingleModeOperation> for CZQubitResonator
impl TryFrom<SingleModeOperation> for CZQubitResonator
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<SingleQubitOperation> for CZQubitResonator
impl TryFrom<SingleQubitOperation> for CZQubitResonator
Implements the core::convert::TryFrom trait into this Operation.
impl ImplementedIn1point11 for CZQubitResonator
impl OperateModeGate for CZQubitResonator
impl OperateSingleModeGate for CZQubitResonator
impl StructuralPartialEq for CZQubitResonator
Auto Trait Implementations§
impl Freeze for CZQubitResonator
impl RefUnwindSafe for CZQubitResonator
impl Send for CZQubitResonator
impl Sync for CZQubitResonator
impl Unpin for CZQubitResonator
impl UnwindSafe for CZQubitResonator
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<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§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.