|
26 | 26 | from qiskit.providers.basic_provider import BasicSimulator
|
27 | 27 | from qiskit.providers.fake_provider import Fake7QPulseV1, GenericBackendV2
|
28 | 28 | from qiskit.transpiler import PassManager
|
29 |
| -from qiskit.utils import optionals |
30 | 29 | from test import QiskitTestCase # pylint: disable=wrong-import-order
|
31 | 30 | from test import combine # pylint: disable=wrong-import-order
|
32 | 31 | from test.python.transpiler._dummy_passes import DummyAP # pylint: disable=wrong-import-order
|
@@ -383,28 +382,6 @@ def test_primitive_job_size_limit_backend_v1(self):
|
383 | 382 | self.assertDictAlmostEqual(result.quasi_dists[0], {0: 1}, 0.1)
|
384 | 383 | self.assertDictAlmostEqual(result.quasi_dists[1], {1: 1}, 0.1)
|
385 | 384 |
|
386 |
| - @unittest.skipUnless(optionals.HAS_AER, "qiskit-aer is required to run this test") |
387 |
| - def test_circuit_with_dynamic_circuit(self): |
388 |
| - """Test BackendSampler with QuantumCircuit with a dynamic circuit""" |
389 |
| - from qiskit_aer import Aer |
390 |
| - |
391 |
| - qc = QuantumCircuit(2, 1) |
392 |
| - |
393 |
| - with qc.for_loop(range(5)): |
394 |
| - qc.h(0) |
395 |
| - qc.cx(0, 1) |
396 |
| - qc.measure(0, 0) |
397 |
| - with qc.if_test((0, True)): |
398 |
| - qc.break_loop() |
399 |
| - |
400 |
| - with self.assertWarns(DeprecationWarning): |
401 |
| - backend = Aer.get_backend("aer_simulator") |
402 |
| - sampler = BackendSampler(backend, skip_transpilation=True) |
403 |
| - sampler.set_options(seed_simulator=15) |
404 |
| - sampler.set_transpile_options(seed_transpiler=15) |
405 |
| - result = sampler.run(qc).result() |
406 |
| - self.assertDictAlmostEqual(result.quasi_dists[0], {0: 0.021484375, 1: 0.978515625}) |
407 |
| - |
408 | 385 | def test_sequential_run(self):
|
409 | 386 | """Test sequential run."""
|
410 | 387 | backend = GenericBackendV2(7, basis_gates=["cx", "u1", "u2", "u3"], seed=42)
|
|
0 commit comments