From 93eb8004f292add52d04111968d8e36ae852450f Mon Sep 17 00:00:00 2001 From: Max Rossmannek Date: Fri, 15 Nov 2024 04:34:42 +0100 Subject: [PATCH] test: stabilize dynamic MPF test assertions --- test/backends/quimb_circuit/test_e2e.py | 2 +- test/backends/quimb_layers/test_e2e.py | 2 +- test/backends/quimb_tebd/test_e2e.py | 2 +- test/backends/tenpy_layers/test_e2e.py | 2 +- test/backends/tenpy_tebd/test_e2e.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/backends/quimb_circuit/test_e2e.py b/test/backends/quimb_circuit/test_e2e.py index 7500eff..4aded39 100644 --- a/test/backends/quimb_circuit/test_e2e.py +++ b/test/backends/quimb_circuit/test_e2e.py @@ -83,4 +83,4 @@ def test_end_to_end(self, time, expected_A, expected_b, expected_coeffs): prob, coeffs = setup_frobenius_problem(model) prob.solve() - np.testing.assert_allclose(coeffs.value, expected_coeffs) + np.testing.assert_allclose(coeffs.value, expected_coeffs, rtol=1e-6) diff --git a/test/backends/quimb_layers/test_e2e.py b/test/backends/quimb_layers/test_e2e.py index 464c782..dbc1966 100644 --- a/test/backends/quimb_layers/test_e2e.py +++ b/test/backends/quimb_layers/test_e2e.py @@ -180,4 +180,4 @@ def test_end_to_end_custom_suzuki(self, time, expected_A, expected_b, expected_c prob, coeffs = setup_frobenius_problem(model) prob.solve() - np.testing.assert_allclose(coeffs.value, expected_coeffs) + np.testing.assert_allclose(coeffs.value, expected_coeffs, rtol=1e-6) diff --git a/test/backends/quimb_tebd/test_e2e.py b/test/backends/quimb_tebd/test_e2e.py index d9a9f46..819a0c3 100644 --- a/test/backends/quimb_tebd/test_e2e.py +++ b/test/backends/quimb_tebd/test_e2e.py @@ -119,4 +119,4 @@ def test_end_to_end_builtin_suzuki(self, time, expected_A, expected_b, expected_ prob, coeffs = setup_frobenius_problem(model) prob.solve() - np.testing.assert_allclose(coeffs.value, expected_coeffs) + np.testing.assert_allclose(coeffs.value, expected_coeffs, rtol=1e-6) diff --git a/test/backends/tenpy_layers/test_e2e.py b/test/backends/tenpy_layers/test_e2e.py index 89d8a27..e48a1d7 100644 --- a/test/backends/tenpy_layers/test_e2e.py +++ b/test/backends/tenpy_layers/test_e2e.py @@ -178,4 +178,4 @@ def test_end_to_end(self, time, expected_A, expected_b, expected_coeffs): prob, coeffs = setup_frobenius_problem(model) prob.solve() - np.testing.assert_allclose(coeffs.value, expected_coeffs) + np.testing.assert_allclose(coeffs.value, expected_coeffs, rtol=1e-6) diff --git a/test/backends/tenpy_tebd/test_e2e.py b/test/backends/tenpy_tebd/test_e2e.py index 64de0dc..a655aff 100644 --- a/test/backends/tenpy_tebd/test_e2e.py +++ b/test/backends/tenpy_tebd/test_e2e.py @@ -117,4 +117,4 @@ def test_end_to_end(self, time, expected_A, expected_b, expected_coeffs): prob, coeffs = setup_frobenius_problem(model) prob.solve() - np.testing.assert_allclose(coeffs.value, expected_coeffs) + np.testing.assert_allclose(coeffs.value, expected_coeffs, rtol=1e-6)