SWAP Gates
Get an overview of SWAP gates in quantum computing.
Before moving on to more quantum algorithms, we want to introduce one more two-qubit gate: the gate. As the name implies, the gate interchanges something between two qubits. That something is their quantum states. Although the algorithms we discuss in the remainder of this book do not require gates, they are found in many other quantum algorithms, so we thought you should be introduced to them. They also provide another nice example of using matrices to represent quantum gates.
Since we are dealing with two qubits, the basis states can be taken to be the four-entry column vectors in
Get hands-on with 1400+ tech skills courses.