qiskit-documentation/docs/api/qiskit/0.24/qiskit.pulse.Gaussian.mdx

178 lines
7.6 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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: Gaussian
description: API reference for qiskit.pulse.Gaussian
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.pulse.Gaussian
---
<span id="qiskit-pulse-gaussian" />
# qiskit.pulse.Gaussian
<Class id="qiskit.pulse.Gaussian" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.16/qiskit/pulse/library/parametric_pulses.py" signature="Gaussian(duration, amp, sigma, name=None)" modifiers="class">
A truncated pulse envelope shaped according to the Gaussian function whose mean is centered at the center of the pulse (duration / 2):
$$
f(x) = amp * exp( -(1/2) * (x - duration/2)^2 / sigma^2) ) , 0 <= x < duration
$$
Initialize the gaussian pulse.
**Parameters**
* **duration** (`int`) Pulse length in terms of the the sampling period dt.
* **amp** (`Union`\[`complex`, `ParameterExpression`]) The amplitude of the Gaussian envelope.
* **sigma** (`Union`\[`float`, `ParameterExpression`]) A measure of how wide or narrow the Gaussian peak is; described mathematically in the class docstring.
* **name** (`Optional`\[`str`]) Display name for this pulse envelope.
### \_\_init\_\_
<Function id="qiskit.pulse.Gaussian.__init__" signature="__init__(duration, amp, sigma, name=None)">
Initialize the gaussian pulse.
**Parameters**
* **duration** (`int`) Pulse length in terms of the the sampling period dt.
* **amp** (`Union`\[`complex`, `ParameterExpression`]) The amplitude of the Gaussian envelope.
* **sigma** (`Union`\[`float`, `ParameterExpression`]) A measure of how wide or narrow the Gaussian peak is; described mathematically in the class docstring.
* **name** (`Optional`\[`str`]) Display name for this pulse envelope.
</Function>
## Methods
| | |
| ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| [`__init__`](#qiskit.pulse.Gaussian.__init__ "qiskit.pulse.Gaussian.__init__")(duration, amp, sigma\[, name]) | Initialize the gaussian pulse. |
| [`assign_parameters`](#qiskit.pulse.Gaussian.assign_parameters "qiskit.pulse.Gaussian.assign_parameters")(value\_dict) | Return a new ParametricPulse with parameters assigned. |
| [`draw`](#qiskit.pulse.Gaussian.draw "qiskit.pulse.Gaussian.draw")(\[dt, style, filename, interp\_method, …]) | Plot the pulse. |
| [`get_sample_pulse`](#qiskit.pulse.Gaussian.get_sample_pulse "qiskit.pulse.Gaussian.get_sample_pulse")() | Deprecated. |
| [`get_waveform`](#qiskit.pulse.Gaussian.get_waveform "qiskit.pulse.Gaussian.get_waveform")() | Return a Waveform with samples filled according to the formula that the pulse represents and the parameter values it contains. |
| [`validate_parameters`](#qiskit.pulse.Gaussian.validate_parameters "qiskit.pulse.Gaussian.validate_parameters")() | Validate parameters. |
## Attributes
| | |
| ------------------------------------------------------------------------------------ | ------------------------------------------------------ |
| [`amp`](#qiskit.pulse.Gaussian.amp "qiskit.pulse.Gaussian.amp") | The Gaussian amplitude. |
| [`id`](#qiskit.pulse.Gaussian.id "qiskit.pulse.Gaussian.id") | Unique identifier for this pulse. |
| [`parameters`](#qiskit.pulse.Gaussian.parameters "qiskit.pulse.Gaussian.parameters") | Return a dictionary containing the pulses parameters. |
| [`sigma`](#qiskit.pulse.Gaussian.sigma "qiskit.pulse.Gaussian.sigma") | The Gaussian standard deviation of the pulse width. |
### amp
<Attribute id="qiskit.pulse.Gaussian.amp">
The Gaussian amplitude.
**Return type**
`Union`\[`complex`, `ParameterExpression`]
</Attribute>
### assign\_parameters
<Function id="qiskit.pulse.Gaussian.assign_parameters" signature="assign_parameters(value_dict)">
Return a new ParametricPulse with parameters assigned.
**Parameters**
**value\_dict** (`Dict`\[`ParameterExpression`, `Union`\[`ParameterExpression`, `float`, `int`]]) A mapping from Parameters to either numeric values or another Parameter expression.
**Return type**
`ParametricPulse`
**Returns**
New pulse with updated parameters.
</Function>
### draw
<Function id="qiskit.pulse.Gaussian.draw" signature="draw(dt=1, style=None, filename=None, interp_method=None, scale=1, interactive=False)">
Plot the pulse.
**Parameters**
* **dt** (`float`) Time interval of samples.
* **style** (*Optional\[*[*PulseStyle*](qiskit.visualization.pulse.qcstyle#pulsestyle "qiskit.visualization.pulse.qcstyle.PulseStyle")*]*) A style sheet to configure plot appearance
* **filename** (`Optional`\[`str`]) Name required to save pulse image
* **interp\_method** (`Optional`\[`Callable`]) A function for interpolation
* **scale** (`float`) Relative visual scaling of waveform amplitudes
* **interactive** (`bool`) When set true show the circuit in a new window (this depends on the matplotlib backend being used supporting this)
**Returns**
A matplotlib figure object of the pulse envelope
**Return type**
matplotlib.figure
</Function>
### get\_sample\_pulse
<Function id="qiskit.pulse.Gaussian.get_sample_pulse" signature="get_sample_pulse()">
Deprecated.
**Return type**
`Waveform`
</Function>
### get\_waveform
<Function id="qiskit.pulse.Gaussian.get_waveform" signature="get_waveform()">
Return a Waveform with samples filled according to the formula that the pulse represents and the parameter values it contains.
**Return type**
`Waveform`
</Function>
### id
<Attribute id="qiskit.pulse.Gaussian.id">
Unique identifier for this pulse.
**Return type**
`int`
</Attribute>
### parameters
<Attribute id="qiskit.pulse.Gaussian.parameters">
Return a dictionary containing the pulses parameters.
**Return type**
`Dict`\[`str`, `Any`]
</Attribute>
### sigma
<Attribute id="qiskit.pulse.Gaussian.sigma">
The Gaussian standard deviation of the pulse width.
**Return type**
`Union`\[`float`, `ParameterExpression`]
</Attribute>
### validate\_parameters
<Function id="qiskit.pulse.Gaussian.validate_parameters" signature="validate_parameters()">
Validate parameters.
**Raises**
[**PulseError**](qiskit.pulse.PulseError "qiskit.pulse.PulseError") If the parameters passed are not valid.
**Return type**
`None`
</Function>
</Class>