pauli
¶
Single-qubit Pauli operators.
Pauli
¶
Single-qubit Pauli operator: I, X, Y, or Z.
Source code in shadowsim/core/pauli.py
__init__
¶
Initialize a Pauli from a label in {I, X, Y, Z}.
Source code in shadowsim/core/pauli.py
matrix
¶
__str__
¶
__repr__
¶
__eq__
¶
__hash__
¶
multiply
¶
Multiply in the Pauli group: self * other = phase * result.
phase is in {±1, ±i}.
Source code in shadowsim/core/pauli.py
commutator
¶
Return [self, other] as phase * P, or (None, None) if zero.
For single-qubit Paulis this is either 0 or 2i times the third Pauli.