-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Correcting documentation of Drag/LiftedDrag (Qiskit#7659) #7856
Conversation
As discussed in qiskit-terra issue Qiskit#7659, the definition of the LiftedDrag pulse was not consistent with its implementation in qiskit.pulse.library.continuous.py. One error is fixed by this PR. A remaining problem is the explicit definition of the sampler strategy. This should be fixed after/with the update of parametric pulses, qiskit-terra issue Qiskit#7821.
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.
Seems like this is correct description of the function. However, since f'(x) is no longer used, we can remove another lines as well or introduce something like g'(x) to get more compact expression?
- Removal of f'(x) - Added definition of g'(x) - Typos corrected 'gaussian' -> 'Gaussian' - Link to `qiskit.pulse.library.Gaussian` added
I implemented the following changes:
|
Hi @tobias-kehrer thanks for your work! Looks like you just have some minor linting errors to fix up in the following files:
|
Fixed the linting errors (line too long) in lines 353, 356, and 358 of qiskit/pulse/library/parametric_pulses.py.
Thank you @javabster for pointing out these errors!
probably due to the 'long' link in line 358. But this link should not be split in half, right? |
1 similar comment
Thank you @javabster for pointing out these errors!
probably due to the 'long' link in line 358. But this link should not be split in half, right? |
Co-authored-by: Naoki Kanazawa <[email protected]>
Moved link to Gaussian via :class: from line 358 to 357.
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.
Thanks. This looks good to me.
Pull Request Test Coverage Report for Build 2152553017
💛 - Coveralls |
* Correct documentation of Drag/LiftedDrag As discussed in qiskit-terra issue #7659, the definition of the LiftedDrag pulse was not consistent with its implementation in qiskit.pulse.library.continuous.py. One error is fixed by this PR. A remaining problem is the explicit definition of the sampler strategy. This should be fixed after/with the update of parametric pulses, qiskit-terra issue #7821. * Implement review update of #7856 - Removal of f'(x) - Added definition of g'(x) - Typos corrected 'gaussian' -> 'Gaussian' - Link to `qiskit.pulse.library.Gaussian` added * Fixing linting errors #7856 Fixed the linting errors (line too long) in lines 353, 356, and 358 of qiskit/pulse/library/parametric_pulses.py. * Replace URL link to Gaussian Co-authored-by: Naoki Kanazawa <[email protected]> * Removal of trailing whitespace in line 357 Moved link to Gaussian via :class: from line 358 to 357. Co-authored-by: Naoki Kanazawa <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit c90c176)
* Correct documentation of Drag/LiftedDrag As discussed in qiskit-terra issue #7659, the definition of the LiftedDrag pulse was not consistent with its implementation in qiskit.pulse.library.continuous.py. One error is fixed by this PR. A remaining problem is the explicit definition of the sampler strategy. This should be fixed after/with the update of parametric pulses, qiskit-terra issue #7821. * Implement review update of #7856 - Removal of f'(x) - Added definition of g'(x) - Typos corrected 'gaussian' -> 'Gaussian' - Link to `qiskit.pulse.library.Gaussian` added * Fixing linting errors #7856 Fixed the linting errors (line too long) in lines 353, 356, and 358 of qiskit/pulse/library/parametric_pulses.py. * Replace URL link to Gaussian Co-authored-by: Naoki Kanazawa <[email protected]> * Removal of trailing whitespace in line 357 Moved link to Gaussian via :class: from line 358 to 357. Co-authored-by: Naoki Kanazawa <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit c90c176) Co-authored-by: Tobias Kehrer <[email protected]>
Summary
This PR partially fixes #7659.
As discussed in #7659, the documentation of the Drag/LiftedDrag pulse was not consistent with its implementation in
qiskit.pulse.library.continuous.py
.A remaining problem is the explicit definition of the sampler strategy. This should be fixed after/with the update of parametric pulses (#7821).
Details and comments
This PR corrects the definition of
f(x)
(called Drag/LiftedDrag, https://qiskit.org/documentation/stubs/qiskit.pulse.library.Drag.html) up to explicitly defining the chosen sampler strategy.Before the PR, the function
f(x)
was wrongly depending on(f'(x) - f'(-1))/(1 - f'(-1))
. This dependency is corrected to(g(x) - g(-1))/(1 - g(-1))
. Furthermore, the imaginary part of thef(x)
is now correctly defined to be proportional to(g(x) - g(-1))/(1 - g(-1))
.The documentation of the Drag/LiftedDrag pulse now follows its implementation in
qiskit.pulse.library.continuous.py
.As @nkanazawa1989 pointed out in #7659, an update of parametric pulses (#7821) will unify the sampler strategies on backend and frontend. After or with this update, the documentation can be adjusted (if needed) stating explicitly which sampler strategy is or can be used.