Using qml.StatePrep write the state_preparation QNode that prepares a quantum state proportional to

Note that state_preparation takes the complex numbers (alpha), (beta), and (gamma) as arguments.

Do not assume that this state is normalized. That is, it might be the case that

or to submit your code

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

Learning Objectives:

  • Use single- and multi-qubit gates in PennyLane.
  • Implement inverse operations and custom controlled gates.
  • Construct arbitraty gates from a unitary matrix or extract the matrix of a gate or circuit.