Consider the following quantum circuit

You want to take a single sample from both qubits, in the computational basis. You will need to create an instance of a device, and add a measurement to the circuit function that represents this quantum circuit. Note that you should only use a single measurement for both qubits (as opposed to one measurement per qubit).

or to submit your code

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

Learning Objectives:

  • Learn how to use different measurements in PennyLane.
  • Understand the role of observables in measurements.