The setting
In a multi-qubit register, routing circuits rearrange qubit states across physical sites using permutations, and parallel layers apply two-qubit gates simultaneously to non-overlapping pairs of qubits. Two algebraic identities govern how these operations compose: conjugating a two-qubit gate by a qubit permutation moves the gate’s target sites along the permutation, and two-qubit gates supported on disjoint pairs of qubits commute.
Register operators
Let be a finite set of qubit sites. A computational basis configuration of the register is a bitstring assigning a bit to each site . A register operator on is a complex matrix indexed by , representing a linear operator on the register Hilbert space in the computational basis.✦
For distinct sites , the splitting bijection (1)✦ sends each bitstring to , where is the restriction of to the remaining sites . Its inverse reconstructs a bitstring from a pair and a configuration by setting , , and for all .
Order the two-qubit computational basis as , so that corresponds to the index . For distinct sites and a complex matrix , the two-qubit gate is the register operator obtained by reindexing via the splitting bijection (1), where is the identity matrix on .✦ For , its matrix entries are given by (2): (2)
For a permutation of , the permutation operator is the register operator whose matrix entries for are given by (3): (3)✦ Its conjugate transpose is denoted by .
The claim
Theorem. Let be a finite set of qubit sites. For every permutation of , every pair of distinct sites , and every complex matrix , the conjugation identity (4) holds: (4)✦ For all pairwise distinct sites and all complex matrices and , the two-qubit gates and commute as in (5): (5)✦
What is checked
In the Lean library, the theorem is stated for register operators on any finite set of qubit sites, with two-qubit gates and defined via the splitting bijection (1) for arbitrary complex matrices and on distinct sites, and permutation operators defined by (3) for arbitrary permutations of .