qiskit.pulse.library.square¶
- square(duration, amp, freq=None, phase=0, name=None)[source]¶
Generates square wave
Waveform
.For \(A=\)
amp
, \(T=\)period
, and \(\phi=\)phase
, applies the midpoint sampling strategy to generate a discrete pulse sampled from the continuous function:\[f(x) = A \text{sign}\left[ \sin\left(\frac{2 \pi x}{T} + 2\phi\right) \right]\]with the convention \(\text{sign}(0) = 1\).
- প্যারামিটার
duration (int) -- Duration of pulse. Must be greater than zero.
amp (complex) -- Pulse amplitude. Wave range is \([-\)
amp
\(,\)amp
\(]\).freq (Optional[float]) -- Pulse frequency, units of 1./dt. If
None
defaults to 1./duration.phase (float) -- Pulse phase.
name (Optional[str]) -- Name of pulse.
- রিটার্ন টাইপ