Quanlse/QWaveform.py
def appendJob(self, obj: Any, t0: float = None) -> None:
        """
        Append objects to the QJob object.
        When timeShift is None, all waves appended will be started from the end of the current waves.

        :param obj: object to be added
        :param t0: start time
        :return: None
        """
        if isinstance(obj, QJob):
            # When the object is a QJob.
            if obj.sysLevel != self.sysLevel:
                raise Error.ArgumentError("sysLevel does not match!")
            if obj.subSysNum != self.subSysNum:
                raise Error.ArgumentError("subSysNum does not match!")
            # Start adding
            self.computeMaxTime()
            if t0 is None:
                _timeShift = self.endTime
            else:
                _timeShift = t0
            _obj = copy.deepcopy(obj)
            for key in _obj.ctrlOperators.keys():
                if key not in self._ctrlOperators.keys():
                    # Current term exists, then add the wave directly.
                    self._ctrlOperators[key] = copy.deepcopy(_obj.ctrlOperators[key])
                    self._waves[key] = []
                # Then add the wave.
                for wave in _obj.waves[key]:
                    newWave = copy.deepcopy(wave)
                    newWave.t0 += _timeShift
                    self._waves[key].append(newWave)
            self.computeMaxTime()
        else:
            raise Error.ArgumentError(f"Unsupported type ({type(obj)}), only QJob is supported.")

        Append objects to the QJob object.
        When timeShift is None, all waves appended will be started from the end of the current waves.

        :param obj: object to be added
        :param t0: start time
        :return: None
        
Append objects to the QJob object.
When timeShift is None, all waves appended will be started from the end of the current waves.
Append objects to the QJob object . When timeShift is None all waves appended will be started from the end of the current waves .
def appendJob(self, obj: Any, t0: float = None) -> None:
        if isinstance(obj, QJob):
            if obj.sysLevel != self.sysLevel:
                raise Error.ArgumentError("sysLevel does not match!")
            if obj.subSysNum != self.subSysNum:
                raise Error.ArgumentError("subSysNum does not match!")
            self.computeMaxTime()
            if t0 is None:
                _timeShift = self.endTime
            else:
                _timeShift = t0
            _obj = copy.deepcopy(obj)
            for key in _obj.ctrlOperators.keys():
                if key not in self._ctrlOperators.keys():
                    self._ctrlOperators[key] = copy.deepcopy(_obj.ctrlOperators[key])
                    self._waves[key] = []
                for wave in _obj.waves[key]:
                    newWave = copy.deepcopy(wave)
                    newWave.t0 += _timeShift
                    self._waves[key].append(newWave)
            self.computeMaxTime()
        else:
            raise Error.ArgumentError(f"Unsupported type ({type(obj)}), only QJob is supported.")
def appendJob ( self , obj : Any , t0 : float = None ) -> None : if isinstance ( obj , QJob ) : if obj . sysLevel != self . sysLevel : raise Error . ArgumentError ( "sysLevel does not match!" ) if obj . subSysNum != self . subSysNum : raise Error . ArgumentError ( "subSysNum does not match!" ) self . computeMaxTime ( ) if t0 is None : _timeShift = self . endTime else : _timeShift = t0 _obj = copy . deepcopy ( obj ) for key in _obj . ctrlOperators . keys ( ) : if key not in self . _ctrlOperators . keys ( ) : self . _ctrlOperators [ key ] = copy . deepcopy ( _obj . ctrlOperators [ key ] ) self . _waves [ key ] = [ ] for wave in _obj . waves [ key ] : newWave = copy . deepcopy ( wave ) newWave . t0 += _timeShift self . _waves [ key ] . append ( newWave ) self . computeMaxTime ( ) else : raise Error . ArgumentError ( f"Unsupported type ({type(obj)}), only QJob is supported." )
Append objects to the QJob object.
Append objects to the QJob object .
"""
        Append objects to the QJob object.
        When timeShift is None, all waves appended will be started from the end of the current waves.

        :param obj: object to be added
        :param t0: start time
        :return: None
        """ # When the object is a QJob. # Start adding # Current term exists, then add the wave directly. # Then add the wave.
None
self
obj
Any
object to be added
object to be added
t0
float
None