cirq.linalg.match_global_phase

Phases the given matrices so that they agree on the phase of one entry.

To maximize precision, the position with the largest entry from one of the matrices is used when attempting to compute the phase difference between the two matrices.

a A numpy array.
b Another numpy array.

A tuple (a', b') where a' == b' implies a == b*exp(i t) for some t.