User:Jaydavidmartin/Swap gate
Appearance
The SWAP gate is a two-qubit quantum logic gate that swaps the states of two qubits.
Representation
The SWAP gate is represented by the 4x4 unitary matrix:
- .
The quantum circuit symbol for the SWAP gate is:
![]() |
SWAP gate symbol |
Operation
The SWAP gate operates on a quantum register of two qubits. The SWAP gates swaps the states of the two qubits. For example, on the computational basis states , , , and :
- SWAP=
- SWAP=
- SWAP=
- SWAP=