$Z$
Paulis & basics 1 qubit
Pauli-Z
Phase-flip gate that leaves $|0\rangle$ unchanged and flips the phase of $|1\rangle$.
Open in Quirk โ
hermitian
The Pauli-$Z$ gate applies a relative phase of $-1$ to the $|1\rangle$ component.
$$ Z = \begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix} $$
Properties
- Hermitian and self-inverse: $Z^\dagger = Z$ and $Z^2 = I$.
- Equivalent to a $\pi$ rotation about $z$ up to global phase.
The unitary, drawn
Every entry of the matrix as a disc. The area is the transition probability $|U_{jk}|^2$; the colour and the hand are the phase. Rows are outputs $\langle j|$, columns inputs $|k\rangle$, in the computational basis.
Phase
Disc area $= |U_{jk}|^2$. Hover an entry for its value, or take the JSON.
SDK support
How to call this gate in each framework. Hover a โ for a note; the support matrix compares every gate at once.
| SDK | Name |
|---|---|
| Qiskit | qiskit.circuit.library.ZGate |
| PennyLane | pennylane.PauliZ |
| Cirq | cirq.Z |
| Q# | Std.Intrinsic.Z |
| PyQuil | pyquil.gates.Z |
| Braket | braket.circuits.gates.Z |
| BQSKit | bqskit.ir.gates.ZGate |
| Qibo | qibo.gates.Z |
| pytket | pytket.circuit.OpType.Z |
| Stim | Z |
| OpenQASM | stdgates.inc: z |