@githg22_gitlab: Taking a hint from the problem statement itself, I'd suggest that the last sentence is especially relevant here.
"This operation can be implemented using just the X gate and its controlled variants."
usingblock. As you note, you can't use measurement to do that in an adjointable operation; given that resetting is a special case of measurement, the
Resetoperation will also fail to preserve adjointability. The trick is that you need to coherently reset the qubit to |0⟩ without measurement. You can do that because you know exactly what state it's in at the end of the
using, and can unprepare it using only unitary operations. The
applyfeature of Q# or the
ApplyWithCAoperation will be very handy here.