Struct roqoqo::operations::Bogoliubov
source · pub struct Bogoliubov {
control: usize,
target: usize,
delta_real: CalculatorFloat,
delta_imag: CalculatorFloat,
}
Expand description
The Bogoliubov DeGennes interaction gate.
exp(-i * Re(Δ) * [X_c X_t - Y_c Y_t]/2 + Im(Δ) * [X_c Y_t+Y_c X_t]/2)
Where X_c is the Pauli matrix σ^x acting on the control qubit, and Y_t is the Pauli matrix σ^y acting on the target qubit.
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.
delta_real: CalculatorFloat
The real part of the complex Bogoliubov interaction strength Re(Δ).
delta_imag: CalculatorFloat
The imaginary part of the complex Bogoliubov interaction strength Im(Δ).
Implementations§
source§impl Bogoliubov
impl Bogoliubov
sourcepub fn delta_real(&self) -> &CalculatorFloat
pub fn delta_real(&self) -> &CalculatorFloat
Returns the value of the field delta_real
.
sourcepub fn delta_imag(&self) -> &CalculatorFloat
pub fn delta_imag(&self) -> &CalculatorFloat
Returns the value of the field delta_imag
.
sourcepub fn new(
control: usize,
target: usize,
delta_real: CalculatorFloat,
delta_imag: CalculatorFloat
) -> Self
pub fn new( control: usize, target: usize, delta_real: CalculatorFloat, delta_imag: CalculatorFloat ) -> Self
Creates a new instance of Bogoliubov
.
Trait Implementations§
source§impl Clone for Bogoliubov
impl Clone for Bogoliubov
source§fn clone(&self) -> Bogoliubov
fn clone(&self) -> Bogoliubov
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for Bogoliubov
impl Debug for Bogoliubov
source§impl<'de> Deserialize<'de> for Bogoliubov
impl<'de> Deserialize<'de> for Bogoliubov
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 GateOperation
impl From<Bogoliubov> for GateOperation
Implements the From trait from this Operation.
source§fn from(v: Bogoliubov) -> Self
fn from(v: Bogoliubov) -> Self
Performs the conversion.
source§impl From<Bogoliubov> for Operation
impl From<Bogoliubov> for Operation
Implements the From trait from this Operation.
source§fn from(v: Bogoliubov) -> Self
fn from(v: Bogoliubov) -> Self
Performs the conversion.
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<Bogoliubov> for TwoQubitOperation
impl From<Bogoliubov> for TwoQubitOperation
Implements the From trait from this Operation.
source§fn from(v: Bogoliubov) -> Self
fn from(v: Bogoliubov) -> Self
Performs the conversion.
source§impl InvolveQubits for Bogoliubov
impl InvolveQubits for Bogoliubov
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 Bogoliubov
impl Operate for Bogoliubov
Implements the universal basic trait Operate for this Operation.
source§impl OperateGate for Bogoliubov
impl OperateGate for Bogoliubov
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.
source§impl OperateTwoQubit for Bogoliubov
impl OperateTwoQubit for Bogoliubov
Trait for Operations acting on exactly two qubits.
source§impl OperateTwoQubitGate for Bogoliubov
impl OperateTwoQubitGate for Bogoliubov
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 Bogoliubov
impl PartialEq for Bogoliubov
source§fn eq(&self, other: &Bogoliubov) -> bool
fn eq(&self, other: &Bogoliubov) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for Bogoliubov
impl Serialize for Bogoliubov
source§impl Substitute for Bogoliubov
impl Substitute for Bogoliubov
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 Bogoliubov
impl SupportedVersion for Bogoliubov
source§impl TryFrom<GateOperation> for Bogoliubov
impl TryFrom<GateOperation> for Bogoliubov
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<Operation> for Bogoliubov
impl TryFrom<Operation> for Bogoliubov
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<TwoQubitGateOperation> for Bogoliubov
impl TryFrom<TwoQubitGateOperation> for Bogoliubov
Implements the core::convert::TryFrom trait into this Operation.
source§impl TryFrom<TwoQubitOperation> for Bogoliubov
impl TryFrom<TwoQubitOperation> for Bogoliubov
Implements the core::convert::TryFrom trait into this Operation.
impl StructuralPartialEq for Bogoliubov
Auto Trait Implementations§
impl Freeze for Bogoliubov
impl RefUnwindSafe for Bogoliubov
impl Send for Bogoliubov
impl Sync for Bogoliubov
impl Unpin for Bogoliubov
impl UnwindSafe for Bogoliubov
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.