Fermionic SWAP
An exchange of fermionic modes that includes the minus sign associated with exchanging two occupied modes.
Also called fSWAP
On this page
Definition and significance
A fermionic SWAP exchanges mode occupations while respecting fermionic antisymmetry. Its computational-basis action agrees with ordinary SWAP except on |11>, which gains a minus sign. That phase matters in coherent superpositions and cannot generally be dropped.
Mechanism and mathematical treatment
In occupation order |00>,|01>,|10>,|11>, fSWAP maps these states to |00>,|10>,|01>,-|11>. It can be represented as SWAP followed by CZ, since the two operations commute on this basis.
Fully worked reference example
On (|00>+|11>)/sqrt(2), ordinary SWAP leaves the state unchanged, whereas fSWAP produces (|00>-|11>)/sqrt(2). The XX expectation changes from +1 to -1, proving that the additional sign is physically meaningful rather than a global phase.
Limitations and common misconceptions
Do not substitute an ordinary qubit SWAP in a fermionic mode-reordering derivation without accounting for the sign. Physical exchange of particles, relabeling modes and a compiled qubit gate are different descriptions that need a consistent mapping.
Scientific relationships
Fermionic exchange includes a sign on the doubly occupied basis state.
Tracking signs through a three-mode reversal
Reverse three ordered modes using adjacent exchanges in the sequence fSWAP01, fSWAP12, fSWAP01. On |110>, the first exchange encounters two occupied modes and contributes a minus sign, leaving -|110>. The second exchange moves the second occupation to mode two, giving -|101>. The final exchange gives -|011>. A sequence of ordinary qubit SWAPs would give +|011> instead.
For |100>, the same sequence gives |001> with positive sign because no exchange swaps two occupied modes. For |111>, all three exchanges contribute a minus sign and the final state is -|111>. More generally, a complete reversal changes the order of every pair of occupied modes. On a basis state with k occupied modes, its sign is (-1) raised to k(k-1)/2, in addition to the reversed occupation label.
For this complete reversal restricted to a fixed particle number, that sign is common to every basis state in the sector. It may consequently be an unobservable global phase for an uncontrolled sector-restricted use. This special cancellation does not mean that each intermediate fermionic exchange can be replaced freely by an ordinary SWAP. Partial permutations generally attach signs that depend on the specific occupation pattern even at fixed total number.
A fixed-particle-number counterexample
Take the two-particle state (|110>+|101>)/sqrt(2). A fermionic exchange of modes zero and one gives (-|110>+|011>)/sqrt(2). An ordinary qubit exchange gives (|110>+|011>)/sqrt(2). The two resulting states are orthogonal, despite each containing exactly two particles and having identical computational-basis probabilities.
The qubit observable X0X2 distinguishes them: its expectation is -1 for the fermionic result and +1 for the ordinary result, since it exchanges the two populated basis labels while leaving their common middle occupation unchanged. A physical observable expressed in fermionic operators must also be mapped consistently; the direct qubit calculation here is a transparent certificate that the encoded states differ.
The extra sign is therefore a relative phase within a valid fixed-number sector, not merely a phase between different particle-number sectors. This avoids relying on any assumption about whether a particular physical setting permits coherent superpositions of different total particle numbers. The issue already appears in a two-particle Hilbert space.
Decompositions with explicit conventions
The occupation-basis matrix of fSWAP is diagonal on |00> and |11>, with entries +1 and -1, and exchanges |01> and |10> with positive amplitude. It equals SWAP times CZ. Since those two matrices commute, either order gives the same gate. A direct decomposition using three CNOTs for SWAP and one controlled-Z gives four two-qubit gates before optimization, plus any basis changes imposed by the native library.
There is another useful identity under a stated iSWAP convention. Define iSWAP to exchange |01> and |10> with amplitude +i and to leave |00> and |11> unchanged. Then fSWAP=(S dagger tensor S dagger)iSWAP. The local phase gates multiply single-excitation outputs by -i, canceling the exchange amplitude i, and multiply |11> by -1. A convention using -i for the exchange amplitude instead requires the opposite local phase corrections.
This identity can reduce a decomposition when the corresponding exchange operation is available, but it does not establish a universal hardware cost. Pulse realization, duration, error, and connectivity are additional facts. Reporting the full matrix identity makes the scientific claim independent of whether a software library names one sign convention or the other as its default iSWAP.
Mode relabeling and observables
A coherent mode permutation changes the ordered creation-operator basis. Fermionic exchange gates ensure that the induced occupation-state signs agree with that change. If a compilation process routes modes through adjacent locations, the Hamiltonian and later observable labels must track the logical mode positions. An occupation measurement can be relabeled classically, while a coherent hopping operator also depends on the parity structure in the chosen ordering.
A purely classical relabeling of a known matrix is different: it can transform the matrix and basis bookkeeping without executing any physical exchange. Confusing that operation with a gate on a live encoded state is a common source of omitted signs. Likewise, a phase that is global on a fixed sector becomes relative if the entire permutation is applied only in one coherent control branch.
The three-step reversal acts differently on the zero-, one-, two-, and three-particle sectors. In the fixed-two-particle counterexample, the two procedures give opposite X0X2 expectations. The SWAP-CZ identity and phase-corrected iSWAP identity use the stated matrix conventions. These are symbolic constructions.
Sources
Verification scope
Recorded source check ·
Official tutorial retrieved, 442 lines; fermionic occupation convention, parity action, and canonical anticommutation equations inspected. No notebook or SDK was executed.
Formal scientific or official reference-semantics anchor. No SDK execution, hardware run, universal performance claim, or independent external peer review asserted. Original finite examples and definitions are independent explanations.
Verification scope
Recorded source check ·
Noninteracting fermionic representation and stated simulation restrictions inspected.
Formal scientific or official reference-semantics anchor. No SDK execution, hardware run, universal performance claim, or independent external peer review asserted. Original finite examples and definitions are independent explanations.