fixed issue 6544 by propagating limit_amplitude to ParametricPulse classes#6618
Merged
mergify[bot] merged 4 commits intoQiskit:mainfrom Sep 1, 2021
Merged
fixed issue 6544 by propagating limit_amplitude to ParametricPulse classes#6618mergify[bot] merged 4 commits intoQiskit:mainfrom
mergify[bot] merged 4 commits intoQiskit:mainfrom
Conversation
…tor of Pulse base class to ParametricPulse classes
javabster
reviewed
Jul 14, 2021
Contributor
javabster
left a comment
There was a problem hiding this comment.
This is looking good, thanks @dhruvbhq! @taalexander do you have any thoughts?
| sigma: A measure of how wide or narrow the Gaussian peak is; described mathematically | ||
| in the class docstring. | ||
| name: Display name for this pulse envelope. | ||
| limit_amplitude: Passed to parent ParametricPulse |
Contributor
There was a problem hiding this comment.
Perhaps a bit more detail could be given about what the arg actually is, instead of just stating that it gets passed to the parent?
Contributor
Author
There was a problem hiding this comment.
Thanks @javabster! I've made the change.
taalexander
suggested changes
Jul 27, 2021
Contributor
taalexander
left a comment
There was a problem hiding this comment.
Thank you very much for this contribution. Several minor documentation changes are requested, but otherwise, this looks great.
taalexander
approved these changes
Sep 1, 2021
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes #6544 . Propagates the option to disable amplitude limit check in Pulse base class to constructors of ParametricPulse and its derived classes.
Details and comments
This PR enhances the ParametricPulse class and its subclasses so that the user is able to disable the check which limits pulse amplitudes to 1. In #6345, the argument 'limit_amplitude' was added in Pulse base class to disable this check. This PR propagates this argument to the ParametricPulse class (derived from Pulse) and its derived classes Gaussian, GaussianSquare, Drag and Constant. When limit_amplitude is passed as false, the pulse amplitude is no longer constrained to be less than 1. By default, its value is true.
In addition, in the method validate_parameters of class Drag, the assertion/check "Beta is too large: pulse amplitude norm exceeds 1" has been bypassed, in case limit_amplitude is false.
Tests have been added.