cirq.all_near_zero

cirq.all_near_zero(a: Union[float, complex, Iterable[float], numpy.ndarray], *, atol: float = 1e-08) → bool[source]

Checks if the tensor’s elements are all near zero.

Parameters
  • a – Tensor of elements that could all be near zero.

  • atol – Absolute tolerance.