pub struct LongitudinalCoupling {
qubit: usize,
mode: usize,
theta: CalculatorFloat,
}
Expand description
Longitudinal coupling gate exp(-i * θ * Z * (b^† + b))
Fields§
§qubit: usize
The qubit involved.
mode: usize
The bosonic mode involved.
theta: CalculatorFloat
The parameter θ of the interaction
Implementations§
source§impl LongitudinalCoupling
impl LongitudinalCoupling
sourcepub fn theta(&self) -> &CalculatorFloat
pub fn theta(&self) -> &CalculatorFloat
Returns the value of the field theta
.
sourcepub fn new(qubit: usize, mode: usize, theta: CalculatorFloat) -> Self
pub fn new(qubit: usize, mode: usize, theta: CalculatorFloat) -> Self
Creates a new instance of LongitudinalCoupling
.
Trait Implementations§
source§impl Clone for LongitudinalCoupling
impl Clone for LongitudinalCoupling
source§fn clone(&self) -> LongitudinalCoupling
fn clone(&self) -> LongitudinalCoupling
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for LongitudinalCoupling
impl Debug for LongitudinalCoupling
source§impl<'de> Deserialize<'de> for LongitudinalCoupling
impl<'de> Deserialize<'de> for LongitudinalCoupling
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<LongitudinalCoupling> for ModeGateOperation
impl From<LongitudinalCoupling> for ModeGateOperation
Implements the From trait from this Operation.
source§fn from(v: LongitudinalCoupling) -> Self
fn from(v: LongitudinalCoupling) -> Self
Performs the conversion.
source§impl From<LongitudinalCoupling> for Operation
impl From<LongitudinalCoupling> for Operation
Implements the From trait from this Operation.
source§fn from(v: LongitudinalCoupling) -> Self
fn from(v: LongitudinalCoupling) -> Self
Performs the conversion.
source§impl From<LongitudinalCoupling> for SingleModeGateOperation
impl From<LongitudinalCoupling> for SingleModeGateOperation
Implements the From trait from this Operation.
source§fn from(v: LongitudinalCoupling) -> Self
fn from(v: LongitudinalCoupling) -> Self
Performs the conversion.
source§impl From<LongitudinalCoupling> for SingleModeOperation
impl From<LongitudinalCoupling> for SingleModeOperation
Implements the From trait from this Operation.
source§fn from(v: LongitudinalCoupling) -> Self
fn from(v: LongitudinalCoupling) -> Self
Performs the conversion.
source§impl From<LongitudinalCoupling> for SingleQubitOperation
impl From<LongitudinalCoupling> for SingleQubitOperation
Implements the From trait from this Operation.
source§fn from(v: LongitudinalCoupling) -> Self
fn from(v: LongitudinalCoupling) -> Self
Performs the conversion.
source§impl InvolveModes for LongitudinalCoupling
impl InvolveModes for LongitudinalCoupling
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 LongitudinalCoupling
impl InvolveQubits for LongitudinalCoupling
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 LongitudinalCoupling
impl Operate for LongitudinalCoupling
Implements the universal basic trait Operate for this Operation.
source§impl OperateSingleMode for LongitudinalCoupling
impl OperateSingleMode for LongitudinalCoupling
Implements OperateSingleMode trait for this Operation acting on exactly one bosonic mode.
source§impl OperateSingleQubit for LongitudinalCoupling
impl OperateSingleQubit for LongitudinalCoupling
Implements OperateSingleQubit trait for this Operation acting on exactly one qubit.
source§impl PartialEq for LongitudinalCoupling
impl PartialEq for LongitudinalCoupling
source§fn eq(&self, other: &LongitudinalCoupling) -> bool
fn eq(&self, other: &LongitudinalCoupling) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for LongitudinalCoupling
impl Serialize for LongitudinalCoupling
source§impl Substitute for LongitudinalCoupling
impl Substitute for LongitudinalCoupling
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 LongitudinalCoupling
impl SubstituteModes for LongitudinalCoupling
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 LongitudinalCoupling
impl TryFrom<ModeGateOperation> for LongitudinalCoupling
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<Operation> for LongitudinalCoupling
impl TryFrom<Operation> for LongitudinalCoupling
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<SingleModeGateOperation> for LongitudinalCoupling
impl TryFrom<SingleModeGateOperation> for LongitudinalCoupling
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<SingleModeOperation> for LongitudinalCoupling
impl TryFrom<SingleModeOperation> for LongitudinalCoupling
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<SingleQubitOperation> for LongitudinalCoupling
impl TryFrom<SingleQubitOperation> for LongitudinalCoupling
Implements the core::convert::TryFrom trait into this Operation.
impl ImplementedIn1point11 for LongitudinalCoupling
impl OperateModeGate for LongitudinalCoupling
impl OperateSingleModeGate for LongitudinalCoupling
impl StructuralPartialEq for LongitudinalCoupling
Auto Trait Implementations§
impl Freeze for LongitudinalCoupling
impl RefUnwindSafe for LongitudinalCoupling
impl Send for LongitudinalCoupling
impl Sync for LongitudinalCoupling
impl Unpin for LongitudinalCoupling
impl UnwindSafe for LongitudinalCoupling
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.