-
Notifications
You must be signed in to change notification settings - Fork 16
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 drag pulse helper method #835
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #835 +/- ##
==========================================
+ Coverage 66.35% 66.51% +0.16%
==========================================
Files 50 50
Lines 6063 6063
==========================================
+ Hits 4023 4033 +10
+ Misses 2040 2030 -10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
The create methods won't survive forever. So, as a temporary patch, it is definitely more than fine.
However, the complications here partially arise from the support to beta=None
, which falls back on a non-drag pulse (despite the name of the method).
src/qibolab/platform.py
Outdated
qubit = self.get_qubit(qubit) | ||
pulse = self.qubits[qubit].native_gates.RX90.pulse(start, relative_phase) | ||
if beta is not None: | ||
pulse.shape = "Drag(5," + str(beta) + ")" | ||
pulse.shape = Drag(rel_sigma=pulse.shape.rel_sigma, beta=beta) | ||
return pulse | ||
|
||
def create_RX_drag_pulse(self, qubit, start, relative_phase=0, beta=None): |
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.
Is this method truly useful with beta=None
?
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.
We can drop the default and make beta
a required argument, which should make sense given that if the user asks for a drag pulse should provide also beta
.
While testing qiboteam/qibocal#689 I noticed that the platform's helper methods for creating drag pulses were broken (I was the one who implemented them...). This PR fixes the issue.
Checklist: