Skip to main content
KetQat

Appearance

Proof · intermediate

Proof that swap networks make every pair adjacent once

Each qubit moves ballistically, one site per round, and pauses for one round when it reaches an end of the line; after n rounds this reverses the order, and a counting argument shows that every pair swaps exactly once.

Established resultMachine-checkedUpdated 2026-12-01 · last verified 2026-12-01

AI-assisted text, machine-checked, not yet reviewed by a person. Citations resolve and an automated pass compared the statements with the cited sources. That is not peer review; check the sources for anything you depend on.

Active pairs. In round t+1t+1 the SWAPs act on the pairs {y,y+1}\{y, y+1\} with y≡t(mod2)y \equiv t \pmod 2. Each position xx belongs to at most one active pair: as its left member if x≡tx \equiv t and x≤n−2x \le n-2, as its right member if x≡t+1x \equiv t+1 and x≥1x \ge 1. Position n−1n-1 with n−1≡tn - 1 \equiv t and position 00 with 0≡t+10 \equiv t + 1 are the only positions not in an active pair.

Trajectories. Define the fold map F(u)=uF(u) = u for 0≤u≤n−10 \le u \le n-1, F(u)=2n−1−uF(u) = 2n-1-u for n≤u≤2n−1n \le u \le 2n-1 and F(u)=−1−uF(u) = -1-u for −n≤u≤−1-n \le u \le -1. For the qubit starting at ii put ui(t)=i+tu_i(t) = i + t if ii is even and ui(t)=i−tu_i(t) = i - t if ii is odd; for 0≤t≤n0 \le t \le n these stay in [−n,2n−1][-n, 2n-1]. Call the qubit a right-mover after tt rounds if ui(t)∈[0,n−1]u_i(t) \in [0, n-1] with ii even or ui(t)∈[−n,−1]u_i(t) \in [-n, -1] with ii odd, and a left-mover otherwise. From the formulas, F(ui(t+1))=F(ui(t))+1F(u_i(t+1)) = F(u_i(t)) + 1 for a right-mover not at position n−1n-1, F(ui(t+1))=F(ui(t))−1F(u_i(t+1)) = F(u_i(t)) - 1 for a left-mover not at position 00, and F(ui(t+1))=F(ui(t))F(u_i(t+1)) = F(u_i(t)) for a right-mover at n−1n-1 or a left-mover at 00. A direct parity check gives: a qubit with F(ui(t))=xF(u_i(t)) = x is a right-mover exactly when x≡t(mod2)x \equiv t \pmod 2 (for even ii unreflected x=i+tx = i + t; reflected x=2n−1−i−tx = 2n-1-i-t; for odd ii unreflected x=i−tx = i - t; reflected x=t−1−ix = t - 1 - i).

We show by induction on tt that after tt rounds the qubit starting at ii sits at F(ui(t))F(u_i(t)). This holds for t=0t = 0. Assume it after tt rounds and consider round t+1t+1. A right-mover at x≤n−2x \le n-2 has x≡tx \equiv t, so it is the left member of an active pair and moves to x+1x + 1. A left-mover at x≥1x \ge 1 has x≡t+1x \equiv t + 1, so it is the right member of an active pair and moves to x−1x - 1. A right-mover at n−1n - 1 (then n−1≡tn - 1 \equiv t) and a left-mover at 00 (then 0≡t+10 \equiv t+1) are in no active pair and stay. In every active pair the left member is a right-mover and the right member a left-mover, so these moves are exactly the SWAPs of the round, and each agrees with F(ui(t+1))F(u_i(t+1)) as computed above.

Reversal. The ranges stay within the domain of FF: for even ii, ui(n)=i+n∈[n,2n−1]u_i(n) = i + n \in [n, 2n-1], so xi(n)=2n−1−i−n=n−1−ix_i(n) = 2n - 1 - i - n = n - 1 - i; for odd ii, ui(n)=i−n∈[−n,−1]u_i(n) = i - n \in [-n, -1], so xi(n)=−1−i+n=n−1−ix_i(n) = -1 - i + n = n - 1 - i.

Every pair exactly once. Round t+1t+1 with tt even contains ⌊n/2⌋\lfloor n/2 \rfloor SWAPs and round t+1t+1 with tt odd contains ⌊(n−1)/2⌋\lfloor (n-1)/2 \rfloor. Among t=0,…,n−1t = 0, \dots, n-1 there are ⌈n/2⌉\lceil n/2 \rceil even and ⌊n/2⌋\lfloor n/2 \rfloor odd values, which gives n(n−1)/2n(n-1)/2 SWAPs in total for both parities of nn. A SWAP changes the relative order of only the two qubits it exchanges. Every pair i<ji < j ends in the opposite order, so it was swapped an odd number of times, at least once. With (n2)\binom n2 pairs and (n2)\binom n2 SWAPs, each pair is swapped exactly once, and it is adjacent at that moment.

Open in the knowledge graph

Contributions about this record

Nobody has published a contribution about it yet.

Publish a result, reproduction or commentPropose a correction to this page

References

  1. Ian D. Kivlichan, Jarrod McClean, Nathan Wiebe, … Ryan Babbush (2018). Quantum Simulation of Electronic Structure with Linear Depth and Connectivity. Physical Review Letters 120, 110501. doi:10.1103/PhysRevLett.120.110501arXiv:1711.04789

Contributors

  • KetQat maintainers · @ketqatConceptualization; Supervision (CRediT roles)
  • Claude (AI drafting assistant)Writing, original draft (CRediT roles)

Review history

  1. Automated source check · Pass with notes · 2026-12-01 · Independent automated verification pass (AI, not the drafting session)

    Proof checked by hand (active pairs, fold map F, mover parity, induction, reversal, counting and the odd-number-of-swaps argument) and by exhaustive simulation for n = 1..13 (python): positions after every round equal F(u_i(t)), final position n - 1 - i, n(n-1)/2 SWAPs, every pair swapped exactly once. Application claim compared with the abstract of Kivlichan et al., arXiv 1711.04789 (fermionic swap network, Trotter step in depth N with N^2/2 entangling gates).

    The SWAP count per round was stated with the parities of t interchanged relative to the convention 'round t+1 acts on pairs with y = t mod 2' used earlier in the proof (with that convention, even t gives floor(n/2) SWAPs). Restated the counts in terms of t; the total n(n-1)/2 was already right.

Revision history

  1. 2026-12-01Content release 2.1.0: 35 more topics, an independent source check of every record, intake hardening (#17)80537b7e

Current revision d5c44a5b3faaf61a. Source file knowledge/records/proof/swap-network-adjacency.md in the content repository (readable there once it is public).