# How to detect and correct swap errors in a quantum circuit?

Let's assume that I have a density matrix $$\rho$$ that consists of $$N$$ qubits.

If this density matrix undergoes an error-channel that swaps any two qubits with an equal probability, i.e.

$$\mathcal{E}(\rho)=(1-p)\rho + \frac{2p}{N(N-1)}\sum_{i=1}^{N-1}\sum_{j>i}^N \mathrm{SWAP}_{ij}\rho \mathrm{SWAP}_{ij}$$ where $$p$$ is the probability of an error.

Does there exist a quantum circuit/protocol that can detect and correct if a swap error has occurred?

• Could you not just use a distance 5 error correcting code, since this can correct for any error on 2 or fewer sites? That presumably includes your swap case. Or are you hoping for something more specialised? Oct 20 at 13:13
• Alternatively, perhaps you could encode in the fully symmetric subspace. That's a decoherence-free subspace for that noise, so you don't even have to apply any error correction. Oct 20 at 13:14