Pauli-Z Gate
The Pauli-Z gate flips the phase of |1> without changing measurement probabilities, a 180-degree Z-axis rotation
Source: mortalapps.com- The Pauli-Z gate is a fundamental single-qubit gate that performs a phase-flip.
- Its matrix representation is [[1, 0], [0, -1]].
- It leaves |0⟩ unchanged and maps |1⟩ to -|1⟩.
- Geometrically, it is a 180-degree rotation around the Z-axis of the Bloch sphere.
- The eigenstates of the Z gate are |0⟩ and |1⟩.
- It is often implemented virtually in hardware, costing zero time and introducing zero error.
Why This Matters
The Pauli-Z Gate, or Z gate, is the final member of the Pauli trio and is often called the phase-flip gate. Unlike the X and Y gates, the Z gate does not change the probability of measuring a qubit in the $|0\rangle$ or $|1\rangle$ states. Instead, it leaves the $|0\rangle$ state completely untouched while flipping the sign of the $|1\rangle$ state. This operation alters the relative phase of a superposition, which is the key to quantum interference and many of the most powerful quantum algorithms.
Core Intuition
Imagine a wave traveling through water. A wave has crests (high points) and troughs (low points). If you flip the wave upside down, the crests become troughs and the troughs become crests; this is a phase flip. The Z gate does exactly this to the $|1\rangle$ component of a qubit state. If the qubit is in a superposition of $|0\rangle$ and $|1\rangle$, the Z gate flips the sign of the $|1\rangle$ component, changing constructive interference into destructive interference. It is like a mirror that only reflects the phase of one specific state.
Visualization
Technical Explanation
The Pauli-Z Gate is represented by the unitary matrix: $Z = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}$. When applied to the basis states, we see its phase-flip action: $Z|0\rangle = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix} \begin{pmatrix} 1 \\ 0 \end{pmatrix} = \begin{pmatrix} 1 \\ 0 \end{pmatrix} = |0\rangle$, and $Z|1\rangle = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix} \begin{pmatrix} 0 \\ 1 \end{pmatrix} = \begin{pmatrix} 0 \\ -1 \end{pmatrix} = -|1\rangle$. For an arbitrary state $|\psi\rangle = \alpha|0\rangle + \beta|1\rangle$, the Z gate yields: $Z|\psi\rangle = \alpha|0\rangle - \beta|1\rangle$. Geometrically, the Z gate corresponds to a rotation of $\pi$ radians (180 degrees) around the Z-axis of the Bloch sphere. Its eigenvalues are $\lambda = \pm 1$, with corresponding eigenstates $|0\rangle$ (eigenvalue +1) and $|1\rangle$ (eigenvalue -1). Because $|0\rangle$ and $|1\rangle$ lie directly on the Z-axis (the North and South poles), rotating them around the Z-axis leaves their positions unchanged, making them the natural eigenstates of the Z operator.