# Question on output of SWAP test

Let's say I have two arbitrary quantum states $$|\psi\rangle$$ and $$|\phi\rangle$$. I apply the SWAP test circuit (something like what is given here), and measure the first qubit to get either $$0$$ or $$1$$. Is there any way to get back the states $$|\psi\rangle$$ and $$|\phi\rangle$$, in an unentangled form, after this measurement? From what I understand, measuring the output entangles the two states.

• It's not so much the measurement of the control bit that entangles $\vert \psi\rangle$ and $\vert\phi\rangle$; merely performing the CSWAP operation entangles them. Sep 13, 2020 at 15:29
• Is there a way to get back the unentangled form? Sep 13, 2020 at 15:35

The output of the qubits is either $$(I\pm\text{SWAP})|\phi\rangle|\psi\rangle$$ (up to normalisation). As a general rule, information is lost from this compared to $$|\phi\rangle|\psi\rangle$$ so you cannot reuse the states (unless the states happened to be eigenstates of SWAP, but if you know that, you wouldn't have bothered doing the SWAP test).
To demonstrate this, imagine that $$|\phi\rangle|\psi\rangle$$ is either $$|01\rangle$$ or $$|10\rangle$$. If you get the $$I+\text{SWAP}$$ answer, the output state is the same for both, $$|01\rangle+|10\rangle$$. You cannot tell which of the two inputs it was, so you've lost information.