Enum roqoqo::operations::TwoQubitGateOperation
source · #[non_exhaustive]pub enum TwoQubitGateOperation {
Show 25 variants
CNOT(CNOT),
SWAP(SWAP),
ISwap(ISwap),
FSwap(FSwap),
SqrtISwap(SqrtISwap),
InvSqrtISwap(InvSqrtISwap),
XY(XY),
ControlledPhaseShift(ControlledPhaseShift),
ControlledPauliY(ControlledPauliY),
ControlledPauliZ(ControlledPauliZ),
MolmerSorensenXX(MolmerSorensenXX),
VariableMSXX(VariableMSXX),
GivensRotation(GivensRotation),
GivensRotationLittleEndian(GivensRotationLittleEndian),
Qsim(Qsim),
Fsim(Fsim),
SpinInteraction(SpinInteraction),
Bogoliubov(Bogoliubov),
PMInteraction(PMInteraction),
ComplexPMInteraction(ComplexPMInteraction),
PhaseShiftedControlledZ(PhaseShiftedControlledZ),
PhaseShiftedControlledPhase(PhaseShiftedControlledPhase),
ControlledRotateX(ControlledRotateX),
ControlledRotateXY(ControlledRotateXY),
EchoCrossResonance(EchoCrossResonance),
}
Expand description
Enum of all Operations implementing OperateTwoQubitGate
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
CNOT(CNOT)
Variant for CNOT
SWAP(SWAP)
Variant for SWAP
ISwap(ISwap)
Variant for ISwap
FSwap(FSwap)
Variant for FSwap
SqrtISwap(SqrtISwap)
Variant for SqrtISwap
InvSqrtISwap(InvSqrtISwap)
Variant for InvSqrtISwap
XY(XY)
Variant for XY
ControlledPhaseShift(ControlledPhaseShift)
Variant for ControlledPhaseShift
ControlledPauliY(ControlledPauliY)
Variant for ControlledPauliY
ControlledPauliZ(ControlledPauliZ)
Variant for ControlledPauliZ
MolmerSorensenXX(MolmerSorensenXX)
Variant for MolmerSorensenXX
VariableMSXX(VariableMSXX)
Variant for VariableMSXX
GivensRotation(GivensRotation)
Variant for GivensRotation
GivensRotationLittleEndian(GivensRotationLittleEndian)
Variant for GivensRotationLittleEndian
Qsim(Qsim)
Variant for Qsim
Fsim(Fsim)
Variant for Fsim
SpinInteraction(SpinInteraction)
Variant for SpinInteraction
Bogoliubov(Bogoliubov)
Variant for Bogoliubov
PMInteraction(PMInteraction)
Variant for PMInteraction
ComplexPMInteraction(ComplexPMInteraction)
Variant for ComplexPMInteraction
PhaseShiftedControlledZ(PhaseShiftedControlledZ)
Variant for PhaseShiftedControlledZ
PhaseShiftedControlledPhase(PhaseShiftedControlledPhase)
Variant for PhaseShiftedControlledPhase
ControlledRotateX(ControlledRotateX)
Variant for ControlledRotateX
ControlledRotateXY(ControlledRotateXY)
Variant for ControlledRotateXY
EchoCrossResonance(EchoCrossResonance)
Variant for EchoCrossResonance
Trait Implementations§
source§impl Clone for TwoQubitGateOperation
impl Clone for TwoQubitGateOperation
source§fn clone(&self) -> TwoQubitGateOperation
fn clone(&self) -> TwoQubitGateOperation
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TwoQubitGateOperation
impl Debug for TwoQubitGateOperation
source§impl<'de> Deserialize<'de> for TwoQubitGateOperation
impl<'de> Deserialize<'de> for TwoQubitGateOperation
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<Bogoliubov> for TwoQubitGateOperation
impl From<Bogoliubov> for TwoQubitGateOperation
Implements the From trait from this Operation.
source§fn from(v: Bogoliubov) -> Self
fn from(v: Bogoliubov) -> Self
Performs the conversion.
source§impl From<ComplexPMInteraction> for TwoQubitGateOperation
impl From<ComplexPMInteraction> for TwoQubitGateOperation
Implements the From trait from this Operation.
source§fn from(v: ComplexPMInteraction) -> Self
fn from(v: ComplexPMInteraction) -> Self
Performs the conversion.
source§impl From<ControlledPauliY> for TwoQubitGateOperation
impl From<ControlledPauliY> for TwoQubitGateOperation
Implements the From trait from this Operation.
source§fn from(v: ControlledPauliY) -> Self
fn from(v: ControlledPauliY) -> Self
Performs the conversion.
source§impl From<ControlledPauliZ> for TwoQubitGateOperation
impl From<ControlledPauliZ> for TwoQubitGateOperation
Implements the From trait from this Operation.
source§fn from(v: ControlledPauliZ) -> Self
fn from(v: ControlledPauliZ) -> Self
Performs the conversion.
source§impl From<ControlledPhaseShift> for TwoQubitGateOperation
impl From<ControlledPhaseShift> for TwoQubitGateOperation
Implements the From trait from this Operation.
source§fn from(v: ControlledPhaseShift) -> Self
fn from(v: ControlledPhaseShift) -> Self
Performs the conversion.
source§impl From<ControlledRotateX> for TwoQubitGateOperation
impl From<ControlledRotateX> for TwoQubitGateOperation
Implements the From trait from this Operation.
source§fn from(v: ControlledRotateX) -> Self
fn from(v: ControlledRotateX) -> Self
Performs the conversion.
source§impl From<ControlledRotateXY> for TwoQubitGateOperation
impl From<ControlledRotateXY> for TwoQubitGateOperation
Implements the From trait from this Operation.
source§fn from(v: ControlledRotateXY) -> Self
fn from(v: ControlledRotateXY) -> Self
Performs the conversion.
source§impl From<EchoCrossResonance> for TwoQubitGateOperation
impl From<EchoCrossResonance> for TwoQubitGateOperation
Implements the From trait from this Operation.
source§fn from(v: EchoCrossResonance) -> Self
fn from(v: EchoCrossResonance) -> Self
Performs the conversion.
source§impl From<GivensRotation> for TwoQubitGateOperation
impl From<GivensRotation> for TwoQubitGateOperation
Implements the From trait from this Operation.
source§fn from(v: GivensRotation) -> Self
fn from(v: GivensRotation) -> Self
Performs the conversion.
source§impl From<GivensRotationLittleEndian> for TwoQubitGateOperation
impl From<GivensRotationLittleEndian> for TwoQubitGateOperation
Implements the From trait from this Operation.
source§fn from(v: GivensRotationLittleEndian) -> Self
fn from(v: GivensRotationLittleEndian) -> Self
Performs the conversion.
source§impl From<InvSqrtISwap> for TwoQubitGateOperation
impl From<InvSqrtISwap> for TwoQubitGateOperation
Implements the From trait from this Operation.
source§fn from(v: InvSqrtISwap) -> Self
fn from(v: InvSqrtISwap) -> Self
Performs the conversion.
source§impl From<MolmerSorensenXX> for TwoQubitGateOperation
impl From<MolmerSorensenXX> for TwoQubitGateOperation
Implements the From trait from this Operation.
source§fn from(v: MolmerSorensenXX) -> Self
fn from(v: MolmerSorensenXX) -> Self
Performs the conversion.
source§impl From<PMInteraction> for TwoQubitGateOperation
impl From<PMInteraction> for TwoQubitGateOperation
Implements the From trait from this Operation.
source§fn from(v: PMInteraction) -> Self
fn from(v: PMInteraction) -> Self
Performs the conversion.
source§impl From<PhaseShiftedControlledPhase> for TwoQubitGateOperation
impl From<PhaseShiftedControlledPhase> for TwoQubitGateOperation
Implements the From trait from this Operation.
source§fn from(v: PhaseShiftedControlledPhase) -> Self
fn from(v: PhaseShiftedControlledPhase) -> Self
Performs the conversion.
source§impl From<PhaseShiftedControlledZ> for TwoQubitGateOperation
impl From<PhaseShiftedControlledZ> for TwoQubitGateOperation
Implements the From trait from this Operation.
source§fn from(v: PhaseShiftedControlledZ) -> Self
fn from(v: PhaseShiftedControlledZ) -> Self
Performs the conversion.
source§impl From<SpinInteraction> for TwoQubitGateOperation
impl From<SpinInteraction> for TwoQubitGateOperation
Implements the From trait from this Operation.
source§fn from(v: SpinInteraction) -> Self
fn from(v: SpinInteraction) -> Self
Performs the conversion.
source§impl From<TwoQubitGateOperation> for Operation
impl From<TwoQubitGateOperation> for Operation
source§fn from(op: TwoQubitGateOperation) -> Self
fn from(op: TwoQubitGateOperation) -> Self
source§impl From<VariableMSXX> for TwoQubitGateOperation
impl From<VariableMSXX> for TwoQubitGateOperation
Implements the From trait from this Operation.
source§fn from(v: VariableMSXX) -> Self
fn from(v: VariableMSXX) -> Self
Performs the conversion.
source§impl InvolveQubits for TwoQubitGateOperation
impl InvolveQubits for TwoQubitGateOperation
Implements InvolveQubits trait for the qubits involved in this Operation.
source§fn involved_qubits(&self) -> InvolvedQubits
fn involved_qubits(&self) -> InvolvedQubits
source§fn involved_classical(&self) -> InvolvedClassical
fn involved_classical(&self) -> InvolvedClassical
source§impl Operate for TwoQubitGateOperation
impl Operate for TwoQubitGateOperation
Implements the universal basic trait Operate for this Operation.
source§impl OperateGate for TwoQubitGateOperation
impl OperateGate for TwoQubitGateOperation
source§fn unitary_matrix(&self) -> Result<Array2<Complex64>, RoqoqoError>
fn unitary_matrix(&self) -> Result<Array2<Complex64>, RoqoqoError>
source§impl OperateTwoQubit for TwoQubitGateOperation
impl OperateTwoQubit for TwoQubitGateOperation
Trait for Operations acting on exactly two qubits.
source§impl OperateTwoQubitGate for TwoQubitGateOperation
impl OperateTwoQubitGate for TwoQubitGateOperation
source§fn kak_decomposition(&self) -> KakDecomposition
fn kak_decomposition(&self) -> KakDecomposition
source§impl PartialEq for TwoQubitGateOperation
impl PartialEq for TwoQubitGateOperation
source§fn eq(&self, other: &TwoQubitGateOperation) -> bool
fn eq(&self, other: &TwoQubitGateOperation) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for TwoQubitGateOperation
impl Serialize for TwoQubitGateOperation
source§impl Substitute for TwoQubitGateOperation
impl Substitute for TwoQubitGateOperation
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 TryFrom<&Operation> for TwoQubitGateOperation
impl TryFrom<&Operation> for TwoQubitGateOperation
source§impl TryFrom<Operation> for TwoQubitGateOperation
impl TryFrom<Operation> for TwoQubitGateOperation
source§impl TryFrom<TwoQubitGateOperation> for Bogoliubov
impl TryFrom<TwoQubitGateOperation> for Bogoliubov
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<TwoQubitGateOperation> for CNOT
impl TryFrom<TwoQubitGateOperation> for CNOT
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<TwoQubitGateOperation> for ComplexPMInteraction
impl TryFrom<TwoQubitGateOperation> for ComplexPMInteraction
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<TwoQubitGateOperation> for ControlledPauliY
impl TryFrom<TwoQubitGateOperation> for ControlledPauliY
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<TwoQubitGateOperation> for ControlledPauliZ
impl TryFrom<TwoQubitGateOperation> for ControlledPauliZ
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<TwoQubitGateOperation> for ControlledPhaseShift
impl TryFrom<TwoQubitGateOperation> for ControlledPhaseShift
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<TwoQubitGateOperation> for ControlledRotateX
impl TryFrom<TwoQubitGateOperation> for ControlledRotateX
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<TwoQubitGateOperation> for ControlledRotateXY
impl TryFrom<TwoQubitGateOperation> for ControlledRotateXY
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<TwoQubitGateOperation> for EchoCrossResonance
impl TryFrom<TwoQubitGateOperation> for EchoCrossResonance
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<TwoQubitGateOperation> for FSwap
impl TryFrom<TwoQubitGateOperation> for FSwap
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<TwoQubitGateOperation> for Fsim
impl TryFrom<TwoQubitGateOperation> for Fsim
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<TwoQubitGateOperation> for GivensRotation
impl TryFrom<TwoQubitGateOperation> for GivensRotation
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<TwoQubitGateOperation> for GivensRotationLittleEndian
impl TryFrom<TwoQubitGateOperation> for GivensRotationLittleEndian
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<TwoQubitGateOperation> for ISwap
impl TryFrom<TwoQubitGateOperation> for ISwap
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<TwoQubitGateOperation> for InvSqrtISwap
impl TryFrom<TwoQubitGateOperation> for InvSqrtISwap
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<TwoQubitGateOperation> for MolmerSorensenXX
impl TryFrom<TwoQubitGateOperation> for MolmerSorensenXX
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<TwoQubitGateOperation> for PMInteraction
impl TryFrom<TwoQubitGateOperation> for PMInteraction
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<TwoQubitGateOperation> for PhaseShiftedControlledPhase
impl TryFrom<TwoQubitGateOperation> for PhaseShiftedControlledPhase
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<TwoQubitGateOperation> for PhaseShiftedControlledZ
impl TryFrom<TwoQubitGateOperation> for PhaseShiftedControlledZ
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<TwoQubitGateOperation> for Qsim
impl TryFrom<TwoQubitGateOperation> for Qsim
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<TwoQubitGateOperation> for SWAP
impl TryFrom<TwoQubitGateOperation> for SWAP
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<TwoQubitGateOperation> for SpinInteraction
impl TryFrom<TwoQubitGateOperation> for SpinInteraction
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<TwoQubitGateOperation> for SqrtISwap
impl TryFrom<TwoQubitGateOperation> for SqrtISwap
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<TwoQubitGateOperation> for VariableMSXX
impl TryFrom<TwoQubitGateOperation> for VariableMSXX
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<TwoQubitGateOperation> for XY
impl TryFrom<TwoQubitGateOperation> for XY
Implements the core::convert::TryFrom trait into this Operation.
impl StructuralPartialEq for TwoQubitGateOperation
Auto Trait Implementations§
impl Freeze for TwoQubitGateOperation
impl RefUnwindSafe for TwoQubitGateOperation
impl Send for TwoQubitGateOperation
impl Sync for TwoQubitGateOperation
impl Unpin for TwoQubitGateOperation
impl UnwindSafe for TwoQubitGateOperation
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.