Quanlse/QWaveform.py
def load(base64Str: str) -> 'QJob':
        """
        Create object from base64 encoded string.

        :param base64Str: a base64 encoded string
        :return: a QJob object
        """
        byteStr = base64.b64decode(base64Str.encode())
        obj = pickle.loads(byteStr)  # type: QJob

        # For compatibility with previous versions
        for opKey in obj.waves.keys():
            for wave in obj.waves[opKey]:
                if not hasattr(wave, "freq"):
                    wave.freq = wave.omega if hasattr(wave, "omega") else None
                if not hasattr(wave, "phase0"):
                    wave.phase0 = wave.phi if hasattr(wave, "phi") else None
                if not hasattr(wave, "phase"):
                    wave.phase = None

        return obj

        Create object from base64 encoded string.

        :param base64Str: a base64 encoded string
        :return: a QJob object
        
Create object from base64 encoded string.
Create object from base64 encoded string .
def load(base64Str: str) -> 'QJob':
        byteStr = base64.b64decode(base64Str.encode())
        obj = pickle.loads(byteStr)  
        for opKey in obj.waves.keys():
            for wave in obj.waves[opKey]:
                if not hasattr(wave, "freq"):
                    wave.freq = wave.omega if hasattr(wave, "omega") else None
                if not hasattr(wave, "phase0"):
                    wave.phase0 = wave.phi if hasattr(wave, "phi") else None
                if not hasattr(wave, "phase"):
                    wave.phase = None
        return obj
def load ( base64Str : str ) -> 'QJob' : byteStr = base64 . b64decode ( base64Str . encode ( ) ) obj = pickle . loads ( byteStr ) for opKey in obj . waves . keys ( ) : for wave in obj . waves [ opKey ] : if not hasattr ( wave , "freq" ) : wave . freq = wave . omega if hasattr ( wave , "omega" ) else None if not hasattr ( wave , "phase0" ) : wave . phase0 = wave . phi if hasattr ( wave , "phi" ) else None if not hasattr ( wave , "phase" ) : wave . phase = None return obj
Create object from base64 encoded string.
Create object from base64 encoded string .
"""
        Create object from base64 encoded string.

        :param base64Str: a base64 encoded string
        :return: a QJob object
        """ # type: QJob # For compatibility with previous versions
a QJob object
a QJob object
base64Str
str
a base64 encoded string
a base64 encoded string