cirq.protocols.SupportsEqualUpToGlobalPhase

Object which can be compared for equality mod global phase.

Methods

_equal_up_to_global_phase_

View source

Approximate comparator.

Types implementing this protocol define their own logic for comparison with other types.

Args
other Target object for comparison of equality up to global phase.
atol The minimum absolute tolerance. See np.isclose() documentation for details.

Returns
True if objects are equal up to a global phase, False otherwise. Returns NotImplemented when checking equality up to a global phase is not implemented for given types.