From b77922784673e0cb6a5f65a827a8569f75f8e054 Mon Sep 17 00:00:00 2001 From: Vinitha Balachandran Date: Wed, 13 Dec 2023 16:16:22 +0800 Subject: [PATCH] Fixed result state mismatch for quimb --- tests/test_qasm_quimb_backend.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/test_qasm_quimb_backend.py b/tests/test_qasm_quimb_backend.py index f48d48a..4eb62ba 100644 --- a/tests/test_qasm_quimb_backend.py +++ b/tests/test_qasm_quimb_backend.py @@ -18,7 +18,7 @@ def create_init_state(nqubits): def qibo_qft(nqubits, init_state, swaps): circ_qibo = QFT(nqubits, swaps) - state_vec = np.array(circ_qibo(init_state)) + state_vec = (circ_qibo(init_state)).state(numpy=True) return circ_qibo, state_vec @@ -59,6 +59,5 @@ def test_eval(nqubits: int, tolerance: float, is_mps: bool): ) ) - assert 1e-2 * qibo_time < quimb_time < 1e2 * qibo_time assert np.allclose(result_sv, result_tn, atol=tolerance), "Resulting dense vectors do not match"