During my introductory courses in quantum computation, we were taught that the cloning of a state is forbidden by the laws of QM, while in this case the first contol qubit is copied on the third, target, qubit.
I quickly tried to simulate the circuit on Quirk, something like this, that sort of confirms the cloning of the state in output on the first qubit. Measuring the qubit before the Toffoli gate shows that is in fact no real cloning, but instead a change on the first control qubit, and an equal output on the first and third qubit.
By making simple math, it can be shown that the "cloning" happens only if the third qubit is in initial state 0, and that only if on the first qubit is not performed a "spinning operation" (as indicated on Quirk) on Y or X.
I tried writing a program in Q# that only confirmed which is aforesaid.
I struggle in understanding how the first qubit is changed by this operation, and how something similar to a cloning is possible.
Thank you in advance!