Permutation gate applies a classical permutation to the computational basis states of $n$ qubits. It is a unitary operation that reorders basis states according to a permutation $\pi$: $|j\rangle \to |\pi(j)\rangle$. Permutation gates are reversible, preserve the Hamming weight (number of 1s), and can be efficiently decomposed into two-qubit gates.
For $n$ qubits, a permutation gate corresponding to permutation $\pi: \{0,1,\ldots,2^n-1\} \to \{0,1,\ldots,2^n-1\}$ is:
$$P_\pi |j\rangle = |\pi(j)\rangle$$
The matrix representation is $P_\pi[i][j] = 1$ if $j = \pi^{-1}(i)$ and 0 otherwise (permutation matrix).
Cyclic shift (rotation): $|j\rangle \to |j \oplus 1 \pmod{2^n}\rangle$
Bit-reversal permutation: $|j\rangle \to |\text{reverse}(j)\rangle$
Transposition (single swap): exchange two basis states
SWAP of qubits: reorder qubits, e.g., $|x_1 x_2 x_3\rangle \to |x_3 x_2 x_1\rangle$
Most permutations can be decomposed into SWAP gates and single-qubit gates:
Bit-reversal on n qubits: $\lfloor n/2 \rfloor$ SWAPs
Cyclic shift: use CNOTs to implement rotation logic
Arbitrary permutation: decompose into transpositions, then implement each via SWAPs
Permutation gates can be applied post-measurement to reorder classical bit strings without quantum overhead. However, applying them to superpositions before measurement can alter quantum interference patterns.