elementary_operator

Concrete implementation of fundamental Operators and Gates.

final class parityos.operators.elementary_operator.X(qubit: QubitT_co)

Bases: PauliOperator[QubitT_co]

The Pauli X operator.

final class parityos.operators.elementary_operator.Y(qubit: QubitT_co)

Bases: PauliOperator[QubitT_co]

The Pauli Y operator.

final class parityos.operators.elementary_operator.Z(qubit: QubitT_co)

Bases: PauliOperator[QubitT_co]

The Pauli Z operator.

final class parityos.operators.elementary_operator.H(qubit: QubitT_co)

Bases: HermitianSingleQubitOperator[QubitT_co]

The Hadamard gate.

final class parityos.operators.elementary_operator.S(qubit: QubitT_co)

Bases: SingleQubitOperator[QubitT_co]

The square root of the Pauli Z operator.

get_hermitian_conjugate() SDg[QubitT_co]

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

final class parityos.operators.elementary_operator.SDg(qubit: QubitT_co)

Bases: SingleQubitOperator[QubitT_co]

The hermitian conjugate of S.

get_hermitian_conjugate() S[QubitT_co]

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

final class parityos.operators.elementary_operator.T(qubit: QubitT_co)

Bases: SingleQubitOperator[QubitT_co]

The fourth root of the Pauli Z operator.

get_hermitian_conjugate() TDg[QubitT_co]

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

final class parityos.operators.elementary_operator.TDg(qubit: QubitT_co)

Bases: SingleQubitOperator[QubitT_co]

The hermitian conjugate of T.

get_hermitian_conjugate() T[QubitT_co]

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

final class parityos.operators.elementary_operator.SX(qubit: QubitT_co)

Bases: SingleQubitOperator[QubitT_co]

The square root of the Pauli X operator.

get_hermitian_conjugate() SXDg[QubitT_co]

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

final class parityos.operators.elementary_operator.SXDg(qubit: QubitT_co)

Bases: SingleQubitOperator[QubitT_co]

The hermitian conjugate of SX.

get_hermitian_conjugate() SX[QubitT_co]

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

final class parityos.operators.elementary_operator.Swap(qubits: Iterable[QubitT_co])

Bases: HermitianUnorderedMultiQubitOperator[QubitT_co]

The two-qubit Swap gate.

n_qubits: ClassVar[int] = 2

The number of qubits this operator acts on. Implementing classes define this as static class variable.

final class parityos.operators.elementary_operator.ISwap(qubits: Iterable[QubitT_co])

Bases: UnorderedMultiQubitOperator[QubitT_co]

The two-qubit ISwap gate.

n_qubits: ClassVar[int] = 2

The number of qubits this operator acts on. Implementing classes define this as static class variable.

get_hermitian_conjugate() ISwapDg[QubitT_co]

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

final class parityos.operators.elementary_operator.ISwapDg(qubits: Iterable[QubitT_co])

Bases: UnorderedMultiQubitOperator[QubitT_co]

The hermitian conjugate of the two-qubit ISwap gate.

n_qubits: ClassVar[int] = 2

The number of qubits this operator acts on. Implementing classes define this as static class variable.

get_hermitian_conjugate() ISwap[QubitT_co]

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

final class parityos.operators.elementary_operator.ExchangeTerm(qubits: Iterable[QubitT_co])

Bases: HermitianUnorderedMultiQubitOperator[QubitT_co]

The exchange interaction term (also known as flip-flop or hopping term).

\[X \otimes X + Y \otimes Y.\]
n_qubits: ClassVar[int] = 2

The number of qubits this operator acts on. Implementing classes define this as static class variable.

final class parityos.operators.elementary_operator.ECR(ordered_qubits)

Bases: HermitianOrderedMultiQubitOperator[QubitT_co]

The two-qubit Echoed Cross-Resonance (ECR) gate.

\[I \otimes X - X \otimes Y.\]
n_qubits: ClassVar[int] = 2

The number of qubits this operator acts on. Implementing classes define this as static class variable.

final class parityos.operators.elementary_operator.Barrier(qubits: T | Iterable[T] = NOTHING)

Bases: HermitianUnorderedMultiQubitOperator[QubitT_co]

A barrier that prevents moving operators across it in subsequent circuit optimization rearrangements.

To restrict a Barrier to a given set of qubits, pass the relevant qubits at instantiation. If no qubits are given, the barrier acts on all qubits in the context.

qubits: frozenset[QubitT_co]
property n_qubits: int