-
Notifications
You must be signed in to change notification settings - Fork 120
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
feat: support erf_square and swap_phases #1019
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1019 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 135 135
Lines 8950 9004 +54
Branches 2014 2019 +5
=========================================
+ Hits 8950 9004 +54 ☔ View full report in Codecov by Sentry. |
f"ErfSquareWaveform('id': {self.id}, 'length': {self.length}, " | ||
f"'width': {self.width}, 'sigma': {self.sigma}, 'amplitude': {self.amplitude}, " | ||
f"'zero_at_edges': {self.zero_at_edges})" |
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.
__repr__()
is supposed to return a valid Python string which can be used to construct the object:
f"ErfSquareWaveform('id': {self.id}, 'length': {self.length}, " | |
f"'width': {self.width}, 'sigma': {self.sigma}, 'amplitude': {self.amplitude}, " | |
f"'zero_at_edges': {self.zero_at_edges})" | |
f"ErfSquareWaveform(id='{self.id}', length={self.length}, " | |
f"width={self.width}, sigma={self.sigma}, amplitude={self.amplitude}, " | |
f"zero_at_edges={self.zero_at_edges})" |
but I see that existing classes in this file also have this problem. Are there unit tests that validate the output of these __repr__
functions?
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 repr of all existing waveforms all use the the same convention. I will keep erf square the same for now.
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.
Couple of minor comments - feel free to defer them to a later PR if you'd like.
Co-authored-by: Ryan Shaffer <[email protected]>
Issue #, if available:
closes #1018
Description of changes:
Add support to two pulse instructions:
Note: The code was reviewed in internal PR346
Testing done:
unit tests
Merge Checklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.General
Tests
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.