---
title: Square (v1.3)
description: API reference for qiskit.pulse.library.Square in qiskit v1.3
source: https://eu-de.quantum.cloud.ibm.com/docs/en/api/qiskit/1.3/qiskit.pulse.library.Square
---

# qiskit.pulse.library.Square

`qiskit.pulse.library.Square(duration, amp, phase, freq=None, angle=0.0, name=None, limit_amplitude=None)`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/1.3/qiskit/pulse/library/symbolic_pulses.py#L1779-L1848)

A square wave pulse.

The envelope of the pulse is given by:

$$
f(x) = \text{A}\text{sign}\left[\sin
\left(2\pi x\times\text{freq}+\text{phase}\right)\right]  ,  0 <= x < duration
$$

where $\text{A} = \text{amp} \times\exp\left(i\times\text{angle}\right)$, and $\text{sign}$ is the sign function with the convention $\text{sign}\left(0\right)=1$.

> **Deprecated since version 1.3**
>
> The function `qiskit.pulse.library.symbolic_pulses.Square()` is deprecated as of Qiskit 1.3. It will be removed in Qiskit 2.0. The entire Qiskit Pulse package is being deprecated and will be moved to the Qiskit Dynamics repository: [https://github.com/qiskit-community/qiskit-dynamics](https://github.com/qiskit-community/qiskit-dynamics)

**Parameters**

- **duration** ([*int*](https://docs.python.org/3/library/functions.html#int) *| ParameterValueType*) – Pulse length in terms of the sampling period `dt`.
- **amp** ([*float*](https://docs.python.org/3/library/functions.html#float)  *|*[*ParameterExpression*](/docs/api/qiskit/1.3/qiskit.circuit.ParameterExpression "qiskit.circuit.ParameterExpression")) – The magnitude of the amplitude of the square wave. Wave range is $\left[-\texttt{amp},\texttt{amp}\right]$.
- **phase** ([*float*](https://docs.python.org/3/library/functions.html#float)  *|*[*ParameterExpression*](/docs/api/qiskit/1.3/qiskit.circuit.ParameterExpression "qiskit.circuit.ParameterExpression")) – The phase of the square wave (note that this is not equivalent to the angle of the complex amplitude).
- **freq** ([*float*](https://docs.python.org/3/library/functions.html#float)  *|*[*ParameterExpression*](/docs/api/qiskit/1.3/qiskit.circuit.ParameterExpression "qiskit.circuit.ParameterExpression") *| None*) – The frequency of the square wave, in terms of 1 over sampling period. If not provided defaults to a single cycle (i.e $\frac{1}{\text{duration}}$). The frequency is limited to the range $\left(0,0.5\right]$ (the Nyquist frequency).
- **angle** ([*float*](https://docs.python.org/3/library/functions.html#float)  *|*[*ParameterExpression*](/docs/api/qiskit/1.3/qiskit.circuit.ParameterExpression "qiskit.circuit.ParameterExpression") *| None*) – The angle in radians of the complex phase factor uniformly scaling the pulse. Default value 0.
- **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str) *| None*) – Display name for this pulse envelope.
- **limit\_amplitude** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *| None*) – If `True`, then limit the amplitude of the waveform to 1. The default is `True` and the amplitude is constrained to 1.

**Returns**

ScalableSymbolicPulse instance.

**Return type**

ScalableSymbolicPulse
