Struct roqoqo::operations::MultiQubitZZ
source · pub struct MultiQubitZZ {
qubits: Vec<usize>,
theta: CalculatorFloat,
}
Expand description
The multi qubit Pauli-Z-Product gate.
The gate applies the rotation under the product of Pauli Z operators on multiple qubits. In mathematical terms the gate applies exp(-i * θ/2 * Z_i0 * Z_i1 * … * Z_in).
Fields§
§qubits: Vec<usize>
The qubits involved in the multi qubit Molmer-Sorensen gate.
theta: CalculatorFloat
The angle of the multi qubit Molmer-Sorensen gate.
Implementations§
source§impl MultiQubitZZ
impl MultiQubitZZ
sourcepub fn theta(&self) -> &CalculatorFloat
pub fn theta(&self) -> &CalculatorFloat
Returns the value of the field theta
.
sourcepub fn new(qubits: Vec<usize>, theta: CalculatorFloat) -> Self
pub fn new(qubits: Vec<usize>, theta: CalculatorFloat) -> Self
Creates a new instance of MultiQubitZZ
.
Trait Implementations§
source§impl Clone for MultiQubitZZ
impl Clone for MultiQubitZZ
source§fn clone(&self) -> MultiQubitZZ
fn clone(&self) -> MultiQubitZZ
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for MultiQubitZZ
impl Debug for MultiQubitZZ
source§impl<'de> Deserialize<'de> for MultiQubitZZ
impl<'de> Deserialize<'de> for MultiQubitZZ
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<MultiQubitZZ> for GateOperation
impl From<MultiQubitZZ> for GateOperation
Implements the From trait from this Operation.
source§fn from(v: MultiQubitZZ) -> Self
fn from(v: MultiQubitZZ) -> Self
Performs the conversion.
source§impl From<MultiQubitZZ> for MultiQubitGateOperation
impl From<MultiQubitZZ> for MultiQubitGateOperation
Implements the From trait from this Operation.
source§fn from(v: MultiQubitZZ) -> Self
fn from(v: MultiQubitZZ) -> Self
Performs the conversion.
source§impl From<MultiQubitZZ> for MultiQubitOperation
impl From<MultiQubitZZ> for MultiQubitOperation
Implements the From trait from this Operation.
source§fn from(v: MultiQubitZZ) -> Self
fn from(v: MultiQubitZZ) -> Self
Performs the conversion.
source§impl From<MultiQubitZZ> for Operation
impl From<MultiQubitZZ> for Operation
Implements the From trait from this Operation.
source§fn from(v: MultiQubitZZ) -> Self
fn from(v: MultiQubitZZ) -> Self
Performs the conversion.
source§impl From<MultiQubitZZ> for Rotation
impl From<MultiQubitZZ> for Rotation
Implements the From trait from this Operation.
source§fn from(v: MultiQubitZZ) -> Self
fn from(v: MultiQubitZZ) -> Self
Performs the conversion.
source§impl InvolveQubits for MultiQubitZZ
impl InvolveQubits for MultiQubitZZ
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 MultiQubitZZ
impl Operate for MultiQubitZZ
Implements the universal basic trait Operate for this Operation.
source§impl OperateGate for MultiQubitZZ
impl OperateGate for MultiQubitZZ
source§fn unitary_matrix(&self) -> Result<Array2<Complex64>, RoqoqoError>
fn unitary_matrix(&self) -> Result<Array2<Complex64>, RoqoqoError>
source§impl OperateMultiQubit for MultiQubitZZ
impl OperateMultiQubit for MultiQubitZZ
Implements OperateMultiQubit trait for this Operation acting on a set of qubits.
source§impl OperateMultiQubitGate for MultiQubitZZ
impl OperateMultiQubitGate for MultiQubitZZ
source§impl PartialEq for MultiQubitZZ
impl PartialEq for MultiQubitZZ
source§fn eq(&self, other: &MultiQubitZZ) -> bool
fn eq(&self, other: &MultiQubitZZ) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Rotate for MultiQubitZZ
impl Rotate for MultiQubitZZ
source§fn theta(&self) -> &CalculatorFloat
fn theta(&self) -> &CalculatorFloat
source§fn powercf(&self, power: CalculatorFloat) -> MultiQubitZZ
fn powercf(&self, power: CalculatorFloat) -> MultiQubitZZ
power
.`source§impl Serialize for MultiQubitZZ
impl Serialize for MultiQubitZZ
source§impl Substitute for MultiQubitZZ
impl Substitute for MultiQubitZZ
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 MultiQubitZZ
impl SupportedVersion for MultiQubitZZ
source§impl TryFrom<GateOperation> for MultiQubitZZ
impl TryFrom<GateOperation> for MultiQubitZZ
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<MultiQubitGateOperation> for MultiQubitZZ
impl TryFrom<MultiQubitGateOperation> for MultiQubitZZ
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<MultiQubitOperation> for MultiQubitZZ
impl TryFrom<MultiQubitOperation> for MultiQubitZZ
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<Operation> for MultiQubitZZ
impl TryFrom<Operation> for MultiQubitZZ
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<Rotation> for MultiQubitZZ
impl TryFrom<Rotation> for MultiQubitZZ
Implements the core::convert::TryFrom trait into this Operation.
impl StructuralPartialEq for MultiQubitZZ
Auto Trait Implementations§
impl Freeze for MultiQubitZZ
impl RefUnwindSafe for MultiQubitZZ
impl Send for MultiQubitZZ
impl Sync for MultiQubitZZ
impl Unpin for MultiQubitZZ
impl UnwindSafe for MultiQubitZZ
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.