graphix.pauli module¶
Pauli gates ± {1,j} × {I, X, Y, Z}.
- class Pauli(symbol: IXYZ = SingletonI.I, unit: ComplexUnit = ComplexUnit.ONE)[source]¶
Bases:
objectPauli gate:
u * {I, X, Y, Z}where u is a complex unit.Pauli gates can be multiplied with other Pauli gates (with
@), with complex units and unit constants (with*), and can be negated.- symbol: IXYZ = 1¶
- unit: ComplexUnit = 0¶
- property matrix: npt.NDArray[np.complex128]¶
Return the matrix of the Pauli gate.
- eigenstate(binary: int = 0) PlanarState[source]¶
Return the eigenstate of the Pauli.
- static iterate(symbol_only: bool = False) Iterator[Pauli][source]¶
Iterate over all Pauli gates.
- Parameters:
(bool (symbol_only)
optional) (Exclude the unit in the iteration. Defaults to False.)
- __init__(symbol: IXYZ = SingletonI.I, unit: ComplexUnit = ComplexUnit.ONE) None¶