# CRX¶

Module: pennylane

class CRX(phi, wires)[source]

The controlled-RX operator

$\begin{split}CR_x(\phi) = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0\\ 0 & 0 & \cos(\phi/2) & -i\sin(\phi/2)\\ 0 & 0 & -i\sin(\phi/2) & \cos(\phi/2) \end{bmatrix}.\end{split}$

Note

The first wire provided corresponds to the control qubit.

Details:

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