CRY

Module: pennylane

class CRY(phi, wires)[source]

The controlled-RY operator

\[\begin{split}CR_y(\phi) = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0\\ 0 & 0 & \cos(\phi/2) & -\sin(\phi/2)\\ 0 & 0 & \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_y(\phi)) = \frac{1}{2}\left[f(CR_y(\phi+\pi/2)) - f(CR_y(\phi-\pi/2))\right]\) where \(f\) is an expectation value depending on \(CR_y(\phi)\).
Parameters:
  • phi (float) – rotation angle \(\phi\)
  • wires (Sequence[int] or int) – the wire the operation acts on