-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 a bug of missing pulse library entry in PulseQobj parsing #11397
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -959,8 +959,12 @@ def _convert_generic( | |
|
||
yield instructions.Play(waveform, channel) | ||
else: | ||
if qubits := getattr(instruction, "qubits", None): | ||
msg = f"qubits {qubits}" | ||
else: | ||
msg = f"channel {instruction.ch}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah both |
||
raise QiskitError( | ||
f"Instruction {instruction.name} on qubit {instruction.qubits} is not found " | ||
f"Instruction {instruction.name} on {msg} is not found " | ||
"in Qiskit namespace. This instruction cannot be deserialized." | ||
) | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
fixes: | ||
- | | ||
Fixed a bug that results in an error when a user tries to load .calibration | ||
data of a gate in :class:`.Target` in a particular situation. | ||
This occurs when the backend reports only partial calibration data, for | ||
example referencing a waveform pulse in a command definition but not | ||
including that waveform pulse in the pulse library. In this situation, the | ||
Qiskit pulse object cannot be built, resulting in a failure to build the pulse | ||
schedule for the calibration. Now when calibration data is incomplete | ||
the :class:`.Target` treats it as equivalent to no calibration being reported | ||
at all and does not raise an exception. |
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.
Could we emit a warning (UserWarning?) here with the message from the
QiskitError
? Here we are treating a calibration loading error as equivalent to no calibration being provided and the user might want to know when there is a loading error.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.
Fair enough. Added an error and test in bf723eb