def gaussian_square(times: np.ndarray, amp: complex, center: float, width: float,<EOL>sigma: float, zeroed_width: Union[None, float] = None) -> np.ndarray:
square_start = center-width/<NUM_LIT:2><EOL>square_stop = center+width/<NUM_LIT:2><EOL>if zeroed_width:<EOL><INDENT>zeroed_width = min(width, zeroed_width)<EOL>gauss_zeroed_width = zeroed_width-width<EOL><DEDENT>else:<EOL><INDENT>gauss_zeroed_width = None<EOL><DEDENT>funclist = [functools.partial(gaussian, amp=amp, center=square_start, sigma=sigma,<EOL>zeroed_width=gauss_zeroed_width, rescale_amp=True),<EOL>functools.partial(gaussian, amp=amp, center=square_stop, sigma=sigma,<EOL>zeroed_width=gauss_zeroed_width, rescale_amp=True),<EOL>functools.partial(constant, amp=amp)]<EOL>condlist = [times <= square_start, times >= square_stop]<EOL>return np.piecewise(times.astype(np.complex_), condlist, funclist)<EOL>
r"""Continuous gaussian square pulse.

    Args:
        times: Times to output pulse for.
        amp: Pulse amplitude.
        center: Center of the square pulse component.
        width: Width of the square pulse component.
        sigma: Width (standard deviation) of gaussian rise/fall portion of the pulse.
        zeroed_width: Subtract baseline of gaussian square pulse
                      to enforce $\OmegaSquare(center \pm zeroed_width/2)=0$.