-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Expand instruction_supported() to optionally check parameters #7807
Expand instruction_supported() to optionally check parameters #7807
Conversation
This commit expands the recently added instruction_supported() method of the Target class to also enable optionally checking if a parameter on an instruction is supported. This is anticipating future changes around how instruction parameters are represented in terra more generally as part of Qiskit#7624 and specifically in the Target for Qiskit#7797. Before we do any refactoring around this having a standard API for checking if a parameter is supported is useful. This commit expands the interface for the insturction_supported() method to check any combination of operation name, qargs, operation class, or parameters (either operation name or class is required) and the method will return True if that instruction can be run on the Target device.
Pull Request Test Coverage Report for Build 2544541175
💛 - 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.
LGTM - just a few typos
Co-authored-by: Ali Javadi-Abhari <[email protected]>
I need to add a release note now since |
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.
This looks fine to me. You commented before you wanted to add a supplemental feature release note - if you add that, we're good to merge, I think.
Oops my bad I left the comment to remind myself and forgot to circle back and add the release note. I just pushed it up in 2777b1f |
Summary
This commit expands the recently added instruction_supported() method of
the Target class to also enable optionally checking if a parameter on an
instruction is supported. This is anticipating future changes around how
instruction parameters are represented in terra more generally as part
of #7624 and specifically in the Target for #7797. Before we do any
refactoring around this having a standard API for checking if a
parameter is supported is useful. This commit expands the interface for
the insturction_supported() method to check any combination of
operation name, qargs, operation class, or parameters (either operation
name or class is required) and the method will return True if that
instruction can be run on the Target device.
Details and comments