Quanlse/QWaveform.py
def sin(t: Union[int, float], a: float, b: float, c: float, t0: Union[int, float] = 0.,
        freq: float = None, phase: float = None, phase0: float = None) -> QWaveform:
    """
    Return a QWaveform object of sin wave.
    x(t) = a * sin(b * t + c)

    :param t: pulse duration
    :param a: sin wave amplitude
    :param b: 2 * pi / (sin wave period)
    :param c: sin wave phase
    :param t0: start time
    :param freq: pulse frequency shift (will not accumulate during the entire pulse execution)
    :param phase: pulse phase shift (will accumulate during the entire pulse execution)
    :param phase0: pulse phase shift (will not accumulate during the entire pulse execution)
    :return: returned sin QWaveform
    """

    def func(_t, args):
        """ The sin function """
        _a, _b, _c = args
        return _a * math.sin(_b * _t + _c)

    wave = QWaveform(f=func, t0=t0, t=t, args=(a, b, c), freq=freq, phase=phase, phase0=phase0)
    wave.name = "sin"
    return wave

    Return a QWaveform object of sin wave.
    x(t) = a * sin(b * t + c)

    :param t: pulse duration
    :param a: sin wave amplitude
    :param b: 2 * pi / (sin wave period)
    :param c: sin wave phase
    :param t0: start time
    :param freq: pulse frequency shift (will not accumulate during the entire pulse execution)
    :param phase: pulse phase shift (will accumulate during the entire pulse execution)
    :param phase0: pulse phase shift (will not accumulate during the entire pulse execution)
    :return: returned sin QWaveform
    
Return a QWaveform object of sin wave.
Return a QWaveform object of sin wave .
def sin(t: Union[int, float], a: float, b: float, c: float, t0: Union[int, float] = 0.,
        freq: float = None, phase: float = None, phase0: float = None) -> QWaveform:
    def func(_t, args):
        _a, _b, _c = args
        return _a * math.sin(_b * _t + _c)
    wave = QWaveform(f=func, t0=t0, t=t, args=(a, b, c), freq=freq, phase=phase, phase0=phase0)
    wave.name = "sin"
    return wave
def sin ( t : Union [ int , float ] , a : float , b : float , c : float , t0 : Union [ int , float ] = 0. , freq : float = None , phase : float = None , phase0 : float = None ) -> QWaveform : def func ( _t , args ) : """ The sin function """ _a , _b , _c = args return _a * math . sin ( _b * _t + _c ) wave = QWaveform ( f = func , t0 = t0 , t = t , args = ( a , b , c ) , freq = freq , phase = phase , phase0 = phase0 ) wave . name = "sin" return wave
Return a QWaveform object of sin wave.
Return a QWaveform object of sin wave .
"""
    Return a QWaveform object of sin wave.
    x(t) = a * sin(b * t + c)

    :param t: pulse duration
    :param a: sin wave amplitude
    :param b: 2 * pi / (sin wave period)
    :param c: sin wave phase
    :param t0: start time
    :param freq: pulse frequency shift (will not accumulate during the entire pulse execution)
    :param phase: pulse phase shift (will accumulate during the entire pulse execution)
    :param phase0: pulse phase shift (will not accumulate during the entire pulse execution)
    :return: returned sin QWaveform
    """ """ The sin function """
returned sin QWaveform
returned sin QWaveform
t
Union[int, float]
None
a
float
sin wave amplitude
sin wave amplitude
b
float
2 * pi / (sin wave period)
2 * pi / ( sin wave period )
c
float
sin wave phase
sin wave phase
t0
Union[int, float]
None
freq
float
pulse frequency shift (will not accumulate during the entire pulse execution)
pulse frequency shift ( will not accumulate during the entire pulse execution )
phase
float
pulse phase shift (will accumulate during the entire pulse execution)
pulse phase shift ( will accumulate during the entire pulse execution )
phase0
float
pulse phase shift (will not accumulate during the entire pulse execution)
pulse phase shift ( will not accumulate during the entire pulse execution )