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], ABC

Abstract 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 operators property 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 a DeviceModel.

qubits: frozenset[QubitT_co]

The set of qubits this global operator acts on.

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], ABC

Abstract 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, RY or RZ), angle of rotation and the qubits it acts on.

The actual operator tensor product it represents can be accessed through the operators property.

Implementing subclasses need to implement the abstract class variable rotation_type defining the single qubit rotation type.

Note

Global rotations are not subclasses of RotationOperator as they don’t have a single exponent. Rather they are a tensor product of individual RotationOperator instances.

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.

is_hermitian: bool
get_hermitian_conjugate() Self

Return the hermitian conjugate (\(\dagger\)) of this operator.

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\) = angle around the X axis on N qubits.

\[\mathrm{GlobalRX}(\varphi) = \exp\left(- i\frac{\varphi}{2} X_1\right) \ldots \exp\left(- i\frac{\varphi}{2} X_N\right)\]
rotation_type

alias of RX

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\) = angle around the Y axis on N qubits.

\[\mathrm{GlobalRY}(\varphi) = \exp\left(- i\frac{\varphi}{2} Y_1\right) \ldots \exp\left(- i\frac{\varphi}{2} Y_N\right)\]
rotation_type

alias of RY

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\) = angle around the Z axis on N qubits.

\[\mathrm{GlobalRZ}(\varphi) = \exp\left(- i\frac{\varphi}{2} Z_1\right) \ldots \exp\left(- i\frac{\varphi}{2} Z_N\right)\]
rotation_type

alias of RZ