The code below is a quantum function with all the gates from the circuit shown below. However, the gates are out of order! Re-arrange the lines of the function to match the order of operations in the circuit.

or to submit your code

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

Learning Objectives:

  • Identify the different components of a quantum circuit (qubits, gates, and measurements).
  • Translate between sequences of instructions and a quantum circuit.
  • Define and calculate the depth of a quantum circuit.