Skip to content

Commit

Permalink
* Update test to account for no more backend V1.
Browse files Browse the repository at this point in the history
  • Loading branch information
eggerdj committed Oct 24, 2024
1 parent ce02264 commit 5d12a7c
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions test/test_qubit_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import os
from unittest import TestCase

from qiskit_ibm_runtime.fake_provider import FakeSherbrooke, FakeHanoi, FakeHanoiV2
from qiskit_ibm_runtime.fake_provider import FakeSherbrooke, FakeHanoiV2
from qiskit.providers.fake_provider import GenericBackendV2


Expand Down Expand Up @@ -52,12 +52,9 @@ def test_qubit_selection(self):
expected_path = [33, 39, 40, 72, 41, 81, 53, 60, 61, 62]
self.assertEqual(set(path), set(expected_path))

def test_qubit_selection_v1_v2(self):
def test_qubit_selection_v2(self):
"""Test backend evaluation for 10 qubit line"""
backends = [FakeHanoi(), FakeHanoiV2()]

for backend in backends:
path_finder = BackendEvaluator(backend)
path, _, _ = path_finder.evaluate(len(self.mapped_graph))
expected_path = [8, 9, 11, 12, 13, 14, 15, 18, 21, 23]
self.assertEqual(set(path), set(expected_path))
path_finder = BackendEvaluator(FakeHanoiV2())
path, _, _ = path_finder.evaluate(len(self.mapped_graph))
expected_path = [8, 9, 11, 12, 13, 14, 15, 18, 21, 23]
self.assertEqual(set(path), set(expected_path))

0 comments on commit 5d12a7c

Please sign in to comment.