Skip to content

Rz gate

Identifier Operator Example statement
Rz \(R_z(\theta)\) Rz(pi) q[0]

Description

The Rz gate is one of the three standard rotation operators: an anti-clockwise rotation with an angle of \(\theta\) [rad] about the \(\hat{\mathbf{z}}\)-axis.

The Rz gate is given by:

\[ R_z(\theta) = e^{-i\frac{\theta}{2}\sigma_z } = \left(\begin{matrix} \cos\left(\theta / 2\right) - i \sin\left(\theta / 2\right) & 0 \\ 0 & \cos\left(\theta / 2\right) + i \sin\left(\theta / 2\right) \end{matrix}\right) \]

The rotation operators are generated by exponentiation of the Pauli matrices according to

\[e^{-i \frac{\theta}{2} \sigma_j } = \cos\left ( \theta / 2 \right )I-i\sin\left (\theta / 2 \right )\sigma_j \]

where \(\sigma_j\) is one of the three Pauli matrices. The three rotation matrices \(R_x\), \(R_y\) and \(R_z\) are special cases of the canonical \(R_\hat{n}\) operation.

Properties

  • The rotation gates Rx, Ry, and Rz (at rotation angles of \(\pi\)) differ from the respective Pauli gates only by a global phase:
\[R_x\left( \pi \right) = -iX,~~~~ R_y\left( \pi \right) = -iY,~~~~ R_z\left( \pi \right) = -iZ.\]

Representation

Any single-qubit operation in \(U(2)\) (including global phase) can be expressed by 5 parameters in the canonical representation \(R_\hat{\mathbf{n}}\)

\[R_\hat{\mathbf{n}}\left([n_x, n_y, n_z]^T, \theta, \phi\right) = e^{i\phi} \cdot e^{-i\frac{\theta}{2}\left(n_x\cdot\sigma_x + n_y\cdot\sigma_y + n_z\cdot\sigma_z\right)},\]

where \(\hat{\mathbf{n}}=[n_x, n_y, n_z]^T\) denotes the axis of rotation, \(\theta\in(-\pi, \pi]\) the angle of rotation [rad], and \(\phi\in[0,2\pi)\) the global phase angle [rad].

The Rz gate is given by:

\[\begin{align} R_z(\theta) &= R_\hat{\mathbf{n}}\left([0, 0, 1]^T, \theta, 0\right) = e^{-i\frac{\theta}{2}\sigma_z}, \\ \\ R_z(\theta) &= \left(\begin{matrix} \cos\left(\theta / 2\right) - i \sin\left(\theta / 2\right) & 0 \\ 0 & \cos\left(\theta / 2\right) + i \sin\left(\theta / 2\right) \end{matrix}\right). \end{align}\]

In the Hadamard basis \(\{|+\rangle, |-\rangle\}\), the Rz gate \(R_{z,H}\) is given by:

\[R_{z,H}(\theta) = HR_z(\theta) H = \left(\begin{matrix} \cos\left(\theta / 2\right) & - i \sin\left(\theta / 2\right) \\ - i \sin\left(\theta / 2\right) & \cos\left(\theta / 2\right) \end{matrix}\right) = R_x(\theta).\]

Operation examples

Standard basis

\[\begin{align} R_z(\theta)\,|0\rangle &= \left[\cos\left(\theta / 2\right) - i \sin\left(\theta / 2\right)\right]|0\rangle \\ \\ R_z(\theta)\,|1\rangle &= \left[\cos\left(\theta / 2\right) + i \sin\left(\theta / 2\right)\right]|1\rangle \\ \end{align}\]

Hadamard basis

\[\begin{align} R_z(\theta)\,|+\rangle &= \cos\left(\theta / 2\right)|+\rangle - i \sin\left(\theta / 2\right)|-\rangle \\ \\ R_z(\theta)\,|-\rangle &= - i \sin\left(\theta / 2\right)|+\rangle + \cos\left(\theta / 2\right)|-\rangle \\ \end{align}\]