global_operator¶
Global rotation operators which represent tensor products of equivalent single qubit rotations acting on all qubits in parallel.
- class parityos.operators.global_operator.GlobalOperator(qubits: Iterable[QubitT_co])¶
Bases:
Operator[QubitT_co],HasFrozenUnorderedQubits[QubitT_co],ABCAbstract base class representing a global operator as a tensor product of individual parallel single qubit operators.
The actual operator tensor product it represents can be accessed through the
operatorsproperty as a frozenset of disjoint operators.Note
A global operator can per definition not be an entangling gate. It can thus be understood as a special case of an
UnorderedMultiQubitOperator. As such it does also not contribute to the connectivity of aDeviceModel.- operator_product: OperatorProduct[Operator[QubitT_co]]¶
- class parityos.operators.global_operator.GlobalRotationOperator(qubits: Iterable[QubitT_co], angle: Coefficient = Parameter(name='DEFAULT_ANGLE', assumptions=ParameterAssumptions(zero=None, nonzero=None, positive=None, negative=None, rational=None, irrational=None, integer=None, even=None, odd=None, real=True, finite=True)))¶
Bases:
HasAngle,GlobalOperator[QubitT_co],Generic[QubitT_co,BasisT_co],ABCAbstract base class representing a global rotation as a tensor product of individual parallel single qubit rotations.
A global rotation is defined by its rotation type (one of
RX,RYorRZ),angleof rotation and thequbitsit acts on.The actual operator tensor product it represents can be accessed through the
operatorsproperty.Implementing subclasses need to implement the abstract class variable
rotation_typedefining the single qubit rotation type.Note
Global rotations are not subclasses of
RotationOperatoras they don’t have a singleexponent. Rather they are a tensor product of individualRotationOperatorinstances.- rotation_type: ClassVar[type[SingleQubitRotation[QubitT_co, BasisT_co]]]¶
The operator type of the single qubit rotation. Implementing classes must override this abstract
typing.ClassVar.
- operators: frozenset[SingleQubitRotation[QubitT_co, BasisT_co]]¶
The set of parallel single qubit rotations this global rotation represents.
- class parityos.operators.global_operator.GlobalRX(qubits: Iterable[QubitT_co], angle: Coefficient = Parameter(name='DEFAULT_ANGLE', assumptions=ParameterAssumptions(zero=None, nonzero=None, positive=None, negative=None, rational=None, irrational=None, integer=None, even=None, odd=None, real=True, finite=True)))¶
Bases:
GlobalRotationOperator[QubitT_co,X[Never]]Global rotation by \(\varphi\) =
anglearound the X axis onNqubits.\[\mathrm{GlobalRX}(\varphi) = \exp\left(- i\frac{\varphi}{2} X_1\right) \ldots \exp\left(- i\frac{\varphi}{2} X_N\right)\]
- class parityos.operators.global_operator.GlobalRY(qubits: Iterable[QubitT_co], angle: Coefficient = Parameter(name='DEFAULT_ANGLE', assumptions=ParameterAssumptions(zero=None, nonzero=None, positive=None, negative=None, rational=None, irrational=None, integer=None, even=None, odd=None, real=True, finite=True)))¶
Bases:
GlobalRotationOperator[QubitT_co,Y[Never]]Global rotation by \(\varphi\) =
anglearound the Y axis onNqubits.\[\mathrm{GlobalRY}(\varphi) = \exp\left(- i\frac{\varphi}{2} Y_1\right) \ldots \exp\left(- i\frac{\varphi}{2} Y_N\right)\]
- class parityos.operators.global_operator.GlobalRZ(qubits: Iterable[QubitT_co], angle: Coefficient = Parameter(name='DEFAULT_ANGLE', assumptions=ParameterAssumptions(zero=None, nonzero=None, positive=None, negative=None, rational=None, irrational=None, integer=None, even=None, odd=None, real=True, finite=True)))¶
Bases:
GlobalRotationOperator[QubitT_co,Z[Never]]Global rotation by \(\varphi\) =
anglearound the Z axis onNqubits.\[\mathrm{GlobalRZ}(\varphi) = \exp\left(- i\frac{\varphi}{2} Z_1\right) \ldots \exp\left(- i\frac{\varphi}{2} Z_N\right)\]