# Unitary Operator impact on both - the Control Qubit and the Target Register in Shor's Algorithm

I read the details of Shor's algorithm implementation at the link https://qiskit.org/textbook/ch-algorithms/shor.html#2.-The-Solution and had a question. As a concept, when Unitary is applied with a Control Qubit, because of Phase kickback, the Phase gets applied to Control Qubit instead of the target register. So, that means there should not be any impact of the Unitary operator on the target register. But in Shor's algorithm application, we see that the impact is seen in both the Control bit and the target register. If we measure the target Qubit, we see the superposition of 1, 2, 4 and 8 (for the example taken as Qiskit implementation) along with impact Phase rotations in Control register too.

Is my understanding correct? Have tried a lot to search and get information on this but could not find. So, can someone please help me understand this?

The key idea in understanding phase kickback is that phase factors do not belong to one register or the other, but instead belong to terms in superposition and are shared by the registers.

For example, consider the phase kickback due to CNOT applied to $$|{+-}\rangle$$

$$CNOT |+\rangle|-\rangle = \frac{1}{\sqrt{2}}\left(CNOT|0\rangle|-\rangle + CNOT |1\rangle|-\rangle\right) = \frac{1}{\sqrt{2}}\left(|0\rangle|-\rangle - |1\rangle|-\rangle\right)$$

where the minus sign between the two terms comes from the fact that $$|-\rangle$$ is the eigenvector of the quantum NOT gate associated with eigenvalue $$-1$$. It is not correct to say that the sign belongs to the target register or to the control register. Instead, it belongs to the ket $$|1\rangle|-\rangle$$ which spans both registers. This is consistent with your observation that we see its effect on both registers.

Mathematically, this is a manifestation of one of the defining properties of the tensor product

$$(c|x\rangle) \otimes |y\rangle = |x\rangle \otimes (c|y\rangle) = c|x\rangle \otimes |y\rangle.$$