Skip to content

fixed issue 6544 by propagating limit_amplitude to ParametricPulse classes#6618

Merged
mergify[bot] merged 4 commits intoQiskit:mainfrom
dhruvbhq:fixissue6544branch2
Sep 1, 2021
Merged

fixed issue 6544 by propagating limit_amplitude to ParametricPulse classes#6618
mergify[bot] merged 4 commits intoQiskit:mainfrom
dhruvbhq:fixissue6544branch2

Conversation

@dhruvbhq
Copy link
Copy Markdown
Contributor

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.

…tor of Pulse base class to ParametricPulse classes
Copy link
Copy Markdown
Contributor

@javabster javabster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @javabster! I've made the change.

@javabster javabster added the Changelog: Added Add an "Added" entry in the GitHub Release changelog. label Jul 27, 2021
Copy link
Copy Markdown
Contributor

@taalexander taalexander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for this contribution. Several minor documentation changes are requested, but otherwise, this looks great.

Comment thread qiskit/pulse/library/parametric_pulses.py Outdated
@dhruvbhq dhruvbhq requested a review from taalexander July 28, 2021 06:48
@mergify mergify Bot merged commit 4fcd9a0 into Qiskit:main Sep 1, 2021
@kdk kdk added this to the 0.19 milestone Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changelog: Added Add an "Added" entry in the GitHub Release changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Propagate limit_amplitude keyword argument to parametric pulses

4 participants