qiskit-documentation/docs/api/qiskit/qiskit.pulse.library.Sech.mdx

52 lines
3.1 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: Sech (latest version)
description: API reference for qiskit.pulse.library.Sech in the latest version of qiskit
in_page_toc_min_heading_level: 1
python_api_type: function
python_api_name: qiskit.pulse.library.Sech
---
<span id="qiskit-pulse-library-sech" />
# qiskit.pulse.library.Sech
<Function id="qiskit.pulse.library.Sech" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit/tree/stable/1.2/qiskit/pulse/library/symbolic_pulses.py#L1824-L1897" signature="qiskit.pulse.library.Sech(duration, amp, sigma, angle=0.0, name=None, zero_ends=True, limit_amplitude=None)">
An unnormalized sech pulse.
The sech function is centered around the halfway point of the pulse, and the envelope of the pulse is given by:
$$
f(x) = \text{A}\text{sech}\left(
\frac{x-\mu}{\text{sigma}}\right) , 0 <= x < duration
$$
where $\text{A} = \text{amp} \times\exp\left(i\times\text{angle}\right)$, and $\mu=\text{duration}/2$.
If zero\_ends is set to True, the output y is modified: .. math:
```python
y\left(x\right) \mapsto \text{A}\frac{y-y^{*}}{\text{A}-y^{*}},
```
where $y^{*}$ is the value of $y$ at the endpoints (at $x=-1 and :math:`x=\text{duration}+1$). This shifts the endpoints value to zero, while also rescaling to preserve the amplitude at :math:text\{duration}/2\`\`.
**Parameters**
* **duration** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *| ParameterValueType*) 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 pulse (the value at the midpoint duration/2).
* **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 sech peak is in terms of dt; described mathematically in the class docstring.
* **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.
* **zero\_ends** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)") *| None*) If True, zeros the ends at x = -1, x = duration + 1, but rescales to preserve amp. Default value True.
* **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>