#[non_exhaustive]pub enum SingleQubitGateOperation {
Show 19 variants
SingleQubitGate(SingleQubitGate),
RotateZ(RotateZ),
RotateX(RotateX),
RotateY(RotateY),
PauliX(PauliX),
PauliY(PauliY),
PauliZ(PauliZ),
SqrtPauliX(SqrtPauliX),
InvSqrtPauliX(InvSqrtPauliX),
Hadamard(Hadamard),
SGate(SGate),
TGate(TGate),
PhaseShiftState1(PhaseShiftState1),
PhaseShiftState0(PhaseShiftState0),
RotateAroundSphericalAxis(RotateAroundSphericalAxis),
RotateXY(RotateXY),
GPi(GPi),
GPi2(GPi2),
Identity(Identity),
}
Expand description
Enum of all Operations implementing OperateSingleQubitGate
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
SingleQubitGate(SingleQubitGate)
Variant for SingleQubitGate
RotateZ(RotateZ)
Variant for RotateZ
RotateX(RotateX)
Variant for RotateX
RotateY(RotateY)
Variant for RotateY
PauliX(PauliX)
Variant for PauliX
PauliY(PauliY)
Variant for PauliY
PauliZ(PauliZ)
Variant for PauliZ
SqrtPauliX(SqrtPauliX)
Variant for SqrtPauliX
InvSqrtPauliX(InvSqrtPauliX)
Variant for InvSqrtPauliX
Hadamard(Hadamard)
Variant for Hadamard
SGate(SGate)
Variant for SGate
TGate(TGate)
Variant for TGate
PhaseShiftState1(PhaseShiftState1)
Variant for PhaseShiftState1
PhaseShiftState0(PhaseShiftState0)
Variant for PhaseShiftState0
RotateAroundSphericalAxis(RotateAroundSphericalAxis)
Variant for RotateAroundSphericalAxis
RotateXY(RotateXY)
Variant for RotateXY
GPi(GPi)
Variant for GPi
GPi2(GPi2)
Variant for GPi2
Identity(Identity)
Variant for Identity
Trait Implementations§
source§impl Clone for SingleQubitGateOperation
impl Clone for SingleQubitGateOperation
source§fn clone(&self) -> SingleQubitGateOperation
fn clone(&self) -> SingleQubitGateOperation
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SingleQubitGateOperation
impl Debug for SingleQubitGateOperation
source§impl<'de> Deserialize<'de> for SingleQubitGateOperation
impl<'de> Deserialize<'de> for SingleQubitGateOperation
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<Hadamard> for SingleQubitGateOperation
impl From<Hadamard> for SingleQubitGateOperation
Implements the From trait from this Operation.
source§impl From<Identity> for SingleQubitGateOperation
impl From<Identity> for SingleQubitGateOperation
Implements the From trait from this Operation.
source§impl From<InvSqrtPauliX> for SingleQubitGateOperation
impl From<InvSqrtPauliX> for SingleQubitGateOperation
Implements the From trait from this Operation.
source§fn from(v: InvSqrtPauliX) -> Self
fn from(v: InvSqrtPauliX) -> Self
Performs the conversion.
source§impl From<PhaseShiftState0> for SingleQubitGateOperation
impl From<PhaseShiftState0> for SingleQubitGateOperation
Implements the From trait from this Operation.
source§fn from(v: PhaseShiftState0) -> Self
fn from(v: PhaseShiftState0) -> Self
Performs the conversion.
source§impl From<PhaseShiftState1> for SingleQubitGateOperation
impl From<PhaseShiftState1> for SingleQubitGateOperation
Implements the From trait from this Operation.
source§fn from(v: PhaseShiftState1) -> Self
fn from(v: PhaseShiftState1) -> Self
Performs the conversion.
source§impl From<RotateAroundSphericalAxis> for SingleQubitGateOperation
impl From<RotateAroundSphericalAxis> for SingleQubitGateOperation
Implements the From trait from this Operation.
source§fn from(v: RotateAroundSphericalAxis) -> Self
fn from(v: RotateAroundSphericalAxis) -> Self
Performs the conversion.
source§impl From<RotateX> for SingleQubitGateOperation
impl From<RotateX> for SingleQubitGateOperation
Implements the From trait from this Operation.
source§impl From<RotateXY> for SingleQubitGateOperation
impl From<RotateXY> for SingleQubitGateOperation
Implements the From trait from this Operation.
source§impl From<RotateY> for SingleQubitGateOperation
impl From<RotateY> for SingleQubitGateOperation
Implements the From trait from this Operation.
source§impl From<RotateZ> for SingleQubitGateOperation
impl From<RotateZ> for SingleQubitGateOperation
Implements the From trait from this Operation.
source§impl From<SingleQubitGate> for SingleQubitGateOperation
impl From<SingleQubitGate> for SingleQubitGateOperation
Implements the From trait from this Operation.
source§fn from(v: SingleQubitGate) -> Self
fn from(v: SingleQubitGate) -> Self
Performs the conversion.
source§impl From<SingleQubitGateOperation> for Operation
impl From<SingleQubitGateOperation> for Operation
source§fn from(op: SingleQubitGateOperation) -> Self
fn from(op: SingleQubitGateOperation) -> Self
source§impl From<SqrtPauliX> for SingleQubitGateOperation
impl From<SqrtPauliX> for SingleQubitGateOperation
Implements the From trait from this Operation.
source§fn from(v: SqrtPauliX) -> Self
fn from(v: SqrtPauliX) -> Self
Performs the conversion.
source§impl InvolveQubits for SingleQubitGateOperation
impl InvolveQubits for SingleQubitGateOperation
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 SingleQubitGateOperation
impl Operate for SingleQubitGateOperation
Implements the universal basic trait Operate for this Operation.
source§impl OperateGate for SingleQubitGateOperation
impl OperateGate for SingleQubitGateOperation
source§fn unitary_matrix(&self) -> Result<Array2<Complex64>, RoqoqoError>
fn unitary_matrix(&self) -> Result<Array2<Complex64>, RoqoqoError>
source§impl OperateSingleQubit for SingleQubitGateOperation
impl OperateSingleQubit for SingleQubitGateOperation
Implements OperateSingleQubit trait for this Operation acting on exactly one qubit.
source§impl OperateSingleQubitGate for SingleQubitGateOperation
impl OperateSingleQubitGate for SingleQubitGateOperation
source§fn alpha_r(&self) -> CalculatorFloat
fn alpha_r(&self) -> CalculatorFloat
source§fn alpha_i(&self) -> CalculatorFloat
fn alpha_i(&self) -> CalculatorFloat
source§fn beta_r(&self) -> CalculatorFloat
fn beta_r(&self) -> CalculatorFloat
source§fn beta_i(&self) -> CalculatorFloat
fn beta_i(&self) -> CalculatorFloat
source§fn global_phase(&self) -> CalculatorFloat
fn global_phase(&self) -> CalculatorFloat
source§fn mul<T>(&self, other: &T) -> Result<SingleQubitGate, RoqoqoError>where
T: OperateSingleQubitGate,
fn mul<T>(&self, other: &T) -> Result<SingleQubitGate, RoqoqoError>where
T: OperateSingleQubitGate,
source§fn to_single_qubit_gate(&self) -> SingleQubitGate
fn to_single_qubit_gate(&self) -> SingleQubitGate
source§impl PartialEq for SingleQubitGateOperation
impl PartialEq for SingleQubitGateOperation
source§fn eq(&self, other: &SingleQubitGateOperation) -> bool
fn eq(&self, other: &SingleQubitGateOperation) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for SingleQubitGateOperation
impl Serialize for SingleQubitGateOperation
source§impl Substitute for SingleQubitGateOperation
impl Substitute for SingleQubitGateOperation
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 SingleQubitGateOperation
impl TryFrom<&Operation> for SingleQubitGateOperation
source§impl TryFrom<Operation> for SingleQubitGateOperation
impl TryFrom<Operation> for SingleQubitGateOperation
source§impl TryFrom<SingleQubitGateOperation> for GPi
impl TryFrom<SingleQubitGateOperation> for GPi
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<SingleQubitGateOperation> for GPi2
impl TryFrom<SingleQubitGateOperation> for GPi2
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<SingleQubitGateOperation> for Hadamard
impl TryFrom<SingleQubitGateOperation> for Hadamard
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<SingleQubitGateOperation> for Identity
impl TryFrom<SingleQubitGateOperation> for Identity
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<SingleQubitGateOperation> for InvSqrtPauliX
impl TryFrom<SingleQubitGateOperation> for InvSqrtPauliX
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<SingleQubitGateOperation> for PauliX
impl TryFrom<SingleQubitGateOperation> for PauliX
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<SingleQubitGateOperation> for PauliY
impl TryFrom<SingleQubitGateOperation> for PauliY
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<SingleQubitGateOperation> for PauliZ
impl TryFrom<SingleQubitGateOperation> for PauliZ
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<SingleQubitGateOperation> for PhaseShiftState0
impl TryFrom<SingleQubitGateOperation> for PhaseShiftState0
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<SingleQubitGateOperation> for PhaseShiftState1
impl TryFrom<SingleQubitGateOperation> for PhaseShiftState1
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<SingleQubitGateOperation> for RotateAroundSphericalAxis
impl TryFrom<SingleQubitGateOperation> for RotateAroundSphericalAxis
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<SingleQubitGateOperation> for RotateX
impl TryFrom<SingleQubitGateOperation> for RotateX
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<SingleQubitGateOperation> for RotateXY
impl TryFrom<SingleQubitGateOperation> for RotateXY
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<SingleQubitGateOperation> for RotateY
impl TryFrom<SingleQubitGateOperation> for RotateY
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<SingleQubitGateOperation> for RotateZ
impl TryFrom<SingleQubitGateOperation> for RotateZ
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<SingleQubitGateOperation> for SGate
impl TryFrom<SingleQubitGateOperation> for SGate
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<SingleQubitGateOperation> for SingleQubitGate
impl TryFrom<SingleQubitGateOperation> for SingleQubitGate
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<SingleQubitGateOperation> for SqrtPauliX
impl TryFrom<SingleQubitGateOperation> for SqrtPauliX
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<SingleQubitGateOperation> for TGate
impl TryFrom<SingleQubitGateOperation> for TGate
Implements the core::convert::TryFrom trait into this Operation.
impl StructuralPartialEq for SingleQubitGateOperation
Auto Trait Implementations§
impl Freeze for SingleQubitGateOperation
impl RefUnwindSafe for SingleQubitGateOperation
impl Send for SingleQubitGateOperation
impl Sync for SingleQubitGateOperation
impl Unpin for SingleQubitGateOperation
impl UnwindSafe for SingleQubitGateOperation
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.