-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Bugfix for missing qubit property #11880
Conversation
One or more of the the following people are requested to review this:
|
Pull Request Test Coverage Report for Build 8043950737Details
💛 - 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, thanks for fixing this.
# TODO faulty qubit handling might be needed since | ||
# faulty qubit reporting qubit properties doesn't make sense. |
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.
FWIW, looking at the target code:
qiskit/qiskit/transpiler/target.py
Lines 318 to 326 in 945fe1d
if qubit_properties is not None: | |
if not self.num_qubits: | |
self.num_qubits = len(qubit_properties) | |
else: | |
if self.num_qubits != len(qubit_properties): | |
raise ValueError( | |
"The value of num_qubits specified does not match the " | |
"length of the input qubit_properties list" | |
) |
(cherry picked from commit c566b3f)
Summary
With #11095 handling for the missing qubit property was gone. This PR readds the handling for partly missing qubit property with a unit test.
Details and comments
When some qubit doesn't report qubit properties (i.e. T1, T2, frequency), the
convert_to_target
function crashes during the conversion of BackendV1 into V2 model.