qiskit-documentation/docs/api/qiskit/qiskit.pulse.library.Sawtoo...

44 lines
3.0 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: Sawtooth (latest version)
description: API reference for qiskit.pulse.library.Sawtooth in the latest version of qiskit
in_page_toc_min_heading_level: 1
python_api_type: function
python_api_name: qiskit.pulse.library.Sawtooth
---
<span id="qiskit-pulse-library-sawtooth" />
# qiskit.pulse.library.Sawtooth
<Function id="qiskit.pulse.library.Sawtooth" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit/tree/stable/1.2/qiskit/pulse/library/symbolic_pulses.py#L1617-L1682" signature="qiskit.pulse.library.Sawtooth(duration, amp, phase, freq=None, angle=0.0, name=None, limit_amplitude=None)">
A sawtooth pulse.
The envelope of the pulse is given by:
$$
f(x) = 2\text{A}\left[g\left(x\right)-
\lfloor g\left(x\right)+\frac{1}{2}\rfloor\right]
$$
where $\text{A} = \text{amp} \times\exp\left(i\times\text{angle}\right)$, $g\left(x\right)=x\times\text{freq}+\frac{\text{phase}}{2\pi}$, and $\lfloor ...\rfloor$ is the floor operation.
**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 magnitude of the amplitude of the sawtooth wave. Wave range is \[-amp,\`amp\`].
* **phase** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)") *|*[*ParameterExpression*](qiskit.circuit.ParameterExpression "qiskit.circuit.ParameterExpression")) The phase of the sawtooth wave (note that this is not equivalent to the angle of the complex amplitude)
* **freq** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)") *|*[*ParameterExpression*](qiskit.circuit.ParameterExpression "qiskit.circuit.ParameterExpression") *| None*) The frequency of the sawtooth wave, in terms of 1 over sampling period. If not provided defaults to a single cycle (i.e :math:frac\{1}\{text\{duration}}). The frequency is limited to the range $\left(0,0.5\right]$ (the Nyquist frequency).
* **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.
* **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.
**Return type**
ScalableSymbolicPulse
</Function>