Active pairs. In round t+1 the SWAPs act on the pairs {y,y+1} with y≡t(mod2). Each
position x belongs to at most one active pair: as its left member if x≡t and x≤n−2,
as its right member if x≡t+1 and x≥1. Position n−1 with n−1≡t and position 0
with 0≡t+1 are the only positions not in an active pair.
Trajectories. Define the fold map F(u)=u for 0≤u≤n−1, F(u)=2n−1−u for
n≤u≤2n−1 and F(u)=−1−u for −n≤u≤−1. For the qubit starting at i put
ui(t)=i+t if i is even and ui(t)=i−t if i is odd; for 0≤t≤n these stay in
[−n,2n−1]. Call the qubit a right-mover after t rounds if ui(t)∈[0,n−1] with i even
or ui(t)∈[−n,−1] with i odd, and a left-mover otherwise. From the formulas,
F(ui(t+1))=F(ui(t))+1 for a right-mover not at position n−1,
F(ui(t+1))=F(ui(t))−1 for a left-mover not at position 0, and F(ui(t+1))=F(ui(t)) for a
right-mover at n−1 or a left-mover at 0. A direct parity check gives: a qubit with
F(ui(t))=x is a right-mover exactly when x≡t(mod2) (for even i unreflected
x=i+t; reflected x=2n−1−i−t; for odd i unreflected x=i−t; reflected x=t−1−i).
We show by induction on t that after t rounds the qubit starting at i sits at F(ui(t)). This
holds for t=0. Assume it after t rounds and consider round t+1. A right-mover at x≤n−2
has x≡t, so it is the left member of an active pair and moves to x+1. A left-mover at
x≥1 has x≡t+1, so it is the right member of an active pair and moves to x−1. A
right-mover at n−1 (then n−1≡t) and a left-mover at 0 (then 0≡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)) as computed above.
Reversal. The ranges stay within the domain of F: for even i, ui(n)=i+n∈[n,2n−1], so
xi(n)=2n−1−i−n=n−1−i; for odd i, ui(n)=i−n∈[−n,−1], so
xi(n)=−1−i+n=n−1−i.
Every pair exactly once. Round t+1 with t even contains ⌊n/2⌋ SWAPs and round
t+1 with t odd contains ⌊(n−1)/2⌋. Among t=0,…,n−1 there are
⌈n/2⌉ even and ⌊n/2⌋ odd values, which gives n(n−1)/2 SWAPs in total for both parities of n. A SWAP changes the relative
order of only the two qubits it exchanges. Every pair i<j ends in the opposite order, so it was
swapped an odd number of times, at least once. With (2n) pairs and (2n) SWAPs, each pair is
swapped exactly once, and it is adjacent at that moment.