SWAP

Module: pennylane

class SWAP(wires)[source]

The swap operator

\[\begin{split}SWAP = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0\\ 0 & 1 & 0 & 0\\ 0 & 0 & 0 & 1 \end{bmatrix}.\end{split}\]

Details:

  • Number of wires: 2
  • Number of parameters: 0
Parameters:wires (Sequence[int] or int) – the wires the operation acts on