-
Notifications
You must be signed in to change notification settings - Fork 126
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
Attach calibrations for gates used in calibration experiments #1160
Merged
wshanks
merged 2 commits into
qiskit-community:main
from
wshanks:cal-attach-calibrations
May 2, 2023
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
releasenotes/notes/attach-other-cals-2f539e7799ceb6c8.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
features: | ||
- | | ||
A new method :meth:`.qiskit_experiments.calibration_management.Calibrations.has_template` | ||
has been added to :class:`.qiskit_experiments.calibration_management.Calibrations` | ||
to check if a template schedule exists for a particular set of qubits. | ||
fixes: | ||
- | | ||
:class:`.qiskit_experiments.library.FineXDragCal` and | ||
:class:`.qiskit_experiments.library.EFRoughXSXAmplitudeCal` were updated to | ||
attach `"sx"` and `"x"` calibrations to their circuits, respectively. | ||
Previously, they only attached the `"x"` and `"x12"` calibrations that they | ||
were calibrating. See issue `#1158 <https://github.com/Qiskit/qiskit-experiments/issues/1158>`_. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
why not use
has_template
here as below?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.
Hmm, the purpose of this conditional is to avoid getting and attaching
sx
twice when running the sx cal (since then theself._sched_name
call ofadd_calibration
just above would do it). I was thinking that otherwise you would always wantsx
attached. We could make it provisional though but it would beand not just
What do you think?
This kind of nuance was what was making me think that maybe we should try to use
transpile()
withrouting="none"
andtranslation="none"
rather than a custom pass manager and attaching the calibrations directly because then we could defer to the pulse gate pass whether or not to attach calibrations for other gates in the circuit besides the one being tested.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 makes sense to me. We are essentially requiring that
self._cals
contains thesx
gate. I think this is an okay assumption in a calibration context. My question would have perhaps been better placed on the rough_amplitude_cal.py file below. I can rephrase and ask: "Why usehas_template
at all"? The code in rough_amplitude_cal.py seems more permissive by allowing thatself._cals
to not contain anX
gate. Do we need thehas_template
check?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.
It's not a workflow we make easy, so maybe we should not make an allowance for it here, but I have heard from other users who are interested in working with qutrits and my thought was that users might want to calibrate sx12 and x12 but still just rely on the defaults for sx and x. What do you think?
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.
That makes perfect sense. Is that worth a comment in the code?