qiskit/pulse/pulse_lib/discrete.py
def constant(duration: int, amp: complex, name: str = None) -> SamplePulse:
    """Generates constant-sampled `SamplePulse`.

    Applies `left` sampling strategy to generate discrete pulse from continuous function.

    Args:
        duration: Duration of pulse. Must be greater than zero.
        amp: Complex pulse amplitude.
        name: Name of pulse.
    """
    return _sampled_constant_pulse(duration, amp, name=name)
def constant(duration: int, amp: complex, name: str = None) -> SamplePulse:
    return _sampled_constant_pulse(duration, amp, name=name)
def constant ( duration : int , amp : complex , name : str = None ) -> SamplePulse : return _sampled_constant_pulse ( duration , amp , name = name )
Generates constant-sampled `SamplePulse`.

    Applies `left` sampling strategy to generate discrete pulse from continuous function.

    Args:
        duration: Duration of pulse. Must be greater than zero.
        amp: Complex pulse amplitude.
        name: Name of pulse.
Generates constant - sampled SamplePulse .