I am in a study group learning about quantum computing using O'Reilly - Programming Quantum Computing. I'm a developer, not a physicist. :) I feel like my question is rudimentary but I can't seem to find an answer here or anywhere else.
I'm confused on the Swap test; why it works and why doesn't it affect the qubits being swapped. Not the physics behind why the measurements diverge or approach |1>, but rather why the condition qubit of the cswap operation is altered at all.
I understand the cswap operation swaps two qubits based on a condition qubit. You might say the condition qubit has an influence on the swapped qubits.
However, a Swap Test shows that the condition qubit itself will be changed based on how closely the target qubits are equal. How do the swapped qubits have any influence back on the condition qubit? And furthermore, during the swap test aren't we potentially swapping the qubits? Should we be swapping them back so that our test doesn't actually change the state of the target qubits?