The setting
In quantum circuits and gate synthesis, two unitary operators that differ only by an overall unit-modulus complex factor produce the same physical evolution and measurement statistics. Identifying matrices that differ by such a global phase factor allows gate identities and circuit decompositions to be chained across consecutive steps.
For arbitrary index sets and , let denote the set of complex matrices with rows indexed by and columns indexed by . Two matrices are equal up to global phase, written , if there exists a complex scalar with satisfying (1): (1)✦
The claim
Lemma. For any index sets and , equality up to global phase is an equivalence relation on : for all , (2)✦
What is checked
The Lean library states the equivalence relation (2) for equality up to global phase (1) on complex matrices over arbitrary index sets and .