match_global_phase(a: numpy.ndarray, b: numpy.ndarray) → Tuple[numpy.ndarray, numpy.ndarray]¶
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 thematrices is used when attempting to compute the phase difference betweenthe 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.