Skip to content

Commit 45c5b6e

Browse files
committed
fix: fix failed test
1 parent 1b297d5 commit 45c5b6e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tests/test_templates.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# pylint: disable=invalid-name
22

3-
import sys
43
import os
4+
import sys
5+
56
import numpy as np
67
import pytest
78
from pytest_lazyfixture import lazy_fixture as lf
@@ -160,10 +161,6 @@ def test_operator_measurement(backend):
160161
)
161162
dense = tc.array_to_tensor(np.kron(tc.gates._x_matrix, np.eye(2)))
162163
sparse = tc.quantum.PauliString2COO([1, 0])
163-
if tc.backend.name == "jax":
164-
sparse = tc.backend.coo_sparse_matrix(
165-
sparse.indices, sparse.values, sparse.shape
166-
)
167164

168165
for h in [dense, sparse, mpo]:
169166

0 commit comments

Comments
 (0)