From 682ea730efbdac6d2d10c2cf40cba263a7b65c98 Mon Sep 17 00:00:00 2001 From: Andrea Papaluca Date: Wed, 13 Mar 2024 13:47:48 +0400 Subject: [PATCH] test: added matrix transformation in test_GST --- tests/test_tomography_gate_set_tomography.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_tomography_gate_set_tomography.py b/tests/test_tomography_gate_set_tomography.py index 52655de121..11f1e7d91e 100644 --- a/tests/test_tomography_gate_set_tomography.py +++ b/tests/test_tomography_gate_set_tomography.py @@ -286,4 +286,7 @@ def test_GST(backend): gate_set, noise_model=depol, include_empty=True, backend=backend ) for target, estimate in zip(target_matrices, approx_gates): - backend.assert_allclose(target, estimate, atol=1e-6) + transf = empty_1q if estimate.shape[0] == 4 else empty_2q + backend.assert_allclose( + target, transf.conj().T @ (estimate @ transf), atol=1e-6 + )