The setting
In quantum architectures whose native entangling operation is the gate, standard two-qubit operations such as and are compiled from sequences of and single-qubit gates. Because an overall unit-modulus complex factor does not change the physical action of a unitary operator, two circuits realize the same operation whenever their matrices agree up to global phase. In Quantum error correction with global control, is compiled from three gates interleaved with gates, and is compiled by combining that sequence with phase gates and an inverse gate.
Gates and global phase
We order the two-qubit computational basis as , indexing pairs by the bijection . The Kronecker product of two complex matrices and is the complex matrix whose entry is for all .✦ We write for the identity matrix, for the imaginary unit, and for the conjugate transpose of a complex matrix .
The phase gate and the gate are the complex matrices defined in (1): (1)
In the two-qubit computational basis, the , , and gates are the complex matrices defined in (2): (2)
Two complex matrices and indexed by sets and are equal up to global phase if there exists a complex scalar with such that .✦
The claim
Theorem. There exist complex scalars and with such that (3)✦ and (4)✦
What is checked
In the Lean library, the theorem is stated over the complex matrices , , and , the complex matrices and , the two-qubit Kronecker product , and the relation of equality up to global phase, asserting the two circuit identities (3) and (4).