Swap

Contents

Swap#

class discopy.quantum.circuit.Swap(dom=None, perm=None)[source]#

Bases: Permutation, discopy.tensor.Swap, Box

The logical swap of two circuit wires, i.e. plumbing.

This is the symmetry of the category, not the physical SWAP gate: a compiler is free to implement it by relabelling qubits rather than by applying a two-qubit unitary.