Skip to content

Commit

Permalink
Added isometry tests to TestCase
Browse files Browse the repository at this point in the history
  • Loading branch information
juanjosegarciaripoll committed Mar 24, 2024
1 parent 29d85ee commit 401cb8a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 401cb8a

Please sign in to comment.