cirq.all_near_zero_mod

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

Checks if the tensor’s elements are all near multiples of the period.

Parameters
  • a – Tensor of elements that could all be near multiples of the period.

  • period – The period, e.g. 2 pi when working in radians.

  • atol – Absolute tolerance.