# Quantum gate fSWAP acting on two-fermion states

When we have identical particles which are fermions, any exchange (swap) among 2 states introduces a minus sign. In the paper https://arxiv.org/abs/1807.07112, the Eq. (7) aims to represent that operation, fSWAP, via the matrix

$$\mathrm{fSWAP}= \begin{pmatrix} 1 & 0 & 0 & 0\\ 0 & 0 & 1 & 0\\ 0 & 1 & 0 & 0\\ 0& 0 & 0& -1 \end{pmatrix}$$

Now, if I have the state $$(a\ b\ c\ d)^T = a|00\rangle + b|01\rangle + c|10\rangle + d|11\rangle$$ representing 2 identical fermions, then a swap among the two of them would produce the state $$(-1)·[a|00\rangle + c|01\rangle + b|10\rangle + d|11\rangle] = -(a\ c\ b\ d)^T$$. Nevertheless, that matrix doesn't give you this but $$(a\ c\ b\ -d)^T$$. So, what am I not getting?

• Fig 7 in the paper is two complicated, it should work with 2 CNOT gates. – Norbert Schuch Mar 16 at 21:02
• @NorbertSchuch Do you mean that instead a SWAP and a controlled-Z I could simply use 2 CNOTs? How? – Vicky Mar 17 at 1:27
• With 2 CNOTs (+single-qubit gates), you can build the iSWAP gate (see e.g. arxiv.org/abs/quant-ph/0209035), and the iSWAP equals the fSWAP up to Z rotations (by $\pi/2$) on both qubits. – Norbert Schuch Mar 17 at 10:30

The notation $$\vert0\rangle$$ and $$\vert1\rangle$$ denotes a mode with zero or one fermions, respectively.
Then, $$\vert ij\rangle$$ denotes two modes, where $$i$$ denotes the number of fermions in the first mode and $$j$$ the number of fermions in the second mode.
So if you apply the fSWAP, what you swap is whatever is in the first and the second mode. But this means you only exchanged two fermions if there are two fermions, i.e., if you were in the state $$\vert11\rangle$$ initially. This is the only case in which you should get a minus sign, and this is what the fSWAP gate does.