RX

Module: pennylane

class RX(phi, wires)[source]

The single qubit X rotation

\[\begin{split}R_x(\phi) = e^{-i\phi\sigma_x/2} = \begin{bmatrix} \cos(\phi/2) & -i\sin(\phi/2) \\ -i\sin(\phi/2) & \cos(\phi/2) \end{bmatrix}.\end{split}\]

Details:

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