View source on GitHub |
Object which can be compared for equality mod global phase.
cirq.SupportsEqualUpToGlobalPhase(
*args, **kwargs
)
Methods
_equal_up_to_global_phase_
_equal_up_to_global_phase_(
other: Any, *, atol: Union[int, float]
) -> bool
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. |