qiskit-documentation/docs/api/qiskit/0.43/qiskit.pulse.library.consta...

33 lines
966 B
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: 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>