In addition to the rotation, we have also and rotations. These parametric gates are available in PennyLane as qml.RX and qml.RY.

Write a QNode that applies qml.RX with an angle of to one of the computational basis states. What operation is this?

or to submit your code

To interact with codercises, please switch to a larger screen size.

Learning Objectives:

  • Describe the action of the RX gate and its matrix representation.
  • Describe the action of the RY gate and its matrix representation.
  • Represent qubit states in 3-dimensional space using the Bloch sphere.