The setting
In quantum circuits on a multi-qubit register, routing qubits by layers of nearest-neighbor gates implements permutations of the physical qubit sites. Analyzing how a localized single-qubit operation transforms under such a permutation reduces the effect of routing to relabeling the target site by the inverse permutation. Identifying the permutation operator of a transposition with the embedded two-qubit gate links abstract site permutations to two-qubit circuit gates.
Operators on a qubit register
Let be a finite set of qubit sites. The computational basis configurations of the register are the bitstrings , spanning the register Hilbert space with basis . A register operator on is a complex matrix indexed by computational basis configurations, and denotes its conjugate transpose.✦
For a site and a complex matrix , splitting each configuration into its bit at site and its restriction to the remaining sites identifies the register with . The embedded single-qubit gate is the register operator acting as on site and as the identity on , with entries given for by (1)✦ where is the Kronecker delta.
For two distinct sites , the pair-splitting bijection maps each configuration to , with inverse assigning the chosen pair of bits to sites and and retaining the remaining bits. Ordering the two-qubit computational basis as so that each pair corresponds to index , the embedded two-qubit gate associated to a complex matrix acts as on the ordered pair and as the identity on : (2)✦ In the same two-qubit basis , the gate is the complex matrix (3)✦ which exchanges the two qubits.
Given a permutation , the permutation operator is the register operator defined for by (4)✦ On computational basis states, maps to , moving the qubit at each site to site .
The claim
Theorem. Let be a finite set of qubit sites. For every permutation of , every site , and every complex matrix , (5)✦ Moreover, for any two distinct sites , let be the transposition on that exchanges and and fixes every other site; then (6)✦
What is checked
In the Lean library, (5) and (6) are stated over register operators on an arbitrary finite set of qubit sites, built from the single-qubit gate embedding (1), the two-qubit gate embedding (2) defined via the pair-splitting bijection, the gate (3), and the permutation operator (4). The conjugation identity (5) is stated for an arbitrary permutation of , site , and complex matrix , and the transposition identity (6) is stated for any pair of distinct sites .