-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fix handling of control flow instructions in convert_to_target() #11877
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
Fix handling of control flow instructions in convert_to_target() #11877
Conversation
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. Fixes Qiskit#11872
One or more of the the following people are requested to review this:
|
@Mergifyio backport stable/0.46 |
✅ Backports have been created
|
Pull Request Test Coverage Report for Build 8025271898Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Matthew for the quick fix. This looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick fix!
) 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. Fixes #11872 (cherry picked from commit 65ab965) # Conflicts: # qiskit/providers/backend_compat.py
) 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. Fixes #11872 (cherry picked from commit 65ab965)
) (#11884) 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. Fixes #11872 (cherry picked from commit 65ab965) Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
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.
) * Fix handling of control flow instructions in convert_to_target() 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. * Add release note * Fix tests * Fix import cycle
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.
Details and comments
Fixes #11872