qiskit.pulse.library.square
square(duration, amp, freq=None, phase=0, name=None)
Generates square wave Waveform
.
For amp
, period
, and phase
, applies the midpoint sampling strategy to generate a discrete pulse sampled from the continuous function:
with the convention .
Parameters
- duration (
int
) – Duration of pulse. Must be greater than zero. - amp (
complex
) – Pulse amplitude. Wave range isamp
amp
. - freq (
Optional
[float
]) – Pulse frequency, units of 1./dt. IfNone
defaults to 1./duration. - phase (
float
) – Pulse phase. - name (
Optional
[str
]) – Name of pulse.
Return type
Was this page helpful?
Report a bug or request content on GitHub.