def _validate_decomposition(decomposition: DensePauliString, U: npt.NDArray, eps: float) -> bool:
    """Returns whether the max absolute value of the elementwise difference is less than eps."""
    got = protocols.unitary(decomposition)
    return np.abs(got - U).max() < eps
Returns whether the max absolute value of the elementwise difference is less than eps.
cirq-core/cirq/transformers/analytical_decompositions/pauli_string_decomposition.py