diff --git a/tests/tools.py b/tests/tools.py index 4ecd526e..31db38fa 100644 --- a/tests/tools.py +++ b/tests/tools.py @@ -69,6 +69,10 @@ def random_uniform_mps( random_uniform_mps(d, size, truncate=truncate, rng=self.rng), **kwdargs ) + def assertApproximateIsometry(self, A, direction, places=7) -> None: + if not approximateIsometry(A, direction, places): + raise self.failureException(f"Tensor is not isometry:\nA={A}") + def similar(A, B, **kwdargs): if sp.issparse(A):