# CRot¶

Module: pennylane

class CRot(phi, theta, omega, wires)[source]

The controlled-Rot operator

$\begin{split}CR(\phi, \theta, \omega) = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0\\ 0 & 0 & e^{-i(\phi+\omega)/2}\cos(\theta/2) & -e^{i(\phi-\omega)/2}\sin(\theta/2)\\ 0 & 0 & e^{-i(\phi-\omega)/2}\sin(\theta/2) & e^{i(\phi+\omega)/2}\cos(\theta/2) \end{bmatrix}.\end{split}$

Note

The first wire provided corresponds to the control qubit.

Details:

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