The setting
In a globally controlled quantum register, routing qubits around an even ring of sites relies on alternating nearest-neighbor SWAP layers and across the even and odd bonds. When the native two-qubit interaction is the gate, each swap layer is compiled by interleaving global layers on all bonds of a fixed parity with single-qubit layers acting on the two endpoints of each bond. On a ring embedded in a finite qubit register, a six-layer pulse sequence of this form realizes the corresponding qubit permutation operator up to a global phase.
Two-qubit gates on a register
Order the two-qubit computational basis as , and let denote the imaginary unit. The gate is the complex matrix (1)✦ The gate is the complex matrix (2)✦ For two complex matrices and , the two-qubit Kronecker product is the complex matrix obtained by taking their Kronecker product and indexing rows and columns through the bijection on .✦ Writing for the identity matrix, the matrices and act with on the second and first qubits of a pair, respectively.
Let be a finite qubit index set. The register operators on are the complex matrices indexed by computational basis bitstrings .✦ For two distinct sites , splitting off sites and is the bijection sending each bitstring on to the pair consisting of and the restriction of to .✦ For any complex matrix , the two-qubit gate is the register operator obtained by acting with on the pair in the two-qubit computational basis tensored with the identity on , transferred to bitstrings on by splitting off sites and .✦
For a permutation of , the permutation operator is the register operator sending each computational basis state to , moving the state at site to site .✦
Global layers on an embedded ring
Let be a positive even integer and consider the ring . Because is even, every site satisfies ✦, and reduction modulo is a well-defined map . For a parity , the parity- bond set is defined by (3) where each indexes the nearest-neighbor bond of parity .
Let be an injective map into a finite qubit index set . Since and is injective, for every , so for any complex matrix the two-qubit gate is well-defined. For distinct , the bond gates and commute✦, so the global layer operator on is well-defined independently of factor order by (4)✦ Likewise, the transpositions on for distinct commute pairwise, defining the embedded swap layer on by (5)✦ When and is the identity map , the ring swap layer is .✦ On , the even swap layer is the involution exchanging and for every ✦, and the odd swap layer is the involution exchanging and for every .✦
The claim
Theorem. Let be a positive even integer, let be a finite qubit index set, let be an injective map, and let . Then the six-layer global pulse sequence on the parity- bonds satisfies (6)✦ On the ring itself, the parity- and parity- ring swap layers satisfy (7)✦ and (8)✦
What is checked
In the Lean library, the theorem is stated over the gate, the gate, the two-qubit Kronecker product, register operators, two-qubit gates defined by splitting off distinct sites, permutation operators, parity- bond sets, global layer operators, embedded and ring swap layers, and the alternating swap layers and for an even ring embedded injectively into a finite qubit index set . For these constructions, the Lean library proves that for every site when is even✦, and that two-qubit gates placed on distinct bonds of the same parity commute pairwise.✦