Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit tests failing against Qiskit main #1641

Closed
kt474 opened this issue Apr 26, 2024 · 5 comments · Fixed by #1660
Closed

Unit tests failing against Qiskit main #1641

kt474 opened this issue Apr 26, 2024 · 5 comments · Fixed by #1660
Labels
bug Something isn't working

Comments

@kt474
Copy link
Member

kt474 commented Apr 26, 2024

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:
@kt474 kt474 added the bug Something isn't working label Apr 26, 2024
@kt474
Copy link
Member Author

kt474 commented Apr 26, 2024

@dieris when you get a chance can you take a look

@dieris
Copy link
Contributor

dieris commented Apr 26, 2024

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 Qiskit/qiskit#11996 and thus loses its plugin method. See Qiskit/qiskit-ibm-provider#483

@kt474
Copy link
Member Author

kt474 commented Apr 29, 2024

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?

@ElePT
Copy link
Collaborator

ElePT commented May 27, 2024

@kt474 the changes from Qiskit/qiskit#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?

@kt474
Copy link
Member Author

kt474 commented May 29, 2024

@ElePT Yes we can do that, I'll work on migrating the tests to use BackendV2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants