Skip to content

Commit

Permalink
Correcting documentation of Drag/LiftedDrag (#7659) (#7856)
Browse files Browse the repository at this point in the history
* 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 <nkanazawa1989@gmail.com>

* Removal of trailing whitespace in line 357

Moved link to Gaussian via :class: from line 358 to 357.

Co-authored-by: Naoki Kanazawa <nkanazawa1989@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit c90c176)
  • Loading branch information
tobias-kehrer authored and mergify-bot committed Apr 12, 2022
1 parent 1228956 commit 82fef4c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions qiskit/pulse/library/parametric_pulses.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,23 +341,23 @@ class Drag(ParametricPulse):
"""The Derivative Removal by Adiabatic Gate (DRAG) pulse is a standard Gaussian pulse
with an additional Gaussian derivative component and lifting applied.
It is designed to reduce the frequency spectrum of a normal gaussian pulse near
It is designed to reduce the frequency spectrum of a standard Gaussian pulse near
the :math:`|1\\rangle\\leftrightarrow|2\\rangle` transition,
reducing the chance of leakage to the :math:`|2\\rangle` state.
.. math::
g(x) &= \\exp\\Bigl(-\\frac12 \\frac{(x - \\text{duration}/2)^2}{\\text{sigma}^2}\\Bigr)\\\\
f'(x) &= g(x) + 1j \\times \\text{beta} \\times \\frac{\\mathrm d}{\\mathrm{d}x} g(x)\\\\
&= g(x) + 1j \\times \\text{beta} \\times\
\\Bigl(-\\frac{x - \\text{duration}/2}{\\text{sigma}^2}\\Bigr)g(x)\\\\
f(x) &= \\text{amp}\\times\\frac{f'(x)-f'(-1)}{1-f'(-1)}, \\quad 0 \\le x < \\text{duration}
g'(x) &= \\text{amp}\\times\\frac{g(x)-g(-1)}{1-g(-1)}\\\\
f(x) &= g'(x) \\times \\Bigl(1 + 1j \\times \\text{beta} \\times\
\\Bigl(-\\frac{x - \\text{duration}/2}{\\text{sigma}^2}\\Bigr) \\Bigr),
\\quad 0 \\le x < \\text{duration}
where :math:`g(x)` is a standard unlifted gaussian waveform and
:math:`f'(x)` is the DRAG waveform without lifting or amplitude scaling.
where :math:`g(x)` is a standard unlifted Gaussian waveform and
:math:`g'(x)` is the lifted :class:`~qiskit.pulse.library.Gaussian` waveform.
This pulse would be more accurately named as ``LiftedDrag``, however, for historical
and practical DSP reasons it has the name ``Drag``.
This pulse, defined by :math:`f(x)`, would be more accurately named as ``LiftedDrag``, however,
for historical and practical DSP reasons it has the name ``Drag``.
References:
1. |citation1|_
Expand Down

0 comments on commit 82fef4c

Please sign in to comment.