Skip to content
Current section
The Quantum Computing Enthusiast’s Hub
Saved
All sections

All sections

Saved
Skip Learn navigation
Encyclopedia
Topic

SWAP operator

The SWAP operator exchanges two equal-dimensional tensor factors and is both unitary and Hermitian.

Edition released Coverage: Overview · Technical · Research
On this page

Definition and distinction

For equal-dimensional systems, S|a>|b>=|b>|a>. It satisfies S^2=I and S-dagger=S. Swapping quantum systems physically is different from relabeling coordinates in a written expression. The same array permutation can represent either operation depending on whether the physical subsystem labels are held fixed.

Fully solved two-qubit example

In basis |00>,|01>,|10>,|11>, S=[[1,0,0,0],[0,0,1,0],[0,1,0,0],[0,0,0,1]]. It leaves |00> and |11> unchanged and exchanges |01> with |10>. On the Bell states, Phi+, Phi- and Psi+ have eigenvalue +1, while Psi- has eigenvalue -1.

For product density operators rho and sigma, Tr[S(rho tensor sigma)]=Tr(rho sigma). Take rho=|0><0| and sigma=I/2; the expectation is one half. If both are |0><0|, it is one. This identity connects exchange symmetry to overlap estimation, though implementing a measurement of S is a separate circuit task.

Mathematical relationships

For qubits, S=(I tensor I+X tensor X+Y tensor Y+Z tensor Z)/2. Applying this to the singlet gives (1-1-1-1)/2=-1, checking the sign. The unnormalized Choi operator of transposition is also S, which has a negative eigenvalue and therefore exposes the map's failure of complete positivity.

Limits

For unequal subsystem dimensions, an exchange maps between differently ordered tensor-product spaces rather than acting as a square operator on one fixed labeled product space without identification. Fermionic physical exchange introduces additional particle-statistics issues beyond an abstract qubit SWAP.

Partial exchange and coherent commutator terms

Because F²=I, the exponential U_theta=exp(−i theta F) is cos(theta)I−i sin(theta)F. This unitary interpolates between identity and SWAP up to a global phase. It is a coherent partial exchange, not a classical choice to swap with some probability. The difference appears when the two input states do not commute.

For a product input rho tensor sigma, trace out the second factor after applying U_theta. The identities Tr2[F(rho tensor sigma)]=sigma rho and Tr2[(rho tensor sigma)F]=rho sigma yield rho'=cos²(theta)rho+sin²(theta)sigma+i sin(theta)cos(theta)[rho,sigma]. The commutator term is Hermitian because the commutator of Hermitian operators is anti-Hermitian. Its trace vanishes, so normalization is preserved.

Take rho=|0><0|, sigma=|+><+|, and theta=pi/4. The first marginal becomes [[3/4,(1+i)/4],[(1−i)/4,1/4]]. Its determinant is 1/16 and its purity is 7/8. A classical half-and-half swap would instead give [[3/4,1/4],[1/4,1/4]], with purity 3/4. Both have the same populations, but their Y expectations differ. The coherent joint evolution has generated correlations that cannot be reproduced by keeping only a random swap flag and forgetting it.

Measuring exchange symmetry versus estimating overlap

The two-outcome projective measurement of F has effects (I+F)/2 and (I−F)/2. For an independent product input, the probabilities are p_plus=[1+Tr(rho sigma)]/2 and p_minus=[1−Tr(rho sigma)]/2. This uses the joint product assumption. If the input is an arbitrary correlated state tau_AB, the same measurement instead returns [1±Tr(F tau_AB)]/2, and no general replacement by Tr(tau_A tau_B) is valid.

For the singlet, both marginals are I/2, so their overlap is 1/2, but Tr(F tau_AB)=−1. The antisymmetric outcome is certain. This is a complete counterexample to inferring a pair's SWAP expectation from its marginals alone. For two identical but independently prepared states, Tr(F rho tensor rho)=Tr(rho²); independence is part of the purity-estimation statement.

