Struct roqoqo::operations::InvSqrtISwap
source · pub struct InvSqrtISwap {
control: usize,
target: usize,
}
Expand description
The inverse square root ISwap gate.
InvSqrtISwap * SqrtISwap = Identity
Fields§
§control: usize
The index of the most significant qubit in the unitary representation.
target: usize
The index of the least significant qubit in the unitary representation.
Implementations§
Trait Implementations§
source§impl Clone for InvSqrtISwap
impl Clone for InvSqrtISwap
source§fn clone(&self) -> InvSqrtISwap
fn clone(&self) -> InvSqrtISwap
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for InvSqrtISwap
impl Debug for InvSqrtISwap
source§impl<'de> Deserialize<'de> for InvSqrtISwap
impl<'de> Deserialize<'de> for InvSqrtISwap
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<InvSqrtISwap> for GateOperation
impl From<InvSqrtISwap> for GateOperation
Implements the From trait from this Operation.
source§fn from(v: InvSqrtISwap) -> Self
fn from(v: InvSqrtISwap) -> Self
Performs the conversion.
source§impl From<InvSqrtISwap> for Operation
impl From<InvSqrtISwap> for Operation
Implements the From trait from this Operation.
source§fn from(v: InvSqrtISwap) -> Self
fn from(v: InvSqrtISwap) -> 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<InvSqrtISwap> for TwoQubitOperation
impl From<InvSqrtISwap> for TwoQubitOperation
Implements the From trait from this Operation.
source§fn from(v: InvSqrtISwap) -> Self
fn from(v: InvSqrtISwap) -> Self
Performs the conversion.
source§impl InvolveQubits for InvSqrtISwap
impl InvolveQubits for InvSqrtISwap
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 InvSqrtISwap
impl Operate for InvSqrtISwap
Implements the universal basic trait Operate for this Operation.
source§impl OperateGate for InvSqrtISwap
impl OperateGate for InvSqrtISwap
Trait for all Operations acting with a unitary gate on a set of qubits.
source§fn unitary_matrix(&self) -> Result<Array2<Complex64>, RoqoqoError>
fn unitary_matrix(&self) -> Result<Array2<Complex64>, RoqoqoError>
Returns unitary matrix of the gate.
§Returns
Ok(Array2<Complex64>)
- The unitary matrix representation of the gate.Err(RoqoqoError)
- The conversion of parameters to f64 failed (here, not possible).
source§impl OperateTwoQubit for InvSqrtISwap
impl OperateTwoQubit for InvSqrtISwap
Trait for Operations acting on exactly two qubits.
source§impl OperateTwoQubitGate for InvSqrtISwap
impl OperateTwoQubitGate for InvSqrtISwap
Trait for all gate operations acting on exactly two qubits.
source§fn kak_decomposition(&self) -> KakDecomposition
fn kak_decomposition(&self) -> KakDecomposition
Returns KakDecomposition of the gate.
§Returns
- struct
KakDecomposition { global_phase, k_vector, circuit_before, circuit_after }
source§impl PartialEq for InvSqrtISwap
impl PartialEq for InvSqrtISwap
source§fn eq(&self, other: &InvSqrtISwap) -> bool
fn eq(&self, other: &InvSqrtISwap) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for InvSqrtISwap
impl Serialize for InvSqrtISwap
source§impl Substitute for InvSqrtISwap
impl Substitute for InvSqrtISwap
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 SupportedVersion for InvSqrtISwap
impl SupportedVersion for InvSqrtISwap
source§impl TryFrom<GateOperation> for InvSqrtISwap
impl TryFrom<GateOperation> for InvSqrtISwap
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<Operation> for InvSqrtISwap
impl TryFrom<Operation> for InvSqrtISwap
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<TwoQubitOperation> for InvSqrtISwap
impl TryFrom<TwoQubitOperation> for InvSqrtISwap
Implements the core::convert::TryFrom trait into this Operation.
impl Eq for InvSqrtISwap
impl StructuralPartialEq for InvSqrtISwap
Auto Trait Implementations§
impl Freeze for InvSqrtISwap
impl RefUnwindSafe for InvSqrtISwap
impl Send for InvSqrtISwap
impl Sync for InvSqrtISwap
impl Unpin for InvSqrtISwap
impl UnwindSafe for InvSqrtISwap
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.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.