Struct qoqo::operations::FsimWrapper
source · pub struct FsimWrapper {
pub internal: Fsim,
}
Expand description
The fermionic qubit simulation (Fsim) gate.
.. math:: U = \begin{pmatrix} \cos(\Delta) & 0 & 0 & i \sin(\Delta) \\ 0 & -i \sin(t) & \cos(t) & 0 \\ 0 & \cos(t) & -i \sin(t) & 0 \\ -\sin(\Delta) \cdot e^{-i U} & 0 & 0 & -\cos(\Delta) \cdot e^{-i U} \end{pmatrix}
Args:
control (int): The index of the most significant qubit in the unitary representation.
target (int):: The index of the least significant qubit in the unitary representation.
t (CalculatorFloat): The hopping strength.
u (CalculatorFloat): The interaction strength.
delta (CalculatorFloat): The Bogoliubov interaction strength :math:\Delta
.
Note:
The qubits have to be adjacent, i.e., :math:|i-j|=1
has to hold. This is the only case
in which the gate is valid as a two-qubit gate (due to the Jordan-Wigner transformation).
Fields§
§internal: Fsim
Internal storage of Fsim object
Implementations§
source§impl FsimWrapper
impl FsimWrapper
sourcepub fn t(&self) -> CalculatorFloatWrapper
pub fn t(&self) -> CalculatorFloatWrapper
Returns value of attribute t
sourcepub fn u(&self) -> CalculatorFloatWrapper
pub fn u(&self) -> CalculatorFloatWrapper
Returns value of attribute u
sourcepub fn delta(&self) -> CalculatorFloatWrapper
pub fn delta(&self) -> CalculatorFloatWrapper
Returns value of attribute delta
Trait Implementations§
source§impl Clone for FsimWrapper
impl Clone for FsimWrapper
source§fn clone(&self) -> FsimWrapper
fn clone(&self) -> FsimWrapper
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for FsimWrapper
impl Debug for FsimWrapper
source§impl HasPyGilRef for FsimWrapper
impl HasPyGilRef for FsimWrapper
§type AsRefTarget = PyCell<FsimWrapper>
type AsRefTarget = PyCell<FsimWrapper>
source§impl PartialEq for FsimWrapper
impl PartialEq for FsimWrapper
source§fn eq(&self, other: &FsimWrapper) -> bool
fn eq(&self, other: &FsimWrapper) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PyClassImpl for FsimWrapper
impl PyClassImpl for FsimWrapper
source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
§type ThreadChecker = SendablePyClass<FsimWrapper>
type ThreadChecker = SendablePyClass<FsimWrapper>
type Inventory = Pyo3MethodsInventoryForFsimWrapper
§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
§type BaseNativeType = PyAny
type BaseNativeType = PyAny
PyAny
by default, and when you declare
#[pyclass(extends=PyDict)]
, it’s PyDict
.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
source§impl PyClassNewTextSignature<FsimWrapper> for PyClassImplCollector<FsimWrapper>
impl PyClassNewTextSignature<FsimWrapper> for PyClassImplCollector<FsimWrapper>
fn new_text_signature(self) -> Option<&'static str>
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a FsimWrapper
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a FsimWrapper
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut FsimWrapper
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut FsimWrapper
source§impl PyTypeInfo for FsimWrapper
impl PyTypeInfo for FsimWrapper
source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
source§fn type_object(py: Python<'_>) -> &PyType
fn type_object(py: Python<'_>) -> &PyType
PyTypeInfo::type_object
will be replaced by PyTypeInfo::type_object_bound
in a future PyO3 versionsource§fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>
fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>
source§fn is_type_of(object: &PyAny) -> bool
fn is_type_of(object: &PyAny) -> bool
PyTypeInfo::is_type_of
will be replaced by PyTypeInfo::is_type_of_bound
in a future PyO3 versionobject
is an instance of this type or a subclass of this type.source§fn is_type_of_bound(object: &Bound<'_, PyAny>) -> bool
fn is_type_of_bound(object: &Bound<'_, PyAny>) -> bool
object
is an instance of this type or a subclass of this type.source§fn is_exact_type_of(object: &PyAny) -> bool
fn is_exact_type_of(object: &PyAny) -> bool
PyTypeInfo::is_exact_type_of
will be replaced by PyTypeInfo::is_exact_type_of_bound
in a future PyO3 versionobject
is an instance of this type.impl DerefToPyAny for FsimWrapper
impl StructuralPartialEq for FsimWrapper
Auto Trait Implementations§
impl Freeze for FsimWrapper
impl RefUnwindSafe for FsimWrapper
impl Send for FsimWrapper
impl Sync for FsimWrapper
impl Unpin for FsimWrapper
impl UnwindSafe for FsimWrapper
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> FromPyObject<'_> for T
impl<T> FromPyObject<'_> for T
source§impl<'py, T> FromPyObjectBound<'_, 'py> for Twhere
T: FromPyObject<'py>,
impl<'py, T> FromPyObjectBound<'_, 'py> for Twhere
T: FromPyObject<'py>,
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<T> PyErrArguments for T
impl<T> PyErrArguments for T
source§impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
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.