Quanlse/QWaveform.py
def gaussian(t: Union[int, float], a: float, tau: float, sigma: float, t0: Union[int, float] = 0.,
             freq: float = None, phase: float = None, phase0: float = None) -> QWaveform:
    """
    Return a QWaveform object of Gaussian wave.

    :param t: pulse duration
    :param a: pulse amplitude
    :param tau: pulse center position
    :param sigma: pulse standard deviation
    :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 Gaussian QWaveform
    """

    def func(_t, args):
        """ The Gaussian function """
        _a, _tau, _sigma = args
        if _sigma == 0:
            return 0
        pulse = _a * exp(- ((_t - _tau) ** 2 / (2 * _sigma ** 2)))
        return pulse

    wave = QWaveform(f=func, t0=t0, t=t, args=(a, tau, sigma), freq=freq, phase=phase, phase0=phase0)
    wave.name = "gaussian"
    return wave

    Return a QWaveform object of Gaussian wave.

    :param t: pulse duration
    :param a: pulse amplitude
    :param tau: pulse center position
    :param sigma: pulse standard deviation
    :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 Gaussian QWaveform
    
Return a QWaveform object of Gaussian wave.
Return a QWaveform object of Gaussian wave .
def gaussian(t: Union[int, float], a: float, tau: float, sigma: float, t0: Union[int, float] = 0.,
             freq: float = None, phase: float = None, phase0: float = None) -> QWaveform:
    def func(_t, args):
        _a, _tau, _sigma = args
        if _sigma == 0:
            return 0
        pulse = _a * exp(- ((_t - _tau) ** 2 / (2 * _sigma ** 2)))
        return pulse
    wave = QWaveform(f=func, t0=t0, t=t, args=(a, tau, sigma), freq=freq, phase=phase, phase0=phase0)
    wave.name = "gaussian"
    return wave
def gaussian ( t : Union [ int , float ] , a : float , tau : float , sigma : float , t0 : Union [ int , float ] = 0. , freq : float = None , phase : float = None , phase0 : float = None ) -> QWaveform : def func ( _t , args ) : """ The Gaussian function """ _a , _tau , _sigma = args if _sigma == 0 : return 0 pulse = _a * exp ( - ( ( _t - _tau ) ** 2 / ( 2 * _sigma ** 2 ) ) ) return pulse wave = QWaveform ( f = func , t0 = t0 , t = t , args = ( a , tau , sigma ) , freq = freq , phase = phase , phase0 = phase0 ) wave . name = "gaussian" return wave
Return a QWaveform object of Gaussian wave.
Return a QWaveform object of Gaussian wave .
"""
    Return a QWaveform object of Gaussian wave.

    :param t: pulse duration
    :param a: pulse amplitude
    :param tau: pulse center position
    :param sigma: pulse standard deviation
    :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 Gaussian QWaveform
    """ """ The Gaussian function """
returned Gaussian QWaveform
returned Gaussian QWaveform
t
Union[int, float]
None
a
float
None
tau
float
pulse center position
pulse center position
sigma
float
pulse standard deviation
pulse standard deviation
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 )