qiskit-ibm-runtime
qiskit-ibm-runtime copied to clipboard
Unit tests failing against Qiskit main
https://github.com/Qiskit/qiskit-ibm-runtime/actions/runs/8843336261/job/24283426873
Unit tests are failing against the main branch of Qiskit.
======================================================================
ERROR: test_c_if_plugin_conversion_with_transpile (test.unit.transpiler.passes.scheduling.test_scheduler.TestALAPSchedulingAndPaddingPass)
Verify that old format c_if may be converted and scheduled after
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/qiskit/transpiler/passmanager.py", line 420, in wrapper
return meth(*meth_args, **meth_kwargs)
File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/qiskit/transpiler/passmanager.py", line 182, in run
return super().run(
File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/qiskit/passmanager/passmanager.py", line 229, in run
out_program = _run_workflow(
File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/qiskit/passmanager/passmanager.py", line 292, in _run_workflow
passmanager_ir, final_state = flow_controller.execute(
File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/qiskit/passmanager/base_tasks.py", line 218, in execute
passmanager_ir, state = next_task.execute(
File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/qiskit/transpiler/basepasses.py", line 195, in execute
new_dag, state = super().execute(
File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/qiskit/passmanager/base_tasks.py", line 98, in execute
ret = self.run(passmanager_ir)
File "/home/runner/work/qiskit-ibm-runtime/qiskit-ibm-runtime/qiskit_ibm_runtime/transpiler/passes/scheduling/scheduler.py", line 471, in run
self._visit_block(dag, wire_map)
File "/home/runner/work/qiskit-ibm-runtime/qiskit-ibm-runtime/qiskit_ibm_runtime/transpiler/passes/scheduling/scheduler.py", line 114, in _visit_block
self._visit_node(node)
File "/home/runner/work/qiskit-ibm-runtime/qiskit-ibm-runtime/qiskit_ibm_runtime/transpiler/passes/scheduling/scheduler.py", line 127, in _visit_node
raise TranspilerError(
qiskit.transpiler.exceptions.TranspilerError: 'c_if control-flow is not supported by this pass. Please apply "ConvertConditionsToIfOps" to convert these conditional operations to new-style Qiskit control-flow.'
The above exception was the direct cause of the following exception:
@dieris when you get a chance can you take a look
I suspect this has never worked with real backends on this repo, as IBMBackend is missing the translation plugin definition that was added on qiskit-ibm-provider
. I could be wrong, but my guess is that this only just started showing up as an error in this test because the patched FakeBackend
is now converted after https://github.com/Qiskit/qiskit/pull/11996 and thus loses its plugin method. See https://github.com/Qiskit/qiskit-ibm-provider/pull/483
Thank you @dieris, i'll add the translation plugin definition to this repo. @ElePT do you know how the failing unit tests could be refactored?
@kt474 the changes from https://github.com/Qiskit/qiskit/pull/11996 only "wipe out the patch" when the input is a BackendV1
, but if the input were of type BackendV2
there would be no internal conversion and I believe the patch would still work. Would it be possible to migrate the tests to use BackendV2
or is there any reason why the plugins are being tested with V1 backends?
@ElePT Yes we can do that, I'll work on migrating the tests to use BackendV2