33 lines
966 B
Plaintext
33 lines
966 B
Plaintext
---
|
||
title: constant
|
||
description: API reference for qiskit.pulse.library.constant
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: function
|
||
python_api_name: qiskit.pulse.library.constant
|
||
---
|
||
|
||
<span id="qiskit-pulse-library-constant" />
|
||
|
||
# qiskit.pulse.library.constant
|
||
|
||
<Function id="qiskit.pulse.library.constant" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.24/qiskit/pulse/library/discrete.py" signature="constant(duration, amp, name=None)">
|
||
Generates constant-sampled [`Waveform`](qiskit.pulse.library.Waveform "qiskit.pulse.library.Waveform").
|
||
|
||
For $A=$ `amp`, samples from the function:
|
||
|
||
$$
|
||
f(x) = A
|
||
$$
|
||
|
||
**Parameters**
|
||
|
||
* **duration** (*int*) – Duration of pulse. Must be greater than zero.
|
||
* **amp** (*complex*) – Complex pulse amplitude.
|
||
* **name** (*str | None*) – Name of pulse.
|
||
|
||
**Return type**
|
||
|
||
[*Waveform*](qiskit.pulse.library.Waveform "qiskit.pulse.library.waveform.Waveform")
|
||
</Function>
|
||
|