# RZ¶

Module: pennylane

class RZ(phi, wires)[source]

The single qubit Z rotation

$\begin{split}R_z(\phi) = e^{-i\phi\sigma_z/2} = \begin{bmatrix} e^{-i\phi/2} & 0 \\ 0 & e^{i\phi/2} \end{bmatrix}.\end{split}$

Details:

• Number of wires: 1
• Number of parameters: 1
• Gradient recipe: $$\frac{d}{d\phi}f(R_z(\phi)) = \frac{1}{2}\left[f(R_z(\phi+\pi/2)) - f(R_z(\phi-\pi/2))\right]$$ where $$f$$ is an expectation value depending on $$R_z(\phi)$$.
Parameters: phi (float) – rotation angle $$\phi$$ wires (Sequence[int] or int) – the wire the operation acts on