= SWAP gate
{c}
The <SWAP gate> exchanges the states of two <qubits>, including any correlations they have with other systems. Its action on the <computational basis> fixes the operation on every <quantum superposition> by <linearity>.
The <SWAP gate> maps $|x\rangle|y\rangle$ to $|y\rangle|x\rangle$.
In particular, $\operatorname{SWAP}(|\psi\rangle\otimes|\phi\rangle)=|\phi\rangle\otimes|\psi\rangle$. This transfers rather than copies the two inputs, so it does not violate the <no-cloning theorem>. The <Three-CNOT decomposition of the SWAP gate> implements the same operation using alternating control directions. <Qiskit quantum gate documentation by IBM>[IBM Quantum, SwapGate: state exchange and matrix representation]{ref}
Back to article page