Skip to content

Commit e45e2ff

Browse files
authored
Skip StateTomography test until Qiskit Experimrents is ready for 2.0 (#55)
BackendV1 and qiskit.qobj removals in Qiskit/qiskit#13793 cause the test in qiskit_neko/tests/experiments/test_tomography.py to fail. This is part of the tests that are blocking the Qiskit/qiskit#13793 and Qiskit/qiskit#13872 PR in Qiskit from being merged. There is a PR in Qiskit Experiments that address these removals: qiskit-community/qiskit-experiments#1526. Until it is merged, we need to skip this failing test. Tracked in #54
1 parent 3ce7176 commit e45e2ff

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

qiskit_neko/tests/experiments/test_tomography.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,30 @@
1111
# that they have been altered from the originals.
1212

1313
"""Tests for quantum state tomography."""
14+
import unittest
1415

15-
from qiskit_experiments.library import StateTomography
1616
from qiskit import QuantumCircuit
1717
from qiskit.quantum_info import DensityMatrix, state_fidelity
1818

1919
from qiskit_neko import decorators
2020
from qiskit_neko.tests import base
21+
import qiskit
2122

2223

2324
class TestQuantumStateTomography(base.BaseTestCase):
2425
"""Tests adapted from circuit basics tutorial."""
2526

27+
@unittest.skipIf(
28+
tuple(map(int, qiskit.__version__.split(".")[:2])) >= (2, 0),
29+
"Skipping test until Qiskit Experiments is ready for Qiskit 2.0. "
30+
"Tracked in: https://github.com/Qiskit/qiskit-neko/issues/54",
31+
)
2632
@decorators.component_attr("terra", "backend", "experiment")
2733
def test_ghz_circuit_quantum_info(self):
2834
"""Test state tomography of ghz state circuit"""
35+
36+
from qiskit_experiments.library import StateTomography
37+
2938
nq = 3
3039
qc_ghz = QuantumCircuit(nq)
3140
qc_ghz.h(0)

0 commit comments

Comments
 (0)