When the input states are pure, an antisymmetric outcome certifies that they were not identical rays. A symmetric outcome does not certify equality: different states also have a nonzero symmetric component. For |0> and |+>, the overlap is 1/2 and the symmetric probability is 3/4. No contradiction with state-discrimination limits arises, because the conclusive difference outcome has only probability 1/4 for this pair.

Exchange as an entanglement witness

Every normalized product vector has nonnegative exchange expectation, |<a|b>|². By linearity, every separable state has Tr(F rho_sep)≥0. Therefore a negative expectation certifies entanglement between the specified equal-dimensional factors. This witness is not complete: many entangled states have nonnegative exchange expectation and are not detected by it.

For rho_p=p|Psi−><Psi−|+(1−p)I4/4, the expectation is −p+(1−p)/2=(1−3p)/2. It is negative for p>1/3. The calculation uses Tr F=2 for two qubits. A change of local basis applied to only one factor changes the witness relative to the state, while the statement about separability remains valid for the correspondingly transformed witness. No basis-independent claim about every entangled state follows from this single observable.

Label changes and subsystem bookkeeping

For a bipartite observable A tensor B, F(A tensor B)F=B tensor A. This expresses a physical state exchange when the laboratory subsystem labels remain fixed. If one instead renames the two coordinate factors in every state and observable simultaneously, all predictions remain unchanged without any operation having occurred. A displayed permutation matrix must be interpreted with that distinction in mind.

For three copies, permutation operators can access higher spectral moments: the trace of a suitably oriented cyclic permutation against rho tensor rho tensor rho is Tr(rho³). A three-cycle is unitary but not Hermitian, unlike a transposition. Its real and imaginary Hermitian parts correspond to distinct observables for more general unequal operators. Thus the simple two-outcome ±1 measurement belongs specifically to SWAP and should not be assigned to every permutation.

Sources

  • John Watrous · · Textbook material · cs.uwaterloo.ca
    Verification scope

    The Theory of Quantum Information, Chapter 1: Mathematical preliminaries
    John Watrous · · Textbook material · cs.uwaterloo.ca

    Citation identity checked ·

    Background reference; this record does not claim a full independent peer review of the encyclopedia. Original exposition and newly constructed calculations are not copied from the source.

    The Theory of Quantum Information: Chapter 1, Mathematical preliminaries
    John Watrous · · Manuscript · Author manuscript · cs.uwaterloo.ca

    Selected text checked ·

    Chapter introduction, finite-dimensional linear-algebra definitions and Caratheodory theorem were inspected. The author explicitly describes the chapter as review material, not a primary source for all mathematical results.

    Selected passages and metadata were checked; this does not certify every sentence in the encyclopedia, constitute comprehensive literature review, or establish external peer review. Original worked examples are separately recomputed.

  • John Watrous · · Textbook material · cs.uwaterloo.ca
    Verification scope

    The Theory of Quantum Information: Chapter 2, Basic notions of quantum information
    John Watrous · · Manuscript · Author manuscript · cs.uwaterloo.ca

    Selected text checked ·

    Full-text PDF available; selected state, measurement, channel and dilation definitions used as formalism background. Individual elementary extensions and numerical examples were constructed independently.

    Selected passages and metadata were checked; this does not certify every sentence in the encyclopedia, constitute comprehensive literature review, or establish external peer review. Original worked examples are separately recomputed.

  • John Watrous · · Manuscript · Author manuscript · cs.uwaterloo.ca
    Verification scope

    Selected text checked ·

    Full-text separable-state definitions, convexity, partial-transpose necessary condition, and equivalence of entanglement-breaking, separable Choi, and measure-prepare descriptions inspected. Last equivalence appears as a mathematical exercise statement; encyclopedia gives its own explanation, not an exercise.

    Metadata and specified passages verified; not an exhaustive proof review or external scientific approval. Original derivations and examples are independently authored.