def sin(duration: int, amp: complex, freq: float = None,<EOL>phase: float = <NUM_LIT:0>, name: str = None) -> SamplePulse:
if freq is None:<EOL><INDENT>freq = <NUM_LIT:1>/duration<EOL><DEDENT>return _sampled_sin_pulse(duration, amp, freq, phase=phase, name=name)<EOL>
Generates sine wave `SamplePulse`.

    Args:
        duration: Duration of pulse. Must be greater than zero.
        amp: Pulse amplitude.
        freq: Pulse frequency, units of 1/dt. If `None` defaults to single cycle.
        phase: Pulse phase.
        name: Name of pulse.