Skip to content

Conversation

mtreinish
Copy link
Member

Summary

This commit fixes an issue in the convert_to_target() function where it wasn't looking for control flow instructions in the proper location. Typically the control flow instructions are put in the supported_instructions field of the BackendConfiguration, but the convert_to_target() function was ignoring this field. This commit updates the function to check supported_instructions for the control flow instructions. It doesn't more broadly look at the supported_instructions field, because on other backends this field is used to list the supported pulse instructions which might have name conflicts with other instructions and cause issues building a target.

This is the spiritual backport of #11877, but because the state of the convert_to_target() function on stable/0.46 is very different very little code is carried over from the version on main and stable/1.0, basically only the tests. This is actually closer in implementation to the equivalent PR on qiskit-ibm-runtime: Qiskit/qiskit-ibm-runtime#1443 as the internal conversion function in that repository is very similar to the function on the stable/0.46 branch.

Details and comments

This commit fixes an issue in the convert_to_target() function where it
wasn't looking for control flow instructions in the proper location.
Typically the control flow instructions are put in the
supported_instructions field of the BackendConfiguration, but the
convert_to_target() function was ignoring this field. This commit
updates the function to check supported_instructions for the control
flow instructions. It doesn't more broadly look at the
supported_instructions field, because on other backends this field is
used to list the supported pulse instructions which might have name
conflicts with other instructions and cause issues building a target.

This is the spiritual backport of Qiskit#11877, but because the state of the
convert_to_target() function on stable/0.46 is very different very
little code is carried over from the version on main and stable/1.0,
basically only the tests. This is actually closer in implementation to
the equivalent PR on qiskit-ibm-runtime: Qiskit/qiskit-ibm-runtime#1443
as the internal conversion function in that repository is very similar
to the function on the stable/0.46 branch.
@mtreinish mtreinish added the Changelog: Bugfix Include in the "Fixed" section of the changelog label Feb 29, 2024
@mtreinish mtreinish added this to the 0.46.1 milestone Feb 29, 2024
@mtreinish mtreinish requested review from jyu00 and a team as code owners February 29, 2024 11:57
@qiskit-bot
Copy link
Collaborator

One or more of the the following people are requested to review this:

  • @Qiskit/terra-core

Copy link
Member

@jakelishman jakelishman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks clear and sensible to me. Thanks for making a clean PR for the backport.

@1ucian0
Copy link
Member

1ucian0 commented Feb 29, 2024

spiritual backport of #11877

spiritual

@jakelishman jakelishman added this pull request to the merge queue Feb 29, 2024
Merged via the queue into Qiskit:stable/0.46 with commit f42643f Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: Bugfix Include in the "Fixed" section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants