-
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
Followup of #11095 #11404
Followup of #11095 #11404
Conversation
One or more of the the following people are requested to review this:
|
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.
Overall this LGTM it's a nice cleanup, just a couple small questions inline
qiskit/providers/backend_compat.py
Outdated
else: | ||
# Create inst properties placeholder | ||
for name in all_instructions: | ||
if name not in prop_name_map: |
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.
Can this ever be True
? all_instructions
is a set so there aren't any duplicates and prop_name_map
on the first iteration is empty.
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.
You're right. Updated initialization of prop_name_map
Pull Request Test Coverage Report for Build 7531813412Warning: This coverage report may be inaccurate.We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
💛 - 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.
This LGTM, my only question before approving is around the release notes from #11095. Did we add the upgrade notes about the api changes, see:
#11095 (comment) and #11095 (comment) (they might have been done in another PR and I just forgot during my winter vacation)
Good catch! Updated the reno in 5f7bc6e (also rephrased a bit). |
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.
Overall this LGTM, just one tiny issue inline in the logic around adding required instructions to the target.
qiskit/providers/backend_compat.py
Outdated
# Map required ops to each operational qubit | ||
if prop_name_map[op] is None: | ||
prop_name_map[op] = { | ||
(q,): None for q in range(configuration.num_qubits) if q not in faulty_qubits |
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.
Shouldn't we only exclude the faulty qubits here if filter_faulty
is True
?
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.
Done in bcb4144 (also added a test).
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 now, thanks for the quick update
* Followup - Add exception handling for the edge case in which a basis gate property is not reported - Cleanup docs - Replace logging with RuntimeWarning - Add more inline comments - Fix wrong typehints - Update handling of faulty qubits with set operation * bugfix + more warning message * Update reno * Add more check for filter option
Summary
This PR is followup of #11095 to address comments from @mtreinish along with a bugfix. The bug is reported in Qiskit Experiments, in which backend version up-conversion fails when the value of gate config is invalid. This is an edge case of the FakeOpenPulse2Q backend, because its gate config doesn't match with the basis gates that it reports. However this must be resolved.
Details and comments
Code cleanup + Bugfix
Several cleanup is done in this PR.