cirq.SupportsApproximateEquality

Object which can be compared approximately.

Methods

_approx_eq_

View source

Approximate comparator.

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

Args
other Target object for approximate comparison.
atol The minimum absolute tolerance. See np.isclose() documentation for details.

Returns
True if objects are approximately equal, False otherwise. Returns NotImplemented when approximate equality is not implemented for given types.