qiskit-documentation/docs/api/qiskit/1.2/qiskit.pulse.library.Gaussi...

89 lines
5.5 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: GaussianSquareDrag (v1.2)
description: API reference for qiskit.pulse.library.GaussianSquareDrag in qiskit v1.2
in_page_toc_min_heading_level: 1
python_api_type: function
python_api_name: qiskit.pulse.library.GaussianSquareDrag
---
<span id="qiskit-pulse-library-gaussiansquaredrag" />
# qiskit.pulse.library.GaussianSquareDrag
<Function id="qiskit.pulse.library.GaussianSquareDrag" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit/tree/stable/1.2/qiskit/pulse/library/symbolic_pulses.py#L912-L1061" signature="qiskit.pulse.library.GaussianSquareDrag(duration, amp, sigma, beta, width=None, angle=0.0, risefall_sigma_ratio=None, name=None, limit_amplitude=None)">
A square pulse with a Drag shaped rise and fall
This pulse shape is similar to [`GaussianSquare`](qiskit.pulse.library.GaussianSquare "qiskit.pulse.library.GaussianSquare") but uses [`Drag`](qiskit.pulse.library.Drag "qiskit.pulse.library.Drag") for its rise and fall instead of [`Gaussian`](qiskit.pulse.library.Gaussian "qiskit.pulse.library.Gaussian"). The addition of the DRAG component of the rise and fall is sometimes helpful in suppressing the spectral content of the pulse at frequencies near to, but slightly offset from, the fundamental frequency of the drive. When there is a spectator qubit close in frequency to the fundamental frequency, suppressing the drive at the spectators frequency can help avoid unwanted excitation of the spectator.
Exactly one of the `risefall_sigma_ratio` and `width` parameters has to be specified.
If `risefall_sigma_ratio` is not `None` and `width` is `None`:
$$
\begin{aligned}
\text{risefall} &= \text{risefall\_sigma\_ratio} \times \text{sigma}\\
\text{width} &= \text{duration} - 2 \times \text{risefall}
\end{aligned}
$$
If `width` is not None and `risefall_sigma_ratio` is None:
$$
\text{risefall} = \frac{\text{duration} - \text{width}}{2}
$$
Gaussian $g(x, c, σ)$ and lifted gaussian $g'(x, c, σ)$ curves can be written as:
$$
\begin{aligned}
g(x, c, σ) &= \exp\Bigl(-\frac12 \frac{(x - c)^2}{σ^2}\Bigr)\\
g'(x, c, σ) &= \frac{g(x, c, σ)-g(-1, c, σ)}{1-g(-1, c, σ)}
\end{aligned}
$$
From these, the lifted DRAG curve $d'(x, c, σ, β)$ can be written as
$$
d'(x, c, σ, β) = g'(x, c, σ) \times \Bigl(1 + 1j \times β \times \Bigl(-\frac{x - c}{σ^2}\Bigr)\Bigr)
$$
The lifted gaussian square drag pulse $f'(x)$ is defined as:
$$
\begin{aligned}
f'(x) &= \begin{cases} \text{A} \times d'(x, \text{risefall}, \text{sigma}, \text{beta}) & x < \text{risefall}\\
\text{A} & \text{risefall} \le x < \text{risefall} + \text{width}\\
\text{A} \times \times d'( x - (\text{risefall} + \text{width}), \text{risefall}, \text{sigma}, \text{beta} ) & \text{risefall} + \text{width} \le x \end{cases}\\
\end{aligned}
$$
where $\text{A} = \text{amp} \times \exp\left(i\times\text{angle}\right)$.
**Parameters**
* **duration** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *|*[*ParameterExpression*](qiskit.circuit.ParameterExpression "qiskit.circuit.ParameterExpression")) Pulse length in terms of the sampling period dt.
* **amp** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)") *|*[*ParameterExpression*](qiskit.circuit.ParameterExpression "qiskit.circuit.ParameterExpression")) The amplitude of the DRAG rise and fall and of the square pulse.
* **sigma** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)") *|*[*ParameterExpression*](qiskit.circuit.ParameterExpression "qiskit.circuit.ParameterExpression")) A measure of how wide or narrow the DRAG risefall is; see the class docstring for more details.
* **beta** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)") *|*[*ParameterExpression*](qiskit.circuit.ParameterExpression "qiskit.circuit.ParameterExpression")) The DRAG correction amplitude.
* **width** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)") *|*[*ParameterExpression*](qiskit.circuit.ParameterExpression "qiskit.circuit.ParameterExpression") *| None*) The duration of the embedded square pulse.
* **angle** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)") *|*[*ParameterExpression*](qiskit.circuit.ParameterExpression "qiskit.circuit.ParameterExpression") *| None*) The angle in radians of the complex phase factor uniformly scaling the pulse. Default value 0.
* **risefall\_sigma\_ratio** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)") *|*[*ParameterExpression*](qiskit.circuit.ParameterExpression "qiskit.circuit.ParameterExpression") *| None*) The ratio of each risefall duration to sigma.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) Display name for this pulse envelope.
* **limit\_amplitude** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)") *| None*) If `True`, then limit the amplitude of the waveform to 1. The default is `True` and the amplitude is constrained to 1.
**Returns**
ScalableSymbolicPulse instance.
**Raises**
[**PulseError**](pulse#qiskit.pulse.PulseError "qiskit.pulse.PulseError") When width and risefall\_sigma\_ratio are both empty or both non-empty.
**Return type**
ScalableSymbolicPulse
</Function>