Computing Library › Quantum Logic Gates
Quantum Logic Gates
Pauli-Z Gate (Phase Flip)
The Pauli-Z gate flips the phase of |1⟩ while leaving |0⟩ alone — a 180° rotation about the z-axis.
Matrix
Unitary matrix
100−1
Circuit symbol
Action on basis states
| input | output |
|---|---|
| |0⟩ | |0⟩ |
| |1⟩ | −|1⟩ |
| |+⟩ | |−⟩ |
| |−⟩ | |+⟩ |
How it works
Z is the phase-flip. Diagonal in the computational basis, it does nothing you can measure directly on |0⟩/|1⟩ populations, but it swaps |+⟩ and |−⟩ — which is why phase errors are invisible without a basis change. Hermitian, Clifford, Z²=I.
In code (Qiskit)
python
qc = QuantumCircuit(1)
qc.z(0)
single-qubitPauliCliffordHermitian