Quanlse/Scheduler/Ion/DefaultPulseGenerator.py
def generateMS(cirLine: CircuitLine = None, scheduler: 'SchedulerIon' = None) -> QJob:
    """
    Default generator for M-S gate.

    :param cirLine: input circuit line object
    :param scheduler: input scheduler object
    :return: a returned QJob object
    """
    if 5 < scheduler.dt < 15:
        job = QJob(subSysNum=scheduler.subSysNum, sysLevel=2, dt=scheduler.dt)
        qLabel = cirLine.qRegIndexList
        gatePair = [[qLabel[0], qLabel[1]]]

        """
        For parameter args1, scheduler.subSysNum is the total ion in chain.
        And simply, we fix the trapped potential with some typical value:
        omegaXY=2 * pi * 2e6, omegaZ=2 * pi * 0.2e6. 
        We choose typical atomMass=171 for Ytterbium atom, 
        and using "transverse" phonon to transmit information.
        """
        args1 = (scheduler.subSysNum, 171, 2 * pi * 2e6, 2 * pi * 0.2e6, "transverse")

        """
        And for quantum gate parameter, we fix the square pulse number
        to be 3*N, where N=scheduler.subSysNum is the ion number in chain.
        The laser detuning mu usually has relation with gate time 
        mu=2*pi/tg, where tg=scheduler.subSysNum * 3 * scheduler.dt.
        """
        args2 = (scheduler.subSysNum * 3, scheduler.dt, 2 * pi / (scheduler.subSysNum * 3 * scheduler.dt))

        result, unitary = optGMS(gatePair, args1=args1, args2=args2)
        infidelity = result['infidelity']
        print(f"Gate infidelity of MS{gatePair[0]} is: \n {infidelity}")
        sequence = result['pulse_list'][0]

        job.addWave(uWave, onSubSys=qLabel[0], waves=QWaveform(t0=0.0, seq=sequence))
        job.addWave(uWave, onSubSys=qLabel[1], waves=QWaveform(t0=0.0, seq=sequence))
    else:
        raise Error.ArgumentError("The sample time of MS gate is between 5 - 15.")

    return job

    Default generator for M-S gate.

    :param cirLine: input circuit line object
    :param scheduler: input scheduler object
    :return: a returned QJob object
    
Default generator for M-S gate.
Default generator for M - S gate .
def generateMS(cirLine: CircuitLine = None, scheduler: 'SchedulerIon' = None) -> QJob:
    if 5 < scheduler.dt < 15:
        job = QJob(subSysNum=scheduler.subSysNum, sysLevel=2, dt=scheduler.dt)
        qLabel = cirLine.qRegIndexList
        gatePair = [[qLabel[0], qLabel[1]]]
        args1 = (scheduler.subSysNum, 171, 2 * pi * 2e6, 2 * pi * 0.2e6, "transverse")
        args2 = (scheduler.subSysNum * 3, scheduler.dt, 2 * pi / (scheduler.subSysNum * 3 * scheduler.dt))
        result, unitary = optGMS(gatePair, args1=args1, args2=args2)
        infidelity = result['infidelity']
        print(f"Gate infidelity of MS{gatePair[0]} is: \n {infidelity}")
        sequence = result['pulse_list'][0]
        job.addWave(uWave, onSubSys=qLabel[0], waves=QWaveform(t0=0.0, seq=sequence))
        job.addWave(uWave, onSubSys=qLabel[1], waves=QWaveform(t0=0.0, seq=sequence))
    else:
        raise Error.ArgumentError("The sample time of MS gate is between 5 - 15.")
    return job
def generateMS ( cirLine : CircuitLine = None , scheduler : 'SchedulerIon' = None ) -> QJob : if 5 < scheduler . dt < 15 : job = QJob ( subSysNum = scheduler . subSysNum , sysLevel = 2 , dt = scheduler . dt ) qLabel = cirLine . qRegIndexList gatePair = [ [ qLabel [ 0 ] , qLabel [ 1 ] ] ] """
        For parameter args1, scheduler.subSysNum is the total ion in chain.
        And simply, we fix the trapped potential with some typical value:
        omegaXY=2 * pi * 2e6, omegaZ=2 * pi * 0.2e6. 
        We choose typical atomMass=171 for Ytterbium atom, 
        and using "transverse" phonon to transmit information.
        """ args1 = ( scheduler . subSysNum , 171 , 2 * pi * 2e6 , 2 * pi * 0.2e6 , "transverse" ) """
        And for quantum gate parameter, we fix the square pulse number
        to be 3*N, where N=scheduler.subSysNum is the ion number in chain.
        The laser detuning mu usually has relation with gate time 
        mu=2*pi/tg, where tg=scheduler.subSysNum * 3 * scheduler.dt.
        """ args2 = ( scheduler . subSysNum * 3 , scheduler . dt , 2 * pi / ( scheduler . subSysNum * 3 * scheduler . dt ) ) result , unitary = optGMS ( gatePair , args1 = args1 , args2 = args2 ) infidelity = result [ 'infidelity' ] print ( f"Gate infidelity of MS{gatePair[0]} is: \n {infidelity}" ) sequence = result [ 'pulse_list' ] [ 0 ] job . addWave ( uWave , onSubSys = qLabel [ 0 ] , waves = QWaveform ( t0 = 0.0 , seq = sequence ) ) job . addWave ( uWave , onSubSys = qLabel [ 1 ] , waves = QWaveform ( t0 = 0.0 , seq = sequence ) ) else : raise Error . ArgumentError ( "The sample time of MS gate is between 5 - 15." ) return job
Default generator for M-S gate.
Default generator for M - S gate .
"""
    Default generator for M-S gate.

    :param cirLine: input circuit line object
    :param scheduler: input scheduler object
    :return: a returned QJob object
    """ """
        For parameter args1, scheduler.subSysNum is the total ion in chain.
        And simply, we fix the trapped potential with some typical value:
        omegaXY=2 * pi * 2e6, omegaZ=2 * pi * 0.2e6. 
        We choose typical atomMass=171 for Ytterbium atom, 
        and using "transverse" phonon to transmit information.
        """ """
        And for quantum gate parameter, we fix the square pulse number
        to be 3*N, where N=scheduler.subSysNum is the ion number in chain.
        The laser detuning mu usually has relation with gate time 
        mu=2*pi/tg, where tg=scheduler.subSysNum * 3 * scheduler.dt.
        """
a returned QJob object
a returned QJob object
cirLine
CircuitLine
input circuit line object
input circuit line object
scheduler
'SchedulerIon'
input scheduler object
input scheduler object