diff --git a/requirements-dev.txt b/requirements-dev.txt index d85dc5d8365e..5a97cfc37c39 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -18,7 +18,6 @@ seaborn>=0.9.0 reno>=3.4.0 Sphinx>=3.0.0 qiskit-sphinx-theme>=1.6 -qiskit-toqm>=0.1.0;platform_machine != 'aarch64' or platform_system != 'Linux' sphinx-autodoc-typehints~=1.18,!=1.19.3 jupyter-sphinx sphinx-design>=0.2.0 diff --git a/test/python/transpiler/test_preset_passmanagers.py b/test/python/transpiler/test_preset_passmanagers.py index 79b8f27297d7..148488edabf4 100644 --- a/test/python/transpiler/test_preset_passmanagers.py +++ b/test/python/transpiler/test_preset_passmanagers.py @@ -39,15 +39,12 @@ FakeTokyo, FakePoughkeepsie, FakeLagosV2, - FakeLima, - FakeWashington, ) from qiskit.converters import circuit_to_dag from qiskit.circuit.library import GraphState from qiskit.quantum_info import random_unitary from qiskit.transpiler.preset_passmanagers import generate_preset_pass_manager from qiskit.transpiler.preset_passmanagers import level0, level1, level2, level3 -from qiskit.utils.optionals import HAS_TOQM from qiskit.transpiler.passes import Collect2qBlocks, GatesInBasis @@ -267,51 +264,6 @@ def counting_callback_func(pass_, dag, time, property_set, count): self.assertEqual(gates_in_basis_true_count + 1, collect_2q_blocks_count) -@ddt -@unittest.skipUnless(HAS_TOQM, "qiskit-toqm needs to be installed") -class TestToqmIntegration(QiskitTestCase): - """Test transpiler with TOQM-based routing""" - - @combine( - level=[0, 1, 2, 3], - layout_method=[None, "trivial", "dense", "noise_adaptive", "sabre"], - backend_vbits_pair=[(FakeWashington(), 10), (FakeLima(), 5)], - dsc="TOQM-based routing with '{layout_method}' layout" - + "method on '{backend_vbits_pair[0]}' backend at level '{level}'", - name="TOQM_{layout_method}_{backend_vbits_pair[0]}_level{level}", - ) - def test_basic_circuit(self, level, layout_method, backend_vbits_pair): - """ - Basic circuits transpile across all opt levels and layout - methods when using TOQM-based routing. - """ - backend, circuit_size = backend_vbits_pair - qr = QuantumRegister(circuit_size, "q") - qc = QuantumCircuit(qr) - - # Generate a circuit that should need swaps. - for i in range(1, qr.size): - qc.cx(0, i) - - result = transpile( - qc, - layout_method=layout_method, - routing_method="toqm", - backend=backend, - optimization_level=level, - seed_transpiler=4222022, - ) - - self.assertIsInstance(result, QuantumCircuit) - - def test_initial_layout_is_rejected(self): - """Initial layout is rejected when using TOQM-based routing""" - with self.assertRaisesRegex( - TranspilerError, "Initial layouts are not supported with TOQM-based routing." - ): - transpile(QuantumCircuit(2), initial_layout=[1, 0], routing_method="toqm") - - @ddt class TestTranspileLevels(QiskitTestCase): """Test transpiler on fake backend"""