Skip to content

Commit

Permalink
concise test
Browse files Browse the repository at this point in the history
  • Loading branch information
renatomello committed Feb 5, 2024
1 parent 2bfd6ec commit a72a265
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/test_quantum_info_random.py
Original file line number Diff line number Diff line change
@@ -238,8 +238,7 @@ def test_random_statevector(backend, seed):
# tests if random statevector is a pure state
dims = 4
state = random_statevector(dims, seed=seed, backend=backend)
backend.assert_allclose(purity(state) <= 1.0 + PRECISION_TOL, True)
backend.assert_allclose(purity(state) >= 1.0 - PRECISION_TOL, True)
backend.assert_allclose(abs(purity(state) - 1.0) < PRECISION_TOL, True)


@pytest.mark.parametrize("normalize", [False, True])

0 comments on commit a72a265

Please sign in to comment.