Skip to main content
1 of 2
Mariia Mykhailova
  • 9.2k
  • 1
  • 13
  • 40

This is definitely doable, but the tasks seem quite simple and they only introduce single-qubit measurement and X gate, while quantum state preparation usually involves some superposition and entanglement generation. One can get rid of the input superposition by measuring each qubit and then use a bunch of X gates to set each qubit to the right state, you don't even need the scratch qubit for two-qubit gates.

I am biased in my recommendation, but I would suggest taking a look at the Quantum Katas project. I created it to help people learn quantum computing; it has some nice tasks of varying complexity and (most importantly) test harnesses that verify that the task solutions are correct. The Superposition kata in particular introduces state preparation. We had a lot of success using the katas to teach people unfamiliar with quantum computing.

Mariia Mykhailova
  • 9.2k
  • 1
  • 13
  • 40