Beispiel #1
0
def pulse_defs(msmt, pulse_type):

    if pulse_type == 'Square':
        msmt.params['MW_pi_duration'] = 2e-6
        msmt.params['mw_frq'] = msmt.params['mw_frq'] - msmt.params[
            'MW_pulse_mod_frequency']
        msmt.params['pulse_pi_amp'] = msmt.params['MW_amp_dark_ESR']
        IQ_Square_pi = pulselib.MW_IQmod_pulse(
            'Square pi-pulse',
            I_channel='MW_Imod',
            Q_channel='MW_Qmod',
            PM_channel='MW_pulsemod',
            length=msmt.params['MW_pi_duration'],
            amplitude=msmt.params['pulse_pi_amp'],
            frequency=msmt.params['MW_pulse_mod_frequency'],
            PM_risetime=msmt.params['MW_pulse_mod_risetime'])
        Dummy_IQ_Square_pi2 = pulselib.MW_IQmod_pulse(
            'Square pi/2-pulse',
            I_channel='MW_Imod',
            Q_channel='MW_Qmod',
            PM_channel='MW_pulsemod',
            length=msmt.params['MW_pi_duration'],
            amplitude=0.0,
            frequency=msmt.params['MW_pulse_mod_frequency'],
            PM_risetime=msmt.params['MW_pulse_mod_risetime'])
        pulse_pi = IQ_Square_pi
        pulse_pi2 = Dummy_IQ_Square_pi2

    elif pulse_type == 'Hermite':

        Hermite_pi = pulselib.HermitePulse_Envelope(
            'Hermite pi-pulse',
            MW_channel='MW_Imod',
            PM_channel='MW_pulsemod',
            amplitude=msmt.params['MW_pi_amp'],
            length=msmt.params['MW_pi_duration'],
            PM_risetime=msmt.params['MW_pulse_mod_risetime'],
            pi2_pulse=False)

        Hermite_pi2 = pulselib.HermitePulse_Envelope(
            'Hermite pi/2-pulse',
            MW_channel='MW_Imod',
            PM_channel='MW_pulsemod',
            amplitude=msmt.params['MW_pi2_amp'],
            length=msmt.params['MW_pi2_duration'],
            PM_risetime=msmt.params['MW_pulse_mod_risetime'],
            pi2_pulse=True)

        pulse_pi = Hermite_pi
        pulse_pi2 = Hermite_pi2

    else:
        print 'The pulse type you asked for is not defined.'

    return pulse_pi, pulse_pi2
Beispiel #2
0
    def generate_sequence(self, upload=True, debug=False):
        # MBI element
        mbi_elt = self._MBI_element()

        # electron manipulation pulses
        T = pulse.SquarePulse(channel='MW_pulsemod',
            length = 1000e-9, amplitude = 0)

        X = pulselib.MW_IQmod_pulse('MW pulse',
            I_channel = 'MW_Imod',
            Q_channel = 'MW_Qmod',
            PM_channel = 'MW_pulsemod',
            PM_risetime = self.params['MW_pulse_mod_risetime'] )

        # X = pulselib.HermitePulse_Envelope_IQ('MW pulse',
        #     I_channel = 'MW_Imod',
        #     Q_channel = 'MW_Qmod',
        #     PM_channel = 'MW_pulsemod',
        #     PM_risetime = self.params['MW_pulse_mod_risetime'] )

        adwin_sync = pulse.SquarePulse(channel='adwin_sync',
            length = self.params['AWG_to_adwin_ttl_trigger_duration'],
            amplitude = 2)

        # electron manipulation elements
        elts = []
        for i in range(self.params['pts']):
            e = element.Element('ERabi_pt-%d' % i, pulsar=qt.pulsar,
                global_time = True)
            e.append(T)

            for j in range(self.params['MW_pulse_multiplicities'][i]):
                e.append(
                    pulse.cp(X,
                        frequency = self.params['MW_pulse_mod_frqs'][i],
                        amplitude = self.params['MW_pulse_amps'][i],
                        length = self.params['MW_pulse_durations'][i]))
                e.append(
                    pulse.cp(T, length=self.params['MW_pulse_delays'][i]))

            e.append(adwin_sync)
            elts.append(e)

        # sequence
        seq = pulsar.Sequence('MBI Electron Rabi sequence')
        for i,e in enumerate(elts):
            seq.append(name = 'MBI-%d' % i, wfname = mbi_elt.name,
                trigger_wait = True, goto_target = 'MBI-%d' % i,
                jump_target = e.name)
            seq.append(name = e.name, wfname = e.name,
                trigger_wait = True)
            # seq.append(name = 'RO-%d' % i, wfname = mbi_elt.name,
            #     trigger_wait = True, goto_target = 'MBI-%d' % i,
            #     jump_target = e.name)
        print 'MBI at', self.params['AWG_MBI_MW_pulse_ssbmod_frq']
        print 'MW rotations at', self.params['MW_pulse_mod_frqs'][i]
        # program AWG
        if upload:
            #qt.pulsar.upload(mbi_elt, *elts)
            qt.pulsar.program_awg(seq, mbi_elt, *elts , debug=debug)
Beispiel #3
0
def Xpi2_pulse(msmt):
    '''
	pi/2 pulse around X
	'''
    pulse_shape = check_pulse_shape(msmt)

    if pulse_shape == 'Square':

        pi2 = pulselib.MW_IQmod_pulse(
            'electron Pi/2-pulse',
            I_channel='MW_Imod',
            Q_channel='MW_Qmod',
            PM_channel='MW_pulsemod',
            Sw_channel=msmt.params['MW_switch_channel'],
            frequency=msmt.params['pi2_mod_frq'],
            PM_risetime=msmt.params['MW_pulse_mod_risetime'],
            Sw_risetime=msmt.params['MW_switch_risetime'],
            length=msmt.params['Square_pi2_length'],
            amplitude=msmt.params['Square_pi2_amp'],
            phase=msmt.params['X_phase'])
    elif pulse_shape == 'Hermite':
        pi2 = pulselib.HermitePulse_Envelope_IQ(
            'Hermite Pi/2-pulse',
            'MW_Imod',
            'MW_Qmod',
            'MW_pulsemod',
            Sw_channel=msmt.params['MW_switch_channel'],
            frequency=msmt.params['mw_mod_freq'],
            amplitude=msmt.params['Hermite_pi2_amp'],
            length=msmt.params['Hermite_pi2_length'],
            PM_risetime=msmt.params['MW_pulse_mod_risetime'],
            Sw_risetime=msmt.params['MW_switch_risetime'],
            phase=msmt.params['X_phase'],
            pi2_pulse=True)
    return pi2
Beispiel #4
0
    def _RO_element(self, name='RO weak pi'):
        # define the necessary pulses
        T = pulse.SquarePulse(channel='MW_pulsemod',
                              length=100e-9,
                              amplitude=0)

        X = pulselib.MW_IQmod_pulse(
            'MBI MW pulse',
            I_channel='MW_Imod',
            Q_channel='MW_Qmod',
            PM_channel='MW_pulsemod',
            Sw_channel='MW_switch',
            frequency=self.params['AWG_MBI_MW_pulse_ssbmod_frq'],
            amplitude=self.params['AWG_MBI_MW_pulse_amp'],
            length=self.params['AWG_MBI_MW_pulse_duration'],
            PM_risetime=self.params['MW_pulse_mod_risetime'],
            Sw_risetime=self.params['MW_switch_risetime'])

        adwin_sync = pulse.SquarePulse(channel='adwin_sync',
            length = (self.params['AWG_to_adwin_ttl_trigger_duration'] \
                + self.params['AWG_wait_for_adwin_MBI_duration']),
            amplitude = 2)

        # the actual element
        ro_element = element.Element(name, pulsar=qt.pulsar)
        ro_element.append(T)
        ro_element.append(X)
        ro_element.append(adwin_sync)

        return ro_element
Beispiel #5
0
    def generate_sequence(self, upload=True):
        # electron manipulation pulses
        T = pulse.SquarePulse(channel='MW_pulsemod',
                              length=100e-9,
                              amplitude=0)
        TIQ = pulse.SquarePulse(channel='MW_Imod', length=10e-9, amplitude=0)

        pi2 = pulselib.MW_IQmod_pulse(
            'MW pulse',
            I_channel='MW_Imod',
            Q_channel='MW_Qmod',
            PM_channel='MW_pulsemod',
            PM_risetime=self.params['MW_pulse_mod_risetime'],
            length=self.params['MW_pulse_duration'],
            amplitude=self.params['MW_pulse_amplitude'],
            frequency=self.params['MW_pulse_frequency'])

        wait_1us = element.Element('1us_delay', pulsar=qt.pulsar)
        wait_1us.append(pulse.cp(T, length=1e-6))

        sync_elt = element.Element('adwin_sync', pulsar=qt.pulsar)
        adwin_sync = pulse.SquarePulse(channel='adwin_sync',
                                       length=10e-6,
                                       amplitude=2)
        sync_elt.append(adwin_sync)

        elts = []
        seq = pulsar.Sequence('CORPSE test')

        for i in range(self.params['pts']):
            e = element.Element('regular_Pi2_after_delay{}'.format(i),
                                pulsar=qt.pulsar,
                                global_time=True)
            e.append(T)
            e.append(pulse.cp(TIQ, length=self.params['delays'][i]))
            e.append(pulse.cp(pi2))
            e.append(T)
            elts.append(e)
            seq.append(name='regular_Pi2_after_delay-{}'.format(i),
                       wfname=e.name,
                       trigger_wait=True)
            seq.append(name='sync-{}'.format(i), wfname=sync_elt.name)

        if upload:
            qt.pulsar.upload(sync_elt, wait_1us, *elts)
        qt.pulsar.program_sequence(seq)
Beispiel #6
0
def mw2_squareX(msmt):
    '''
	pi pulse on MW source No2
	'''
    X = pulselib.MW_IQmod_pulse(
        'electron X-Pi-pulse',
        I_channel='mw2_MW_Imod',
        Q_channel='mw2_MW_Qmod',
        PM_channel='mw2_pulsemod',
        Sw_channel=msmt.params['MW_switch_channel'],
        frequency=0.,
        PM_risetime=msmt.params['mw2_pulse_mod_risetime'],
        Sw_risetime=msmt.params['MW_switch_risetime'],
        length=msmt.params['mw2_Square_pi_length'],
        phase=msmt.params['X_phase'],
        amplitude=msmt.params['mw2_Square_pi_amp'])

    return X
Beispiel #7
0
def squareX(msmt):
    '''
	X pi pulse
	'''
    X = pulselib.MW_IQmod_pulse(
        'electron X-Pi-pulse',
        I_channel='MW_Imod',
        Q_channel='MW_Qmod',
        PM_channel='MW_pulsemod',
        Sw_channel=msmt.params['MW_switch_channel'],
        frequency=msmt.params['MW_modulation_frequency'],
        PM_risetime=msmt.params['MW_pulse_mod_risetime'],
        Sw_risetime=msmt.params['MW_switch_risetime'],
        length=msmt.params['Square_pi_length'],
        amplitude=msmt.params['Square_pi_amp'],
        phase=msmt.params['X_phase'])

    return X
Beispiel #8
0
def X_pulse(msmt):
    '''
	X pi pulse
	'''
    pulse_shape = check_pulse_shape(msmt)

    if pulse_shape == 'Square':
        """
		NOTE: Commented out version dates from pre-MW switch DD script
		"""
        X = pulselib.MW_IQmod_pulse(
            'electron X-Pi-pulse',
            I_channel='MW_Imod',
            Q_channel='MW_Qmod',
            PM_channel='MW_pulsemod',
            Sw_channel=msmt.params['MW_switch_channel'],
            frequency=msmt.params['MW_modulation_frequency'],
            PM_risetime=msmt.params['MW_pulse_mod_risetime'],
            Sw_risetime=msmt.params['MW_switch_risetime'],
            length=msmt.params['Square_pi_length'],
            amplitude=msmt.params['Square_pi_amp'],
            phase=msmt.params['X_phase'])

    elif pulse_shape == 'Hermite':
        # print 'This is pulse select speaking: I make hermite pulses'
        # print 'length is', msmt.params['Hermite_pi_length']
        # print 'Amp is', msmt.params['Hermite_pi_amp']

        X = pulselib.HermitePulse_Envelope_IQ(
            'Hermite pi-pulse',
            'MW_Imod',
            'MW_Qmod',
            'MW_pulsemod',
            Sw_channel=msmt.params['MW_switch_channel'],
            frequency=msmt.params['mw_mod_freq'],
            amplitude=msmt.params['Hermite_pi_amp'],
            length=msmt.params['Hermite_pi_length'],
            PM_risetime=msmt.params['MW_pulse_mod_risetime'],
            Sw_risetime=msmt.params['MW_switch_risetime'],
            phase=msmt.params['X_phase'],
            pi2_pulse=False)

    return X
Beispiel #9
0
def pulse_defs(msmt):

    # a waiting pulse on the MW pulsemod channel
    msmt.T = pulse.SquarePulse(channel='MW_pulsemod',
        length = 50e-9, amplitude = 0)

    msmt.TIQ = pulse.SquarePulse(channel='MW_Imod',
        length = 10e-9, amplitude = 0)

    # some not yet specified pulse on the electron
    msmt.e_pulse = pulselib.MW_IQmod_pulse('MW pulse',
        I_channel = 'MW_Imod', 
        Q_channel = 'MW_Qmod',
        PM_channel = 'MW_pulsemod',
        PM_risetime = msmt.params['MW_pulse_mod_risetime'] )

    # synchronizing, etc
    msmt.adwin_sync = pulse.SquarePulse(channel='adwin_sync',
        length = 10e-6, amplitude = 2)

    return True
Beispiel #10
0
def mw2_X_pulse(msmt):
    '''
	pi pulse on MW source No2
	'''
    pulse_shape = check_pulse_shape(msmt)
    if pulse_shape == 'Square':
        print 'doing Squares on MW2'
        X = pulselib.MW_IQmod_pulse(
            'electron X-Pi-pulse',
            I_channel='mw2_MW_Imod',
            Q_channel='mw2_MW_Qmod',
            PM_channel='mw2_pulsemod',
            Sw_channel=msmt.params['MW_switch_channel'],
            frequency=0.,
            PM_risetime=msmt.params['mw2_pulse_mod_risetime'],
            Sw_risetime=msmt.params['MW_switch_risetime'],
            length=msmt.params['mw2_Square_pi_length'],
            phase=msmt.params['X_phase'],
            amplitude=msmt.params['mw2_Square_pi_amp'])

    elif pulse_shape == 'Hermite':
        X = pulselib.HermitePulse_Envelope_IQ(
            'Hermite pi-pulse',
            I_channel='mw2_MW_Imod',
            Q_channel='mw2_MW_Qmod',
            PM_channel='mw2_pulsemod',
            Sw_channel=msmt.params['MW_switch_channel'],
            frequency=msmt.params['mw2_mod_freq'],
            amplitude=msmt.params['mw2_Hermite_pi_amp'],
            length=msmt.params['mw2_Hermite_pi_length'],
            PM_risetime=msmt.params['mw2_pulse_mod_risetime'],
            Sw_risetime=msmt.params['MW_switch_risetime'],
            phase=msmt.params['X_phase'],
            pi2_pulse=False)
    else:
        print 'mw2 no valid pulse'

    return X
Beispiel #11
0
def mw2_Xpi2_pulse(msmt):
    '''
	pi/2 pulse on MW source No2, did not exist so copy pasted it AS 07042016
	'''
    pulse_shape = check_pulse_shape(msmt)
    if pulse_shape == 'Square':
        X = pulselib.MW_IQmod_pulse(
            'electron Pi/2-pulse',
            I_channel='mw2_MW_Imod',
            Q_channel='mw2_MW_Qmod',
            PM_channel='mw2_pulsemod',
            Sw_channel=msmt.params['MW_switch_channel'],
            frequency=0.,
            PM_risetime=msmt.params['mw2_pulse_mod_risetime'],
            Sw_risetime=msmt.params['MW_switch_risetime'],
            length=msmt.params['mw2_Square_pi2_length'],
            phase=msmt.params['X_phase'],
            amplitude=msmt.params['mw2_Square_pi2_amp'])

    elif pulse_shape == 'Hermite':
        X = pulselib.HermitePulse_Envelope_IQ(
            'Hermite Pi/2-pulse',
            I_channel='mw2_MW_Imod',
            Q_channel='mw2_MW_Qmod',
            PM_channel='mw2_pulsemod',
            Sw_channel=msmt.params['MW_switch_channel'],
            frequency=msmt.params['mw2_mod_freq'],
            amplitude=msmt.params['mw2_Hermite_pi2_amp'],
            length=msmt.params['mw2_Hermite_pi2_length'],
            PM_risetime=msmt.params['mw2_pulse_mod_risetime'],
            Sw_risetime=msmt.params['MW_switch_risetime'],
            phase=msmt.params['X_phase'],
            pi2_pulse=False)
    else:
        print 'mw2 no valid pulse'

    return X
Beispiel #12
0
    def generate_sequence(self, upload=True):
        #print 'test'
        # define the necessary pulses

        X = pulselib.MW_IQmod_pulse('Weak pi-pulse',
            I_channel='MW_1', 
            Q_channel='dummy',
            PM_channel='MW_pulsemod',
            frequency = self.params['MW_pulse_frequency'],
            PM_risetime = self.params['MW_pulse_mod_risetime'])
        X.channels.remove('dummy')

        T = pulse.SquarePulse(channel='MW_1', name='delay',
            length = 200e-9, amplitude = 0.)

        # make the elements - one for each ssb frequency
        elements = []
        for i in range(self.params['pts']):

            e = element.Element('ElectronRabi_pt-%d' % i, pulsar=qt.pulsar)

            e.append(T)
            e.append(pulse.cp(X,
                length = self.params['MW_pulse_durations'][i],
                amplitude = self.params['MW_pulse_amplitudes'][i]))

            elements.append(e)


        # create a sequence from the pulses
        seq = pulsar.Sequence('ElectronRabi sequence')
        for e in elements:
            seq.append(name=e.name, wfname=e.name, trigger_wait=True)

        # upload the waveforms to the AWG
        if upload:
            qt.pulsar.program_awg(seq,*elements)
Beispiel #13
0
def desr_pulse(msmt):
    '''
	desr pi pulse
	'''
    pulse_shape = check_pulse_shape(msmt)

    if pulse_shape == 'Square':
        """
		NOTE: Commented out version dates from pre-MW switch DD script
		"""
        desr = pulselib.MW_IQmod_pulse(
            'electron desr-Pi-pulse',
            I_channel='MW_Imod',
            Q_channel='MW_Qmod',
            PM_channel='MW_pulsemod',
            Sw_channel=msmt.params['MW_switch_channel'],
            frequency=msmt.params['desr_modulation_frequency'],
            PM_risetime=msmt.params['MW_pulse_mod_risetime'],
            Sw_risetime=msmt.params['MW_switch_risetime'],
            length=msmt.params['desr_pulse_length'],
            amplitude=msmt.params['desr_pulse_amp'],
            phase=msmt.params['X_phase'])

    return desr
Beispiel #14
0
    def generate_sequence(self, upload=True):
        # MBI element
        mbi_elt = self._MBI_element()

        # electron manipulation pulses
        T = pulse.SquarePulse(channel='MW_pulsemod',
                              length=100e-9,
                              amplitude=0)
        TIQ = pulse.SquarePulse(channel='MW_Imod', length=10e-9, amplitude=0)

        fast_pi = pulselib.MW_IQmod_pulse(
            'MW pi pulse',
            I_channel='MW_Imod',
            Q_channel='MW_Qmod',
            PM_channel='MW_pulsemod',
            PM_risetime=self.params['MW_pulse_mod_risetime'],
            frequency=self.params['fast_pi_mod_frq'],
            amplitude=self.params['fast_pi_amp'],
            length=self.params['fast_pi_duration'])

        fast_pi2 = pulselib.MW_IQmod_pulse(
            'MW pi2 pulse',
            I_channel='MW_Imod',
            Q_channel='MW_Qmod',
            PM_channel='MW_pulsemod',
            PM_risetime=self.params['MW_pulse_mod_risetime'],
            frequency=self.params['fast_pi2_mod_frq'],
            amplitude=self.params['fast_pi2_amp'],
            length=self.params['fast_pi2_duration'])

        sync_elt = element.Element('adwin_sync', pulsar=qt.pulsar)
        adwin_sync = pulse.SquarePulse(channel='adwin_sync',
                                       length=10e-6,
                                       amplitude=2)
        sync_elt.append(adwin_sync)

        # electron manipulation elements
        elts = []
        seq = pulsar.Sequence('Pi2 Calibration')

        for i in range(self.params['pts_awg']):
            e = element.Element('Pi2_Pi-{}'.format(i),
                                pulsar=qt.pulsar,
                                global_time=True)
            e.append(T)
            e.append(
                pulse.cp(fast_pi2, amplitude=self.params['pi2_sweep_amps'][i]))
            e.append(pulse.cp(TIQ, length=200e-9))
            e.append(pulse.cp(fast_pi))
            e.append(T)
            elts.append(e)

            seq.append(name='MBIa-%d' % i,
                       wfname=mbi_elt.name,
                       trigger_wait=True,
                       goto_target='MBIa-%d' % i,
                       jump_target=e.name)
            seq.append(name='Pi2_Pi-{}'.format(i),
                       wfname=e.name,
                       trigger_wait=True)
            seq.append(name='synca-{}'.format(i), wfname=sync_elt.name)

            e = element.Element('Pi2-{}'.format(i),
                                pulsar=qt.pulsar,
                                global_time=True)
            e.append(T)
            e.append(
                pulse.cp(fast_pi2, amplitude=self.params['pi2_sweep_amps'][i]))
            e.append(pulse.cp(TIQ, length=200e-9))
            e.append(T)
            elts.append(e)
            seq.append(name='MBIb-%d' % i,
                       wfname=mbi_elt.name,
                       trigger_wait=True,
                       goto_target='MBIb-%d' % i,
                       jump_target=e.name)
            seq.append(name='Pi2-{}'.format(i),
                       wfname=e.name,
                       trigger_wait=True)
            seq.append(name='syncb-{}'.format(i), wfname=sync_elt.name)

        if upload:
            qt.pulsar.upload(mbi_elt, sync_elt, *elts)
        qt.pulsar.program_sequence(seq)
Beispiel #15
0
    def generate_sequence(self, upload=True):
        mbi_elt = self._MBI_element()

        T_MW = pulse.SquarePulse(channel='MW_pulsemod',
            length = 50e-9, amplitude = 0)
        T_SP = pulse.SquarePulse(channel='Velocity1AOM',
            length = 200e-9, amplitude = 0)

        CNOT_pi2pi = pulselib.MW_IQmod_pulse('pi2pi pulse mI=-1',
            I_channel = 'MW_Imod',
            Q_channel = 'MW_Qmod',
            PM_channel = 'MW_pulsemod',
            PM_risetime = self.params['MW_pulse_mod_risetime'],
            frequency = self.params['pi2pi_mIm1_mod_frq'],
            amplitude = self.params['pi2pi_mIm1_amp'],
            length = self.params['pi2pi_mIm1_duration'])

        CORPSE_pi = pulselib.IQ_CORPSE_pi_pulse('CORPSE pi-pulse',
            I_channel = 'MW_Imod',
            Q_channel = 'MW_Qmod',
            PM_channel = 'MW_pulsemod',
            PM_risetime =  self.params['MW_pulse_mod_risetime'],
            frequency = self.params['CORPSE_pi_mod_frq'],
            amplitude = self.params['CORPSE_pi_amp'],
            length_60 = self.params['CORPSE_pi_60_duration'],
            length_m300 = self.params['CORPSE_pi_m300_duration'],
            length_420 = self.params['CORPSE_pi_420_duration'])

        SP_pulse = pulse.SquarePulse(channel = 'Velocity1AOM',
            amplitude = 1.0)

        sync_elt = element.Element('adwin_sync', pulsar=qt.pulsar)
        adwin_sync = pulse.SquarePulse(channel='adwin_sync',
            length = self.params['AWG_to_adwin_ttl_trigger_duration'],
            amplitude = 2)
        sync_elt.append(adwin_sync)

        N_ro_elt = element.Element('N_RO', pulsar=qt.pulsar,
            global_time = True)

        # N_ro_elt.append(T_SP)
        # N_ro_elt.append(pulse.cp(SP_pulse,
        #                          length = self.params['RO_SP_duration']),
        #                 )

        N_ro_elt.append(T_MW)
        N_ro_elt.append(CORPSE_pi)
        N_ro_elt.append(T_MW)
        N_ro_elt.append(CNOT_pi2pi)
        N_ro_elt.append(pulse.cp(T_MW, length=1e-6))
        # N_ro_elt.append(adwin_sync)

        seq = pulsar.Sequence('N-RR')
        seq.append(name = 'MBI',
            wfname = mbi_elt.name,
            trigger_wait = True,
            goto_target = 'MBI',
            jump_target = 'RO-1')

        for i in range(self.params['nr_of_ROsequences']):
            seq.append(name = 'RO-{}'.format(i+1),
                wfname = N_ro_elt.name,
                trigger_wait = True)

            seq.append(name = 'sync-{}'.format(i+1),
                wfname = sync_elt.name)

        if upload:
            qt.pulsar.upload(mbi_elt, sync_elt, N_ro_elt)
        qt.pulsar.program_sequence(seq)
Beispiel #16
0
    def generate_sequence(self, upload=True):
        # load all the other pulsar resources
        self._pulse_defs()
        
        self.slow_cw_mI0 = pulselib.MW_IQmod_pulse('slow_cw_mI0',
            I_channel = 'MW_Imod', 
            Q_channel = 'MW_Qmod',
            PM_channel = 'MW_pulsemod',
            PM_risetime = 0,
            frequency = self.params['mI0_mod_frq'],
            amplitude = self.params['mw_amp'],
            length = self.params['sp_mw_el_duration'])
        self.slow_cw_mIp1 = pulselib.MW_IQmod_pulse('slow_cw_mIp1',
            I_channel = 'MW_Imod', 
            Q_channel = 'MW_Qmod',
            PM_channel = 'MW_pulsemod',
            PM_risetime = 0,
            frequency = self.params['mIp1_mod_frq'],
            amplitude = self.params['mw_amp'],
            length = self.params['sp_mw_el_duration'])        
        
        self.FT_pulse = pulse.SquarePulse(channel='Velocity1AOM',
            length = self.params['sp_mw_el_duration'], amplitude = self.params['FT_pulse_amp'])
        
       # self.yel_pulse = pulse.SquarePulse(channel='YellowAOM',
        #    length = 10e-6, amplitude = self.params['FT_pulse_amp'])
        
        N_RO_CNOT_elt = element.Element('N-RO CNOT', pulsar=qt.pulsar)
        N_RO_CNOT_elt.append(pulse.cp(self.T, length=500e-9))
        
        if self.params['readout_line'] == '-1':
            N_RO_CNOT_elt.append(self.pi2pi_m1)
        elif self.params['readout_line'] == '0':
            N_RO_CNOT_elt.append(self.pi2pi_0)
        elif self.params['readout_line'] == '+1':
            N_RO_CNOT_elt.append(self.pi2pi_p1)
        else:
            raise(Exception('Unknown readout line' + str(m.params['readout_line'])))
       

        # make the list of elements required for uploading
        e = element.Element('N_FT_Polarisation', pulsar=qt.pulsar, ignore_delays=True)
        
        e.add(self.FT_pulse)
        e.add(self.slow_cw_mI0)
        e.add(self.slow_cw_mIp1)
        
        e_sp = element.Element('final_SP', pulsar=qt.pulsar)
        
        e_sp.add(pulse.cp(self.FT_pulse(length=50e-6)))
        
        # create the sequence
        seq = pulsar.Sequence('N_FT_Polarisation_Check_sequence')
        
        for i,r in enumerate(self.params['FT_element_repetitions']):
            
            # 1: MBI 
            seq.append(name = 'MBI-{}'.format(i),
                wfname = self.mbi_elt.name,
                trigger_wait = True,
                goto_target = 'MBI-{}'.format(i),
                jump_target = 'ft_mw'+str(i))  
                    
            #2  then repeat (SP+MW pi)-element for the current number of times
            seq.append(name = 'ft_mw'+str(i), wfname=e.name,
                    repetitions= r,
                    trigger_wait = True)
            seq.append(name = 'final_sp'+str(i), wfname=e_sp.name,
                    trigger_wait=False)
            
            seq.append(name='N_ro'+str(i), wfname=N_RO_CNOT_elt.name,
                trigger_wait=False)
                
            seq.append(name = 'sync-{}'.format(i), 
                    wfname = self.sync_elt.name) 
                
        # program AWG
        if upload:
            qt.pulsar.upload(self.mbi_elt, e, N_RO_CNOT_elt,self.sync_elt,e_sp)
        
        qt.pulsar.program_sequence(seq)
Beispiel #17
0
def pulse_defs_lt4(msmt):

    # a waiting pulse on the MW pulsemod channel
    msmt.T = pulse.SquarePulse(channel='MW_pulsemod',
                               length=50e-9,
                               amplitude=0)

    msmt.TIQ = pulse.SquarePulse(channel='MW_Imod', length=10e-9, amplitude=0)

    msmt.T_sync = pulse.SquarePulse(channel='sync', length=50e-9, amplitude=0)

    # some not yet specified pulse on the electron
    msmt.e_pulse = pulselib.MW_IQmod_pulse(
        'MW pulse',
        I_channel='MW_Imod',
        Q_channel='MW_Qmod',
        PM_channel='MW_pulsemod',
        PM_risetime=msmt.params['MW_pulse_mod_risetime'])

    msmt.MW_pi = pulselib.HermitePulse_Envelope(
        'Hermite pi-pulse',
        MW_channel='MW_Imod',
        PM_channel='MW_pulsemod',
        second_MW_channel='MW_Qmod',
        amplitude=msmt.params['MW_pi_amp'],
        length=msmt.params['MW_pi_duration'],
        PM_risetime=msmt.params['MW_pulse_mod_risetime'],
        pi2_pulse=False)

    msmt.MW_pi2 = pulselib.HermitePulse_Envelope(
        'Hermite pi/2-pulse',
        MW_channel='MW_Imod',
        PM_channel='MW_pulsemod',
        second_MW_channel='MW_Qmod',
        amplitude=msmt.params['MW_pi2_amp'],
        length=msmt.params['MW_pi2_duration'],
        PM_risetime=msmt.params['MW_pulse_mod_risetime'],
        pi2_pulse=True)

    msmt.MW_BellAngle = pulselib.HermitePulse_Envelope(
        'Hermite pi/2-pulse',
        MW_channel='MW_Imod',
        PM_channel='MW_pulsemod',
        second_MW_channel='MW_Qmod',
        amplitude=msmt.params['MW_pi2_amp'] *
        msmt.params['MW_BellStateFactor'],
        length=msmt.params['MW_pi2_duration'],
        PM_risetime=msmt.params['MW_pulse_mod_risetime'],
        pi2_pulse=True)

    msmt.MW_RND_I = pulselib.HermitePulse_Envelope(
        'Hermite RND-pulse-I',
        MW_channel='MW_Imod',
        PM_channel='MW_pulsemod',
        amplitude=msmt.params['MW_RND_amp_I'],
        length=msmt.params['MW_RND_duration_I'],
        PM_risetime=msmt.params['MW_pulse_mod_risetime'],
        pi2_pulse=True)
    msmt.MW_RND_Q = pulselib.HermitePulse_Envelope(
        'Hermite RND-pulse-Q',
        MW_channel='MW_Qmod',
        PM_channel='MW_pulsemod',
        amplitude=msmt.params['MW_RND_amp_Q'],
        length=msmt.params['MW_RND_duration_Q'],
        PM_risetime=msmt.params['MW_pulse_mod_risetime'],
        pi2_pulse=True)

    msmt.eom_pulse = eom_pulses.OriginalEOMAOMPulse(
        'Eom Aom Pulse',
        eom_channel='EOM_Matisse',
        aom_channel='EOM_AOM_Matisse',
        eom_pulse_duration=msmt.params['eom_pulse_duration'],
        eom_off_duration=msmt.params['eom_off_duration'],
        eom_off_amplitude=msmt.params['eom_off_amplitude'],
        eom_pulse_amplitude=msmt.params['eom_pulse_amplitude'],
        eom_overshoot_duration1=msmt.params['eom_overshoot_duration1'],
        eom_overshoot1=msmt.params['eom_overshoot1'],
        eom_overshoot_duration2=msmt.params['eom_overshoot_duration2'],
        eom_overshoot2=msmt.params['eom_overshoot2'],
        aom_risetime=msmt.params['aom_risetime'],
        aom_amplitude=msmt.params['aom_amplitude'])

    msmt.RND_halt_off_pulse = pulse.SquarePulse(
        channel='RND_halt', amplitude=2.0, length=msmt.params['RND_duration'])

    ### synchronizing, etc
    msmt.adwin_trigger_pulse = pulse.SquarePulse(channel='adwin_sync',
                                                 length=5e-6,
                                                 amplitude=2)

    msmt.sync = pulse.SquarePulse(channel='sync', length=50e-9, amplitude=1.0)
    msmt.SP_pulse = pulse.SquarePulse(channel='AOM_Newfocus', amplitude=1.0)
    msmt.RO_pulse = pulse.SquarePulse(channel='EOM_AOM_Matisse', amplitude=0.0)
    msmt.yellow_pulse = pulse.SquarePulse(channel='AOM_Yellow', amplitude=1.0)

    msmt.plu_gate = pulse.SquarePulse(channel='plu_sync',
                                      amplitude=1.0,
                                      length=msmt.params['PLU_gate_duration'])

    return True
Beispiel #18
0
    def generate_sequence(self):

        #define the pulses
        sq_p7889=pulse.SquarePulse(channel='p7889_start',name='p7889_square',amplitude=1) 
        sq_p7889.length=2e-6 #that is pretty long, can be reduced in the future.

        wait = pulse.SquarePulse(channel='AOM_Green',name='Green_square')
        wait.amplitude = 0
        wait.length=2e-6
        
        
        sq_AOMpulse=pulse.SquarePulse(channel='AOM_Green',name='Green_square')
        sq_AOMpulse.amplitude=1 #just set the marker high
        sq_AOMpulse.length=self.params['GreenAOM_pulse_length']
        
        X = pulselib.MW_IQmod_pulse('Weak pi-pulse',
            I_channel='MW_Imod', Q_channel='MW_Qmod',
            PM_channel='MW_pulsemod',
            amplitude = self.params['ssbmod_amplitude'],
            length = self.params['MW_pulse_length'],
            PM_risetime = self.params['MW_pulse_mod_risetime'])

        #need one spin polarization pulse at the beginning.
        init=element.Element('initialize',pulsar=qt.pulsar)
        init.add(pulse.cp(sq_AOMpulse,length=1e-6,amplitude=0),name='wait')
        init.add(sq_AOMpulse,name='init',refpulse='wait')

        #generate a list of pulse elements. One for each modulation freuqency
        elements=[]
        elements.append(init)
        
        for k,f in enumerate(np.linspace(self.params['ssbmod_frq_start'],self.params['ssbmod_frq_stop'],self.params['pts'])):

            e=element.Element('DarkESR_frq-%d' % k,pulsar=qt.pulsar)
            e.add(pulse.cp(wait,length=-1e-6,amplitude=0),name='wait_int')
            e.add(X(frequency=f),name='MWpulse',refpulse='wait_int',refpoint='end')
            e.add(sq_p7889,name='p7889Start',start=0.4e-6,refpulse='MWpulse',refpoint='end')
            e.add(sq_AOMpulse,name='GreenLight',start=2.1e-6,refpulse='p7889Start',refpoint='start')
            elements.append(e)
        # was 1.7 before the AOM greenlight pulse
        # was 0.8 before the p7889Start
        # wait length before was 1 e-6 but because there is a false delay in the green line (i guess, it doesn't work)
        # wait length adjusted was -1.6e-6
        # Start p7889start adjusted 0.4e-6
        # Greenlight start adjusted 2.1e-6





        #insert a delay at the end of the sequence such that all outputs of the AWG stay low.
        end=element.Element('ending delay',pulsar=qt.pulsar)
        end.add(pulse.cp(sq_AOMpulse,length=1e-6,amplitude=0),name='delay')
        elements.append(end)

        #create a sequence from the gathered elements
        seq=pulsar.Sequence('DarkESR sequence p7889')
        for e in elements:
            seq.append(name=e.name,wfname=e.name)

        #upload to AWG
        qt.pulsar.program_awg(seq,*elements)
Beispiel #19
0
def pulse_defs_lt2(msmt):

    # a waiting pulse on the MW pulsemod channel
    msmt.T = pulse.SquarePulse(channel='MW_pulsemod',
                               length=50e-9,
                               amplitude=0)

    msmt.TIQ = pulse.SquarePulse(channel='MW_Imod', length=10e-9, amplitude=0)

    # some not yet specified pulse on the electron
    msmt.e_pulse = pulselib.MW_IQmod_pulse(
        'MW pulse',
        I_channel='MW_Imod',
        Q_channel='MW_Qmod',
        PM_channel='MW_pulsemod',
        PM_risetime=msmt.params_lt2['MW_pulse_mod_risetime'])

    msmt.CORPSE_pi = pulselib.IQ_CORPSE_pulse(
        'CORPSE pi-pulse',
        I_channel='MW_Imod',
        Q_channel='MW_Qmod',
        PM_channel='MW_pulsemod',
        PM_risetime=msmt.params_lt2['MW_pulse_mod_risetime'],
        frequency=msmt.params_lt2['CORPSE_pi_mod_frq'],
        amplitude=msmt.params_lt2['CORPSE_amp'],
        rabi_frequency=msmt.params_lt2['CORPSE_rabi_frequency'],
        eff_rotation_angle=180)

    msmt.CORPSE_pi2 = pulselib.IQ_CORPSE_pulse(
        'CORPSE pi2-pulse',
        I_channel='MW_Imod',
        Q_channel='MW_Qmod',
        PM_channel='MW_pulsemod',
        PM_risetime=msmt.params_lt2['MW_pulse_mod_risetime'],
        frequency=msmt.params_lt2['CORPSE_pi2_mod_frq'],
        amplitude=msmt.params_lt2['CORPSE_pi2_amp'],
        rabi_frequency=msmt.params_lt2['CORPSE_rabi_frequency'],
        eff_rotation_angle=90)

    ### synchronizing, etc
    msmt.adwin_lt2_trigger_pulse = pulse.SquarePulse(
        channel='adwin_sync', length=5e-6,
        amplitude=2)  #only used for calibrations!!

    ### LDE attempt
    msmt.eom_aom_pulse = pulselib.EOMAOMPulse(
        'Eom Aom Pulse',
        eom_channel='EOM_Matisse',
        aom_channel='EOM_AOM_Matisse',
        eom_pulse_duration=msmt.params_lt2['eom_pulse_duration'],
        eom_off_duration=msmt.params_lt2['eom_off_duration'],
        eom_off_amplitude=msmt.params_lt2['eom_off_amplitude'],
        eom_pulse_amplitude=msmt.params_lt2['eom_pulse_amplitude'],
        eom_overshoot_duration1=msmt.params_lt2['eom_overshoot_duration1'],
        eom_overshoot1=msmt.params_lt2['eom_overshoot1'],
        eom_overshoot_duration2=msmt.params_lt2['eom_overshoot_duration2'],
        eom_overshoot2=msmt.params_lt2['eom_overshoot2'],
        aom_risetime=msmt.params_lt2['aom_risetime'])

    msmt.short_eom_aom_pulse = pulselib.short_EOMAOMPulse(
        'Eom Aom Pulse',
        eom_channel='EOM_Matisse',
        aom_channel='EOM_AOM_Matisse',
        eom_off_duration=msmt.params_lt2['eom_off_duration'],
        eom_off_amplitude=msmt.params_lt2['eom_off_amplitude'],
        eom_off_2_amplitude=2.65,  #msmt.params_lt2['eom_off_2_amplitude'],
        eom_overshoot_duration1=msmt.params_lt2['eom_overshoot_duration1'],
        eom_overshoot1=0.0,  #msmt.params_lt2['eom_overshoot1'],
        eom_overshoot_duration2=msmt.params_lt2['eom_overshoot_duration2'],
        eom_overshoot2=0.0,  #msmt.params_lt2['eom_overshoot2'],
        aom_risetime=msmt.params_lt2['aom_risetime'])

    msmt.HH_sync = pulse.SquarePulse(channel='HH_sync',
                                     length=50e-9,
                                     amplitude=1.0)
    msmt.eom_trigger = pulse.SquarePulse(channel='EOM_trigger',
                                         length=100e-9,
                                         amplitude=1.0)
    msmt.SP_pulse = pulse.SquarePulse(channel='AOM_Newfocus', amplitude=1.0)
    # msmt.yellow_pulse = pulse.SquarePulse(channel = 'AOM_Yellow', amplitude = 1.0)
    msmt.plu_gate = pulse.SquarePulse(
        channel='plu_sync',
        amplitude=1.0,
        length=msmt.params_lt2['PLU_gate_duration'])

    msmt.HH_marker = pulse.SquarePulse(channel='HH_MA1',
                                       length=50e-9,
                                       amplitude=1.0)

    ### LDE attempt

    return True
Beispiel #20
0
    def generate_sequence(self, upload=True, debug=False):
        # MBI element
        mbi_elt = self._MBI_element()

        ro_elt = self._RO_element()

        # electron manipulation pulses
        T = pulse.SquarePulse(channel='MW_pulsemod',
                              length=1000e-9,
                              amplitude=0)

        X = pulselib.MW_IQmod_pulse(
            'MBI MW pulse',
            I_channel='MW_Imod',
            Q_channel='MW_Qmod',
            PM_channel='MW_pulsemod',
            frequency=self.params['AWG_MBI_MW_pulse_ssbmod_frq'],
            amplitude=self.params['AWG_MBI_MW_pulse_amp'],
            length=self.params['AWG_MBI_MW_pulse_duration'],
            PM_risetime=self.params['MW_pulse_mod_risetime'])



        adwin_sync = pulse.SquarePulse(channel='adwin_sync',
            length = (self.params['AWG_to_adwin_ttl_trigger_duration'] \
                + self.params['AWG_wait_for_adwin_MBI_duration']),
            amplitude = 2)

        # # define the necessary pulses
        # T = pulse.SquarePulse(channel='MW_pulsemod',
        #     length = 100e-9, amplitude = 0)

        # X = pulselib.MW_IQmod_pulse('MBI MW pulse',
        #     I_channel = 'MW_Imod', Q_channel = 'MW_Qmod',
        #     PM_channel = 'MW_pulsemod',
        #     frequency = self.params['AWG_MBI_MW_pulse_ssbmod_frq'],
        #     amplitude = self.params['AWG_MBI_MW_pulse_amp'],
        #     length = self.params['AWG_MBI_MW_pulse_duration'],
        #     PM_risetime = self.params['MW_pulse_mod_risetime'])

        # # the actual element
        # ro_element = element.Element(name, pulsar=qt.pulsar)
        # ro_element.append(T)
        # ro_element.append(X)

        N_pulse = pulselib.RF_erf_envelope(
            channel='RF',
            amplitude=self.params['RF_pulse_amp'],
            frequency=self.params['RF_pulse_frqs'])

        # X = pulselib.HermitePulse_Envelope_IQ('MW pulse',
        #     I_channel = 'MW_Imod',
        #     Q_channel = 'MW_Qmod',
        #     PM_channel = 'MW_pulsemod',
        #     PM_risetime = self.params['MW_pulse_mod_risetime'] )

        adwin_sync = pulse.SquarePulse(
            channel='adwin_sync',
            length=self.params['AWG_to_adwin_ttl_trigger_duration'],
            amplitude=2)

        # electron manipulation elements
        elts = []

        for i in range(self.params['pts']):
            e = element.Element('RF_pt-%d' % i,
                                pulsar=qt.pulsar,
                                global_time=True)
            e.append(pulse.cp(T, length=500e-9))
            e.append(
                pulse.cp(N_pulse,
                         length=self.params['RF_pulse_length'][i],
                         frequency=self.params['RF_pulse_frqs']))
            e.append(pulse.cp(T, length=500e-9))

            # for j in range(self.params['MW_pulse_multiplicities'][i]):
            #     e.append(
            #         pulse.cp(X,
            #             frequency = self.params['MW_pulse_mod_frqs'][i],
            #             amplitude = self.params['MW_pulse_amps'][i],
            #             length = self.params['MW_pulse_durations'][i]))
            #     e.append(
            #         pulse.cp(T, length=self.params['MW_pulse_delays'][i]))

            #e.append(adwin_sync)
            elts.append(e)

        # gate_seq = []
        # for pt in range(self.params['pts']):
        #     rabi_pulse = DD.Gate('Rabi_pulse_'+str(pt),'RF_pulse',
        #         length      = self.params['RF_pulse_durations'][pt],
        #         RFfreq      = self.params['RF_pulse_frqs'][pt],
        #         amplitude   = self.params['RF_pulse_amps'][pt])
        #     gate_seq.extend([rabi_pulse])
        #     print 'Gate_seq', gate_seq

        #     gate_seq = DD.NitrogenRabiWithDirectRF.generate_AWG_elements(gate_seq,pt) # this will use resonance = 0 by default in

        # ### Convert elements to AWG sequence and add to combined list
        # list_of_elements, seq2 = DD.combine_to_AWG_sequence(gate_seq, explicit=True)

        # sequence
        seq = pulsar.Sequence('MBI Electron Rabi sequence')
        for i, e in enumerate(elts):
            seq.append(name='MBI-%d' % i,
                       wfname=mbi_elt.name,
                       trigger_wait=True,
                       goto_target='MBI-%d' % i,
                       jump_target=e.name)
            seq.append(name=e.name, wfname=e.name, trigger_wait=True)  #True
            seq.append(name='RO_pt-%d' % i,
                       wfname=ro_elt.name,
                       trigger_wait=False)

            # seq.append(name = 'RO-%d' % i, wfname = mbi_elt.name,
            #     trigger_wait = False)      ## According to Norbert the trigger wait time should be set to False.
            ## This is implemented at the beginning of the MBI because it is waiting for a CR check from the adwin.
            ## For the readout this doesn't have to be implemented because it is deterministic.
        print 'MBI at', self.params['AWG_MBI_MW_pulse_ssbmod_frq']
        # print 'MW rotations at', self.params['MW_pulse_mod_frqs'][i]
        # program AWG
        if upload:
            #qt.pulsar.upload(mbi_elt, *elts)
            qt.pulsar.program_awg(seq, mbi_elt, ro_elt, *elts, debug=debug)
Beispiel #21
0
    def generate_sequence(self, upload=True, debug=False):
        # MBI element
        mbi_elt = self._MBI_element()

        # electron manipulation pulses
        T = pulse.SquarePulse(channel='MW_pulsemod',
                              length=100e-9,
                              amplitude=0)

        X = pulselib.MW_IQmod_pulse(
            'MW pulse',
            I_channel='MW_Imod',
            Q_channel='MW_Qmod',
            PM_channel='MW_pulsemod',
            Sw_channel='MW_switch',
            PM_risetime=self.params['MW_pulse_mod_risetime'],
            Sw_risetime=self.params['MW_switch_risetime'])

        adwin_sync = pulse.SquarePulse(
            channel='adwin_sync',
            length=self.params['AWG_to_adwin_ttl_trigger_duration'],
            amplitude=2)

        # electron manipulation elements
        pulse_elts = []
        for i in range(self.params['pts']):
            e = element.Element('ERabi_pt-%d' % i, pulsar=qt.pulsar)
            e.append(T)
            e.append(
                pulse.cp(X,
                         frequency=self.params['MW_pulse_mod_frqs'][i],
                         amplitude=self.params['MW_pulse_amps'][i],
                         length=self.params['MW_pulse_durations'][i]))

            # e.append(adwin_sync)
            pulse_elts.append(e)

        wait_elt = element.Element('pulse_delay', pulsar=qt.pulsar)
        wait_elt.append(pulse.cp(T, length=1e-6))

        sync_elt = element.Element('adwin_sync', pulsar=qt.pulsar)
        sync_elt.append(adwin_sync)

        # sequence
        seq = pulsar.Sequence('MBI Electron Rabi sequence')
        for i, e in enumerate(pulse_elts):
            seq.append(name='MBI-%d' % i,
                       wfname=mbi_elt.name,
                       trigger_wait=True,
                       goto_target='MBI-%d' % i,
                       jump_target=e.name + '-0')

            if self.params['MW_pulse_multiplicities'][i] == 0:
                seq.append(name=e.name + '-0',
                           wfname=wait_elt.name,
                           trigger_wait=True)
            else:
                for j in range(self.params['MW_pulse_multiplicities'][i]):
                    seq.append(name=e.name + '-%d' % j,
                               wfname=e.name,
                               trigger_wait=(j == 0))
                    seq.append(name='wait-%d-%d' % (i, j),
                               wfname=wait_elt.name,
                               repetitions=int(
                                   self.params['MW_pulse_delays'][i] / 1e-6))

            seq.append(name='sync-%d' % i, wfname=sync_elt.name)

        # program AWG
        if upload:
            qt.pulsar.program_awg(seq,
                                  mbi_elt,
                                  wait_elt,
                                  sync_elt,
                                  *pulse_elts,
                                  debug=debug)
Beispiel #22
0
    def _pulse_defs(self):
        ### electron manipulation pulses

        # a waiting pulse on the MW pulsemod channel
        self.T = pulse.SquarePulse(channel='MW_pulsemod',
                                   length=10e-9,
                                   amplitude=0)

        self.TIQ = pulse.SquarePulse(channel='MW_Imod',
                                     length=10e-9,
                                     amplitude=0)

        # some not yet specified pulse on the electron
        self.e_pulse = pulselib.MW_IQmod_pulse(
            'MW pulse',
            I_channel='MW_Imod',
            Q_channel='MW_Qmod',
            PM_channel='MW_pulsemod',
            PM_risetime=self.params['MW_pulse_mod_risetime'])

        # slow pi-pulse for MBI
        self.slow_pi = pulselib.MW_IQmod_pulse(
            'slow pi',
            I_channel='MW_Imod',
            Q_channel='MW_Qmod',
            PM_channel='MW_pulsemod',
            PM_risetime=self.params['MW_pulse_mod_risetime'],
            frequency=self.params['selective_pi_mod_frq'],
            amplitude=self.params['selective_pi_amp'],
            length=self.params['selective_pi_duration'])

        # reasonably fast pi and pi/2 pulses
        self.pi_4MHz = pulselib.MW_IQmod_pulse(
            '4MHz pi',
            I_channel='MW_Imod',
            Q_channel='MW_Qmod',
            PM_channel='MW_pulsemod',
            PM_risetime=self.params['MW_pulse_mod_risetime'],
            frequency=self.params['4MHz_pi_mod_frq'],
            amplitude=self.params['4MHz_pi_amp'],
            length=self.params['4MHz_pi_duration'])

        self.pi2_4MHz = pulselib.MW_IQmod_pulse(
            '4MHz pi2',
            I_channel='MW_Imod',
            Q_channel='MW_Qmod',
            PM_channel='MW_pulsemod',
            PM_risetime=self.params['MW_pulse_mod_risetime'],
            frequency=self.params['4MHz_pi2_mod_frq'],
            amplitude=self.params['4MHz_pi2_amp'],
            length=self.params['4MHz_pi2_duration'])

        # shelving pi-pulse to bring electron to ms=-1 after mbi
        self.shelving_pulse = pulselib.MW_IQmod_pulse(
            'MBI shelving pulse',
            I_channel='MW_Imod',
            Q_channel='MW_Qmod',
            PM_channel='MW_pulsemod',
            frequency=self.params['AWG_MBI_MW_pulse_mod_frq'],
            amplitude=self.params['AWG_shelving_pulse_amp'],
            length=self.params['AWG_shelving_pulse_duration'],
            PM_risetime=self.params['MW_pulse_mod_risetime'])

        # CORPSE pi pulse
        self.CORPSE_pi = pulselib.IQ_CORPSE_pi_pulse(
            'CORPSE pi-pulse',
            I_channel='MW_Imod',
            Q_channel='MW_Qmod',
            PM_channel='MW_pulsemod',
            PM_risetime=self.params['MW_pulse_mod_risetime'],
            frequency=self.params['CORPSE_pi_mod_frq'],
            amplitude=self.params['CORPSE_pi_amp'],
            length_60=self.params['CORPSE_pi_60_duration'],
            length_m300=self.params['CORPSE_pi_m300_duration'],
            length_420=self.params['CORPSE_pi_420_duration'])

        # CNOT operation on the electron
        self.pi2pi_m1 = pulselib.MW_IQmod_pulse(
            'pi2pi pulse mI=-1',
            I_channel='MW_Imod',
            Q_channel='MW_Qmod',
            PM_channel='MW_pulsemod',
            PM_risetime=self.params['MW_pulse_mod_risetime'],
            frequency=self.params['pi2pi_mIm1_mod_frq'],
            amplitude=self.params['pi2pi_mIm1_amp'],
            length=self.params['pi2pi_mIm1_duration'])

        ### nuclear spin manipulation pulses
        self.TN = pulse.SquarePulse(channel='RF', length=100e-9, amplitude=0)

        self.N_pulse = pulselib.RF_erf_envelope(
            channel='RF', frequency=self.params['N_0-1_splitting_ms-1'])

        self.N_pi = pulselib.RF_erf_envelope(
            channel='RF',
            frequency=self.params['N_0-1_splitting_ms-1'],
            length=self.params['N_pi_duration'],
            amplitude=self.params['N_pi_amp'])

        self.N_pi2 = pulselib.RF_erf_envelope(
            channel='RF',
            frequency=self.params['N_0-1_splitting_ms-1'],
            length=self.params['N_pi2_duration'],
            amplitude=self.params['N_pi2_amp'])

        ### synchronizing, etc
        self.adwin_sync = pulse.SquarePulse(channel='adwin_sync',
                                            length=10e-6,
                                            amplitude=2)

        ### useful elements
        self.mbi_elt = self._MBI_element()

        self.sync_elt = element.Element('adwin_sync', pulsar=qt.pulsar)
        self.sync_elt.append(self.adwin_sync)
    def generate_sequence(self, **kw):

        upload = kw.pop('upload', True)

        T = pulse.SquarePulse(channel = 'Velocity1AOM', length = 1e-6, amplitude = 0.)
        R = pulse.SquarePulse(channel = 'Velocity1AOM', amplitude = 1.0)
        Y = pulse.SquarePulse(channel = 'YellowAOM', amplitude = 1.0)
        MW = pulselib.MW_IQmod_pulse('Long weak pulse', 
            I_channel='MW_Imod', Q_channel='MW_Qmod', 
            PM_channel='MW_pulsemod',
            frequency = self.params['ms-1_cntr_frq'] - self.params['mw_frq'],
            PM_risetime = self.params['MW_pulse_mod_risetime'], 
            amplitude = 0.1)

        ionization_element = element.Element('ionization_element', pulsar = qt.pulsar)
        ionization_element.add(pulse.cp(R,
                amplitude = self.params['red_ionization_amplitude'], 
                length = 10e-6),
                name = 'red ionization pulse')
        ionization_element.add(pulse.cp(MW, length = 9.5e-6),
                refpulse = 'red ionization pulse', 
                refpoint = 'start')
        delay_element  = element.Element('delay_element', pulsar = qt.pulsar)
        delay_element.append(T)

        sync_elt = element.Element('adwin_sync', pulsar=qt.pulsar)
        adwin_sync = pulse.SquarePulse(channel='adwin_sync',
            length = 10e-6, amplitude = 2)
        sync_elt.append(adwin_sync)

        seq = pulsar.Sequence('Yellow RP Calibration sequence')
        elements = []
        for i in range(self.params['pts']):    
            self.params['AWG_yellow_rp_amplitude'] = \
                self.repump_aom.power_to_voltage(
                    self.params['AWG_yellow_rp_powers'][i], controller='sec')

            repump_element = element.Element('repump_element-{}'.format(i), pulsar = qt.pulsar)
            repump_element.append(pulse.cp(Y, length = 10e-6, amplitude = self.params['AWG_yellow_rp_amplitude']))
            elements.append(repump_element)

            seq.append(name = ionization_element.name+'_{}'.format(i), 
                wfname = ionization_element.name,
                trigger_wait = True,
                repetitions = int(self.params['red_ionization_durations'][i]/10e-6))

            seq.append(name = delay_element.name+'_{}'.format(i),
                wfname = delay_element.name)

            seq.append(name = repump_element.name+'_{}'.format(i), 
                wfname = repump_element.name,
                repetitions = int(self.params['yellow_rp_durations'][i]/10e-6))
            seq.append(name = sync_elt.name+'-{}'.format(i), 
                wfname = sync_elt.name)

        # upload the waveforms to the AWG
        if upload:
            qt.pulsar.upload(ionization_element, delay_element, sync_elt, *elements)

        # program the AWG
        qt.pulsar.program_sequence(seq)
def pulse_defs_lt1(msmt):

    # a waiting pulse on the MW pulsemod channel
    msmt.T = pulse.SquarePulse(channel='MW_pulsemod',
                               length=50e-9,
                               amplitude=0)

    msmt.TIQ = pulse.SquarePulse(channel='MW_Imod', length=10e-9, amplitude=0)

    # some not yet specified pulse on the electron
    msmt.e_pulse = pulselib.MW_IQmod_pulse(
        'MW pulse',
        I_channel='MW_Imod',
        Q_channel='MW_Qmod',
        PM_channel='MW_pulsemod',
        PM_risetime=msmt.params['MW_pulse_mod_risetime'])

    msmt.CORPSE_pi = pulselib.MW_CORPSE_pulse(
        'CORPSE pi-pulse',
        MW_channel='MW_Imod',
        PM_channel='MW_pulsemod',
        second_MW_channel='MW_Qmod',
        PM_risetime=msmt.params['MW_pulse_mod_risetime'],
        amplitude=msmt.params['CORPSE_pi_amp'],
        rabi_frequency=msmt.params['CORPSE_rabi_frequency'],
        eff_rotation_angle=180)
    msmt.CORPSE_pi2 = pulselib.MW_CORPSE_pulse(
        'CORPSE pi2-pulse',
        MW_channel='MW_Imod',
        PM_channel='MW_pulsemod',
        second_MW_channel='MW_Qmod',
        PM_risetime=msmt.params['MW_pulse_mod_risetime'],
        amplitude=msmt.params['CORPSE_pi2_amp'],
        rabi_frequency=msmt.params['CORPSE_rabi_frequency'],
        eff_rotation_angle=90)
    msmt.CORPSE_RND0 = pulselib.MW_CORPSE_pulse(
        'CORPSE pi2-pulse',
        MW_channel='MW_Imod',
        PM_channel='MW_pulsemod',
        PM_risetime=msmt.params['MW_pulse_mod_risetime'],
        amplitude=msmt.params['CORPSE_RND_amp'],
        rabi_frequency=msmt.params['CORPSE_rabi_frequency'],
        eff_rotation_angle=msmt.params['RND_angle_0'])
    msmt.CORPSE_RND1 = pulselib.MW_CORPSE_pulse(
        'CORPSE pi2-pulse',
        MW_channel='MW_Qmod',
        PM_channel='MW_pulsemod',
        PM_risetime=msmt.params['MW_pulse_mod_risetime'],
        amplitude=msmt.params['CORPSE_RND_amp'],
        rabi_frequency=msmt.params['CORPSE_rabi_frequency'],
        eff_rotation_angle=msmt.params['RND_angle_1'])

    msmt.eom_pulse = eom_pulses.EOMAOMPulse(
        'Eom Aom Pulse',
        eom_channel='EOM_Matisse',
        aom_channel='EOM_AOM_Matisse',
        eom_pulse_duration=msmt.params['eom_pulse_duration'],
        eom_off_duration=msmt.params['eom_off_duration'],
        eom_off_amplitude=msmt.params['eom_off_amplitude'],
        eom_pulse_amplitude=msmt.params['eom_pulse_amplitude'],
        eom_overshoot_duration1=msmt.params['eom_overshoot_duration1'],
        eom_overshoot1=msmt.params['eom_overshoot1'],
        eom_overshoot_duration2=msmt.params['eom_overshoot_duration2'],
        eom_overshoot2=msmt.params['eom_overshoot2'],
        aom_risetime=msmt.params['aom_risetime'],
        aom_amplitude=msmt.params['aom_amplitude'])

    msmt.RND_halt_off_pulse = pulse.SquarePulse(
        channel='RND_halt', amplitude=-2.0, length=msmt.params['RND_duration'])

    ### synchronizing, etc
    msmt.adwin_trigger_pulse = pulse.SquarePulse(channel='adwin_sync',
                                                 length=5e-6,
                                                 amplitude=2)
    msmt.adwin_success_pulse = pulse.SquarePulse(
        channel='adwin_success_trigger', length=5e-6, amplitude=2)
    msmt.sync = pulse.SquarePulse(channel='sync', length=50e-9, amplitude=1.0)

    msmt.SP_pulse = pulse.SquarePulse(channel='AOM_Newfocus', amplitude=1.0)
    msmt.RO_pulse = pulse.SquarePulse(channel='AOM_Matisse', amplitude=0.0)
    msmt.yellow_pulse = pulse.SquarePulse(channel='AOM_Yellow', amplitude=1.0)

    return True
    def generate_sequence(self):
 
        self.sweep_bell_seq = pulsar.Sequence('Bell_sweep')
        
        elements = [] 

        for i in range(self.params['pts']):
            if self.params['do_general_sweep'] :
                self.params[self.params['general_sweep_name']] = self.params['general_sweep_pts'][i]
                #self.params['eom_off_duration'] = self.params['opt_pulse_separation']/4.
            self.params['mw_frq'] = self.params['ms-1_cntr_frq']-self.params['MW_pulse_mod_frequency'] 
            self.params['pulse_pi_amp'] = self.params['IQ_Square_pi_amp']
            self.params['pulse_pi2_amp'] = self.params['IQ_Square_pi2_amp']
            IQ_Square_pi = pulselib.MW_IQmod_pulse('Square pi-pulse',
                    I_channel='MW_Imod',
                    Q_channel='MW_Qmod',
                    PM_channel='MW_pulsemod',
                    length = self.params['MW_pi_duration'],
                    amplitude = self.params['pulse_pi_amp'],
                    phase = self.params['mw_pi_phase'],
                    frequency = self.params['MW_pulse_mod_frequency'],
                    PM_risetime = self.params['MW_pulse_mod_risetime'])
            IQ_Square_pi2 = pulselib.MW_IQmod_pulse('Square pi/2-pulse',
                    I_channel='MW_Imod',
                    Q_channel='MW_Qmod',
                    PM_channel='MW_pulsemod',
                    length = self.params['MW_pi2_duration'],
                    amplitude = self.params['pulse_pi2_amp'],
                    phase = self.params['mw_pi2_phase_1'],
                    frequency = self.params['MW_pulse_mod_frequency'],
                    PM_risetime = self.params['MW_pulse_mod_risetime'])
            pulse_pi=IQ_Square_pi
            pulse_pi2=IQ_Square_pi2

            if self.params['setup'] == 'lt4':
                bseq.pulse_defs_lt4(self)
            elif self.params['setup'] == 'lt3':
                bseq.pulse_defs_lt3(self)  

            finished_element = bseq._lt3_sequence_finished_element(self)

            e = element.Element('sweep_el_{}'.format(i), 
                pulsar = qt.pulsar, 
                global_time = True)  
            
            e.add(pulse.cp(self.SP_pulse,
                    amplitude = 0,
                    length = self.joint_params['LDE_element_length']))
            
            #1 SP
            e.add(pulse.cp(self.SP_pulse, 
                    amplitude = 0, 
                    length = self.joint_params['initial_delay']),
                name = 'initial_delay')
            
            e.add(pulse.cp(self.SP_pulse, 
                    length = self.params['LDE_SP_duration'], 
                    amplitude = 1.0), 
                name = 'spinpumping', 
                refpulse = 'initial_delay')

            if self.params['sync_during_LDE'] == 1 :
                e.add(self.sync,
                    refpulse = 'initial_delay')

            for j in range(self.joint_params['opt_pi_pulses']):
                name = 'opt pi {}'.format(j+1)
                refpulse = 'opt pi {}'.format(j) if j > 0 else 'initial_delay'
                start = self.params['opt_pulse_separation'] if j > 0 else self.params['opt_pulse_start']
                refpoint = 'start' if j > 0 else 'end'

                e.add(self.eom_pulse,        
                    name = name, 
                    start = start,
                    refpulse = refpulse,
                    refpoint = refpoint,)

            #4 MW pi/2
            e.add(pulse.cp(pulse_pi2,phase =self.params['mw_pi2_phase_1']), 
                    start = -self.params['MW_opt_puls1_separation'],
                    refpulse = 'opt pi 1', 
                    refpoint = 'start', 
                    refpoint_new = 'end',
                    name = 'MW_first_pi2')
            #5 HHsync

            #8 MW pi 
            e.add(pulse_pi, 
                    start = self.params['MW_1_separation'],
                    refpulse = 'MW_first_pi2',
                    refpoint = 'end', 
                    refpoint_new = 'end', 
                    name='MW_pi')


            # 14 MW pi/2 pulse
            e.add(pulse.cp(pulse_pi2,phase =self.params['mw_pi2_phase_2']), 
                        start = self.params['MW_1_separation'],
                        refpulse = 'MW_pi', 
                        refpoint = 'start', 
                        refpoint_new = 'start',
                        name='MW_final_pi2')
            
            elements.append(e)

            
            self.sweep_bell_seq.append(name = 'Bell sweep {}'.format(i),
                wfname = e.name,
                trigger_wait = self.params['trigger_wait'],
                repetitions = self.joint_params['LDE_attempts_before_CR'])
            
            self.sweep_bell_seq.append(name = 'Bell sweep done {}'.format(i),
                wfname = finished_element.name,
                trigger_wait = False)

        elements.append(finished_element)
        #qt.pulsar.upload(*elements)
        #qt.pulsar.program_sequence(self.sweep_bell_seq)
        qt.pulsar.program_awg(self.sweep_bell_seq,*elements)
    def generate_sequence(self, upload=True):

        #define the pulses
        sync = pulse.SquarePulse(channel='sync',
                                 length=self.params['pq_sync_length'],
                                 amplitude=1.0)

        sq_AOMpulse = pulse.SquarePulse(channel='AOM_Green',
                                        name='Green_square')
        sq_AOMpulse.amplitude = 1  #sets the marker high
        sq_AOMpulse.length = self.params['GreenAOM_pulse_length']

        adwin_trigger_pulse = pulse.SquarePulse(channel='adwin_sync',
                                                length=1590e-9,
                                                amplitude=2)
        X = pulselib.MW_IQmod_pulse(
            'Rabi_MW_pulse',
            I_channel='MW_Imod',
            Q_channel='MW_Qmod',
            PM_channel='MW_pulsemod',
            amplitude=self.params['ssbmod_amplitude'],
            frequency=self.params['MW_modulation_frequency'],
            PM_risetime=self.params['MW_pulse_mod_risetime'])
        T = pulse.SquarePulse(channel='MW_Imod', name='Wait', length=500e-9)

        seq = pulsar.Sequence('RabiOsci sequence')
        #need one spin polarization pulse at the beginning.
        init = element.Element('initialize', pulsar=qt.pulsar)
        init.add(pulse.cp(sq_AOMpulse, length=1e-6, amplitude=0), name='wait')
        init.add(sq_AOMpulse, name='init', refpulse='wait')

        #generate a list of pulse elements. One for each modulation freuqency
        elements = []
        elements.append(init)

        seq.append(name=init.name, wfname=init.name, trigger_wait=True)
        for k, t in enumerate(self.params['sweep_pts']):

            e = element.Element('Rabi_length-%d' % k, pulsar=qt.pulsar)
            if k == 0:
                first_dp_element = e.name
            e.add(T(length=1500e-9), name='wait')
            e.add(adwin_trigger_pulse,
                  name='adwin_trigger',
                  refpulse='wait',
                  refpoint='start')

            e.add(X(length=self.params['MW_pulse_durations'][k],
                    frequency=self.params['MW_modulation_frequencies'][k]),
                  name='MWpulse',
                  refpulse='wait',
                  refpoint='end')
            e.add(T, name='wait2', refpulse='MWpulse', refpoint='end')
            e.add(sq_AOMpulse,
                  name='GreenLight',
                  refpulse='wait2',
                  refpoint='end')
            e.add(sync, name='Sync', refpulse='wait2', refpoint='end')
            e.add(pulse.cp(T, length=self.params['time_between_syncs']),
                  name='wait3',
                  refpulse='Sync',
                  refpoint='end')
            e.add(sync, name='Sync2', refpulse='wait3', refpoint='end')

            elements.append(e)
            seq.append(name=e.name,
                       wfname=e.name,
                       trigger_wait=False,
                       jump_target=init.name)

        #insert a delay at the end of the sequence such that all outputs of the AWG stay low.
        end = element.Element('ending delay', pulsar=qt.pulsar)
        end.add(pulse.cp(sq_AOMpulse, length=1e-6, amplitude=0), name='delay')
        elements.append(end)
        seq.append(name=end.name,
                   wfname=end.name,
                   goto_target=first_dp_element,
                   jump_target=init.name)

        if upload:
            if upload == 'old_method':
                qt.pulsar.upload(*elements)
                qt.pulsar.program_sequence(seq, loop=False)
            else:
                qt.pulsar.program_awg(seq, *elements, loop=False)
Beispiel #27
0
    def generate_sequence(self):

        #define the pulses
        sq_p7889=pulse.SquarePulse(channel='p7889_start',name='p7889_square',amplitude=1) 
        sq_p7889.length=1e-6 #is the length of the p7889 start pulse a problem?? ## changed from 2e-6 to 1e-6

        sq_AOMpulse=pulse.SquarePulse(channel='AOM_Green',name='Green_square')
        sq_AOMpulse.amplitude=1 #sets the marker high
        sq_AOMpulse.length=self.params['GreenAOM_pulse_length']
        wait = pulse.SquarePulse(channel='AOM_Green',name='Green_square')
        wait.amplitude = 0
        wait.length=2e-6

        X = pulselib.MW_IQmod_pulse('Rabi_MW_pulse',
            I_channel='MW_Imod', Q_channel='MW_Qmod',
            PM_channel='MW_pulsemod',
            amplitude = self.params['ssbmod_amplitude'],
            frequency = self.params['ssbmod_frequency'],
            PM_risetime = self.params['MW_pulse_mod_risetime'])

        #need one spin polarization pulse at the beginning.
        init=element.Element('initialize',pulsar=qt.pulsar)
        init.add(pulse.cp(sq_AOMpulse,length=1e-6,amplitude=0),name='wait')
        init.add(sq_AOMpulse,name='init',refpulse='wait')
        init.add(wait,name='init_wait',refpulse='init')

        #generate a list of pulse elements. One for each modulation freuqency
        elements=[]
        elements.append(init)
        
            # old sequence MJD
            # e=element.Element('Rabi_length-%d' % k,pulsar=qt.pulsar)
            # e.add(pulse.cp(wait,length=2e-6,amplitude=0),name='wait_int')
            # e.add(X(length=t),name='MWpulse',refpulse='wait_int',refpoint='end')
            # e.add(sq_p7889,name='p7889Start',refpulse='MWpulse',refpoint='end')
            # e.add(sq_AOMpulse,start=1e-6,name='GreenLight',refpulse='p7889Start',refpoint='end')
            # e.add(pulse.cp(sq_AOMpulse,length=50e-9,amplitude=0),name='wait',refpulse='GreenLight')
            # elements.append(e)
        


        for k,t in enumerate(self.params['sweep_pts']/1.e6):

            e=element.Element('Rabi_length-%d' % k,pulsar=qt.pulsar)
            e.add(pulse.cp(wait,length=-1e-6,amplitude=0),name='wait_int')
            e.add(X(length=t),name='MWpulse',refpulse='wait_int',refpoint='end')
            e.add(sq_p7889,name='p7889Start',start=0.4e-6,refpulse='MWpulse',refpoint='end')
            e.add(sq_AOMpulse,start=2.1e-6,name='GreenLight',refpulse='p7889Start',refpoint='start')
            elements.append(e)
        # was 1.7 before the AOM greenlight pulse
        # was 0.8 before the p7889Start
        # wait length before was 1 e-6 but because there is a false delay in the green line (i guess, it doesn't work)
        # wait length adjusted was -1.6e-6
        # Start p7889start adjusted 0.4e-6
        # Greenlight start adjusted 2.1e-6


        #insert a delay at the end of the sequence such that all outputs of the AWG stay low.
        end=element.Element('ending delay',pulsar=qt.pulsar)
        end.add(pulse.cp(sq_AOMpulse,length=1e-6,amplitude=0),name='delay')
        elements.append(end)

        #create a sequence from the gathered elements
        seq=pulsar.Sequence('RabiOsci sequence p7889')
        for e in elements:
            seq.append(name=e.name,wfname=e.name)

        #upload to AWG
        qt.pulsar.program_awg(seq,*elements)
    def generate_sequence(self, upload=True):

        #define the pulses
        sync = pulse.SquarePulse(channel='sync',
                                 length=self.params['pq_sync_length'],
                                 amplitude=1.0)

        sq_AOMpulse = pulse.SquarePulse(channel='AOM_Green',
                                        name='Green_square')
        sq_AOMpulse.amplitude = 1  #sets the marker high
        sq_AOMpulse.length = self.params['GreenAOM_pulse_length']

        adwin_trigger_pulse = pulse.SquarePulse(channel='adwin_sync',
                                                length=1590e-9,
                                                amplitude=2)
        X = pulselib.MW_IQmod_pulse(
            'Rabi_MW_pulse',
            I_channel='MW_Imod',
            Q_channel='MW_Qmod',
            PM_channel='MW_pulsemod',
            amplitude=self.params['fast_pi2_amp'],
            frequency=self.params['fast_pi2_mod_frq'],
            PM_risetime=self.params['MW_pulse_mod_risetime'])
        X_pi = pulselib.MW_IQmod_pulse(
            'electron X-Pi-pulse',
            I_channel='MW_Imod',
            Q_channel='MW_Qmod',
            PM_channel='MW_pulsemod',
            amplitude=self.params['fast_pi_amp'],
            frequency=self.params['fast_pi_mod_frq'],
            PM_risetime=self.params['MW_pulse_mod_risetime'],
            length=self.params['fast_pi_duration'],
            phase=self.params['X_phase'])
        wait_before_MW = 500e-9
        T = pulse.SquarePulse(channel='MW_Imod',
                              name='Wait',
                              length=wait_before_MW)

        seq = pulsar.Sequence('Hahn sequence')
        #need one spin polarization pulse at the beginning.
        init = element.Element('initialize', pulsar=qt.pulsar)
        init.add(pulse.cp(sq_AOMpulse, length=1e-6, amplitude=0), name='wait')
        init.add(sq_AOMpulse, name='init', refpulse='wait')

        #generate a list of pulse elements. One for each modulation freuqency
        elements = []
        elements.append(init)

        seq.append(name=init.name, wfname=init.name, trigger_wait=True)
        for k, t in enumerate(self.params['sweep_pts']):

            e = element.Element('Hahn-%d' % k,
                                pulsar=qt.pulsar,
                                global_time=True)
            if k == 0:
                first_dp_element = e.name
            e.add(T(length=1500e-9), name='wait')
            e.add(adwin_trigger_pulse,
                  name='adwin_trigger',
                  refpulse='wait',
                  refpoint='start')
            e.add(X(length=self.params['fast_pi2_duration'], phase=0),
                  name='MWpulse',
                  refpulse='wait',
                  refpoint='end')

            # if waiting times are long: implement tau by repeating a 1 us element in AWG. Saves memory
            if self.params['free_evolution_times'][k] > 5e-6:
                # Implement one waiting period tau
                free_evol_us = int(
                    self.params['free_evolution_times'][k] * 1e6) - 4

                free_evol_around_pi2 = (self.params['free_evolution_times'][k]
                                        - free_evol_us * 1e-6) / 2.
                e.add(T(length=free_evol_around_pi2),
                      name='tau_1_first_part',
                      refpulse='MWpulse',
                      refpoint='end')
                elements.append(e)
                t_offset = e.length()
                seq.append(name=e.name,
                           wfname=e.name,
                           trigger_wait=False,
                           jump_target=init.name)

                e = element.Element('Hahn-%d-tau_1_waiting_time' % k,
                                    pulsar=qt.pulsar,
                                    global_time=True)
                e.add(T(length=1e-6), name='tau')
                elements.append(e)
                seq.append(name=e.name,
                           wfname=e.name,
                           trigger_wait=False,
                           jump_target=init.name,
                           repetitions=free_evol_us)

                t_offset += e.length(
                ) * free_evol_us  # make sure two pi/2 pulses (27-3-2015: pi/2 pulse and pi pulse?) have same time reference
                e = element.Element('Hahn-%d-tau_1_second_part' % k,
                                    pulsar=qt.pulsar,
                                    global_time=True,
                                    time_offset=t_offset)
                e.add(T(length=free_evol_around_pi2), name='tau_1_third_part')

                # # X Pi pulse
                e.add(X_pi(),
                      name='pi_pulse',
                      refpulse='tau_1_third_part',
                      refpoint='end')

                # Implement one waiting period tau
                free_evol_us = int(
                    self.params['free_evolution_times'][k] * 1e6) - 4

                free_evol_around_pi2 = (self.params['free_evolution_times'][k]
                                        - free_evol_us * 1e-6) / 2.
                e.add(T(length=free_evol_around_pi2),
                      name='tau_2_first_part',
                      refpulse='pi_pulse',
                      refpoint='end')
                elements.append(e)
                t_offset = e.length()
                seq.append(name=e.name,
                           wfname=e.name,
                           trigger_wait=False,
                           jump_target=init.name)

                e = element.Element('Hahn-%d-tau_2_waiting_time' % k,
                                    pulsar=qt.pulsar,
                                    global_time=True)
                e.add(T(length=1e-6), name='tau')
                elements.append(e)
                seq.append(name=e.name,
                           wfname=e.name,
                           trigger_wait=False,
                           jump_target=init.name,
                           repetitions=free_evol_us)

                t_offset += e.length(
                ) * free_evol_us  # make sure two pi/2 pulses (27-3-2015: pi/2 pulse and pi pulse?) have same time reference
                e = element.Element('Hahn-%d-tau_2_second_part' % k,
                                    pulsar=qt.pulsar,
                                    global_time=True,
                                    time_offset=t_offset)
                e.add(T(length=free_evol_around_pi2), name='tau_2_third_part')

                # Last pi/2 pulse
                # e.add(X(length=self.params['fast_pi2_duration'],phase=self.params['second_pi2_phases'][k]),name='MWpulse2',refpulse='tau_2_third_part',refpoint='end')
                e.add(X(length=self.params['fast_pi2_duration'], phase=180),
                      name='MWpulse2',
                      refpulse='tau_2_third_part',
                      refpoint='end')
            else:
                e.add(T(length=self.params['free_evolution_times'][k]),
                      name='tau1',
                      refpulse='MWpulse',
                      refpoint='end')
                e.add(X_pi(), name='pi_pulse', refpulse='tau1', refpoint='end')
                e.add(T(length=self.params['free_evolution_times'][k]),
                      name='tau2',
                      refpulse='tau1',
                      refpoint='end')
                # e.add(X(length=self.params['fast_pi2_duration'],phase=self.params['second_pi2_phases'][k]),name='MWpulse2',refpulse='tau2',refpoint='end')
                # pi/2 (-x)
                e.add(X(length=self.params['fast_pi2_duration'], phase=180),
                      name='MWpulse2',
                      refpulse='tau2',
                      refpoint='end')
            e.add(T, name='wait2', refpulse='MWpulse2', refpoint='end')
            e.add(sq_AOMpulse,
                  name='GreenLight',
                  refpulse='wait2',
                  refpoint='end')
            e.add(sync, name='Sync', refpulse='wait2', refpoint='end')
            e.add(pulse.cp(T, length=self.params['time_between_syncs']),
                  name='wait3',
                  refpulse='Sync',
                  refpoint='end')
            e.add(sync, name='Sync2', refpulse='wait3', refpoint='end')

            elements.append(e)
            seq.append(name=e.name,
                       wfname=e.name,
                       trigger_wait=False,
                       jump_target=init.name)

        #insert a delay at the end of the sequence such that all outputs of the AWG stay low.
        end = element.Element('ending delay', pulsar=qt.pulsar)
        end.add(pulse.cp(sq_AOMpulse, length=1e-6, amplitude=0), name='delay')
        elements.append(end)
        seq.append(name=end.name,
                   wfname=end.name,
                   goto_target=first_dp_element,
                   jump_target=init.name)

        #create a sequence from the gathered elements

        #for e in elements:

        if upload:
            if upload == 'old_method':
                qt.pulsar.upload(*elements)
                qt.pulsar.program_sequence(seq, loop=False)
            else:
                qt.pulsar.program_awg(seq, *elements, loop=False)
Beispiel #29
0
def pulse_defs_lt1(msmt):

    # a waiting pulse on the MW pulsemod channel
    msmt.T = pulse.SquarePulse(channel='MW_pulsemod',
                               length=50e-9,
                               amplitude=0)

    msmt.TIQ = pulse.SquarePulse(channel='MW_Imod', length=10e-9, amplitude=0)

    # mw pulses
    msmt.e_pulse = pulselib.MW_IQmod_pulse(
        'MW pulse',
        I_channel='MW_Imod',
        Q_channel='MW_Qmod',
        PM_channel='MW_pulsemod',
        PM_risetime=msmt.params_lt1['MW_pulse_mod_risetime'])

    msmt.fast_pi = pulselib.MW_IQmod_pulse(
        'MW pi pulse',
        I_channel='MW_Imod',
        Q_channel='MW_Qmod',
        PM_channel='MW_pulsemod',
        PM_risetime=msmt.params_lt1['MW_pulse_mod_risetime'],
        frequency=msmt.params_lt1['fast_pi_mod_frq'],
        amplitude=msmt.params_lt1['fast_pi_amp'],
        length=msmt.params_lt1['fast_pi_duration'])

    msmt.fast_pi2 = pulselib.MW_IQmod_pulse(
        'MW pi2 pulse',
        I_channel='MW_Imod',
        Q_channel='MW_Qmod',
        PM_channel='MW_pulsemod',
        PM_risetime=msmt.params_lt1['MW_pulse_mod_risetime'],
        frequency=msmt.params_lt1['fast_pi2_mod_frq'],
        amplitude=msmt.params_lt1['fast_pi2_amp'],
        length=msmt.params_lt1['fast_pi2_duration'])

    msmt.slow_pi = pulselib.MW_IQmod_pulse(
        'slow pi',
        I_channel='MW_Imod',
        Q_channel='MW_Qmod',
        PM_channel='MW_pulsemod',
        PM_risetime=msmt.params_lt1['MW_pulse_mod_risetime'],
        frequency=msmt.params_lt1['selective_pi_mod_frq'],
        amplitude=msmt.params_lt1['selective_pi_amp'],
        length=msmt.params_lt1['selective_pi_duration'])

    msmt.shelving_pulse = pulselib.MW_IQmod_pulse(
        'MBI shelving pulse',
        I_channel='MW_Imod',
        Q_channel='MW_Qmod',
        PM_channel='MW_pulsemod',
        frequency=msmt.params_lt1['AWG_MBI_MW_pulse_mod_frq'],
        amplitude=msmt.params_lt1['fast_pi_amp'],
        length=msmt.params_lt1['fast_pi_duration'],
        PM_risetime=msmt.params_lt1['MW_pulse_mod_risetime'])
    # CORPSE pi pulse

    msmt.CORPSE_pi = pulselib.IQ_CORPSE_pi_pulse(
        'CORPSE pi-pulse',
        I_channel='MW_Imod',
        Q_channel='MW_Qmod',
        PM_channel='MW_pulsemod',
        PM_risetime=msmt.params_lt1['MW_pulse_mod_risetime'],
        frequency=msmt.params_lt1['CORPSE_pi_mod_frq'],
        amplitude=msmt.params_lt1['CORPSE_pi_amp'],
        length_60=msmt.params_lt1['CORPSE_pi_60_duration'],
        length_m300=msmt.params_lt1['CORPSE_pi_m300_duration'],
        length_420=msmt.params_lt1['CORPSE_pi_420_duration'])

    # CNOT operations on the electron
    msmt.pi2pi_m1 = pulselib.MW_IQmod_pulse(
        'pi2pi pulse mI=-1',
        I_channel='MW_Imod',
        Q_channel='MW_Qmod',
        PM_channel='MW_pulsemod',
        PM_risetime=msmt.params_lt1['MW_pulse_mod_risetime'],
        frequency=msmt.params_lt1['pi2pi_mIm1_mod_frq'],
        amplitude=msmt.params_lt1['pi2pi_mIm1_amp'],
        length=msmt.params_lt1['pi2pi_mIm1_duration'])

    msmt.pi2pi_0 = pulselib.MW_IQmod_pulse(
        'pi2pi pulse mI=0',
        I_channel='MW_Imod',
        Q_channel='MW_Qmod',
        PM_channel='MW_pulsemod',
        PM_risetime=msmt.params_lt1['MW_pulse_mod_risetime'],
        frequency=msmt.params_lt1['pi2pi_mI0_mod_frq'],
        amplitude=msmt.params_lt1['pi2pi_mI0_amp'],
        length=msmt.params_lt1['pi2pi_mI0_duration'])

    # rf pulses
    msmt.TN = pulse.SquarePulse(channel='RF', length=100e-9, amplitude=0)

    msmt.N_pulse = pulselib.RF_erf_envelope(
        channel='RF', frequency=msmt.params_lt1['N_0-1_splitting_ms-1'])

    msmt.N_pi = pulselib.RF_erf_envelope(
        channel='RF',
        frequency=msmt.params_lt1['N_0-1_splitting_ms-1'],
        length=msmt.params_lt1['N_pi_duration'],
        amplitude=msmt.params_lt1['N_pi_amp'])

    msmt.N_pi2 = pulselib.RF_erf_envelope(
        channel='RF',
        frequency=msmt.params_lt1['N_0-1_splitting_ms-1'],
        length=msmt.params_lt1['N_pi2_duration'],
        amplitude=msmt.params_lt1['N_pi2_amp'])

    ### synchronizing, etc
    msmt.adwin_lt1_trigger_pulse = pulse.SquarePulse(channel='adwin_sync',
                                                     length=10e-6,
                                                     amplitude=2)

    msmt.adwin_lt1_trigger_pulse_mbi = pulse.SquarePulse(channel='adwin_sync',
                                                         length=17e-6,
                                                         amplitude=2)
    # mbi pulse trigger should be longer, because it needs to receive a jump from the ADwin while still going.
    # it also needs to be short enough such that it is finished when the ADWin triggers the next element

    msmt.AWG_LT2_trigger_pulse = pulse.SquarePulse(channel='AWG_LT2_trigger',
                                                   length=10e-9,
                                                   amplitude=2)

    msmt.HH_sync = pulse.SquarePulse(channel='HH_sync',
                                     length=50e-9,
                                     amplitude=1.0)

    # light
    msmt.SP_pulse = pulse.SquarePulse(channel='Velocity1AOM', amplitude=1.0)
    msmt.yellow_pulse = pulse.SquarePulse(channel='YellowAOM', amplitude=1.0)
    def generate_sequence(self, upload=True):
        #rewrite
        chan_hhsync = 'HH_sync'  # historically PH_start
        chan_hh_ma1 = 'HH_MA1'  # historically PH_sync
        chan_plusync = 'PLU_gate'

        self.chan_adwin_sync = 'adwin_sync'
        self.chan_nf_aom = 'AOM_Newfocus'
        self.chan_mwI = 'MW_Imod'
        self.chan_mwQ = 'MW_Qmod'
        self.chan_mw_pm = 'MW_pulsemod'

        chan_yellowlaser = 'AOM_Yellow'
        chan_eom = 'EOM_Matisse'
        chan_eom_aom = 'EOM_AOM_Matisse'

        qt.pulsar.set_channel_opt(self.chan_nf_aom, 'high',
                                  self.params['AWG_A_SP_voltage'])
        qt.pulsar.set_channel_opt(chan_yellowlaser, 'high',
                                  self.params['AWG_yellow_voltage'])
        #qt.pulsar.set_channel_opt(chan_eom_aom,'low', 0.1)
        # MBI element
        e_mbi = self._MBI_element()

        # LDE element
        e_lde = element.Element('lde', pulsar=qt.pulsar)

        # 1: spin pumping
        p_wait = pulse.SquarePulse(self.chan_nf_aom,
                                   'initialdelay',
                                   length=10e-9,
                                   amplitude=0)
        last = e_lde.add(p_wait)

        p_sp = pulse.SquarePulse(self.chan_nf_aom,
                                 'spinpumping',
                                 length=self.params['AWG_SP_duration'],
                                 amplitude=1)
        p_yellow = pulse.SquarePulse(chan_yellowlaser,
                                     'yellowpumping',
                                     length=self.params['AWG_yellow_duration'],
                                     amplitude=1)
        e_lde.add(p_yellow, refpulse=last, refpoint='end')
        last = e_lde.add(p_sp, refpulse=last, refpoint='end')

        p_sync = pulse.SquarePulse(chan_hhsync,
                                   'debug_sync',
                                   length=50e-9,
                                   amplitude=1)
        p_hh_marker = pulse.SquarePulse(chan_hh_ma1,
                                        'hh_marker',
                                        length=50e-9,
                                        amplitude=1)
        P_eom_aom = EOMAOMPulse(chan_eom, chan_eom_aom, 'opt_pi',
                                **self.eom_pars)

        #pi/2
        p_pi2 = pulselib.MW_IQmod_pulse(
            'mw_pi2',
            I_channel=self.chan_mwI,
            Q_channel=self.chan_mwQ,
            PM_channel=self.chan_mw_pm,
            PM_risetime=self.params['MW_pulse_mod_risetime'],
            length=self.params['4MHz_pi2_duration'],
            amplitude=self.params['4MHz_pi2_amp'],
            frequency=self.params['4MHz_pi2_mod_frq'],
        )
        last = e_lde.add(p_pi2,
                         refpulse=last,
                         refpoint='end',
                         start=self.params['wait_after_sp'])
        # opt pi 1
        i = 1
        if self.params['long_histogram']:
            e_lde.add(p_sync)
            hhsync_amp = 0
        else:
            hhsync_amp = 1

        last = e_lde.add(pulse.cp(p_sync(amplitude=hhsync_amp)),
                         name='start' + str(i),
                         start=self.params['wait_after_pi2'],
                         refpulse=last,
                         refpoint='end')
        e_lde.add(p_hh_marker,
                  name='mrkr' + str(i),
                  start=-20e-9,
                  refpulse=last,
                  refpoint='start')
        last = e_lde.add(pulse.cp(p_sync(amplitude=0)),
                         name='start' + str(i) + 'delay',
                         refpulse=last,
                         refpoint='end')

        last = e_lde.add(P_eom_aom,
                         name='eom_pulse' + str(i),
                         start=self.params['eom_start'],
                         refpulse=last,
                         refpoint='start')

        #pi
        p_pi = pulselib.MW_IQmod_pulse(
            'mw_pi',
            I_channel=self.chan_mwI,
            Q_channel=self.chan_mwQ,
            PM_channel=self.chan_mw_pm,
            PM_risetime=self.params['MW_pulse_mod_risetime'],
            length=self.params['4MHz_pi_duration'],
            amplitude=self.params['4MHz_pi_amp'],
            frequency=self.params['4MHz_pi_mod_frq'],
        )
        e_lde.add(p_pi,
                  refpulse=last,
                  refpoint='start',
                  start=self.params['wait_after_opt_pi'])
        # opt pi 2

        i = 2

        last = e_lde.add(pulse.cp(p_sync(amplitude=hhsync_amp)),
                         name='start' + str(i),
                         start=self.params['opt_pi_separation'],
                         refpulse='start' + str(i - 1),
                         refpoint='start')
        last = e_lde.add(pulse.cp(p_sync(amplitude=0)),
                         name='start' + str(i) + 'delay',
                         refpulse=last,
                         refpoint='end')

        last = e_lde.add(P_eom_aom,
                         name='eom_pulse' + str(i),
                         start=self.params['eom_start'],
                         refpulse=last,
                         refpoint='start')

        #pi/2
        e_lde.add(p_pi2,
                  refpulse=last,
                  refpoint='start',
                  start=self.params['wait_after_opt_pi2'])

        #final delay
        e_lde.add(pulse.cp(p_wait(length=self.params['finaldelay'])),
                  refpulse=last,
                  refpoint='end')

        #final SP element
        e_sp_final = element.Element('sp_final', pulsar=qt.pulsar)
        e_sp_final.append(
            pulse.cp(p_sp(length=self.params['AWG__finalSP_duration'])))

        #RO element
        e_ro = element.Element('readout', pulsar=qt.pulsar)
        p_RO = pulselib.MW_IQmod_pulse(
            'readout pulse',
            I_channel=self.chan_mwI,
            Q_channel=self.chan_mwQ,
            PM_channel=self.chan_mw_pm,
            PM_risetime=int(self.params['MW_pulse_mod_risetime']),
            length=self.params['AWG_RO_MW_pulse_duration'],
            amplitude=self.params['AWG_RO_MW_pulse_amp'],
            frequency=self.params['AWG_RO_MW_pulse_ssbmod_frq'])

        p_ROsync = pulse.SquarePulse(
            self.chan_adwin_sync,
            'adwin_sync',
            length=self.params['AWG_to_adwin_ttl_trigger_duration'],
            amplitude=1)
        e_ro.append(pulse.cp(p_wait(length=200e-9)))
        last = e_ro.append(p_RO)
        e_ro.add(p_ROsync, refpoint=last, start=50e-9)

        seq = pulsar.Sequence('LDE protocol test sequence wo MW')

        for i, r in enumerate(self.params['protocol_reps_sweep']):
            #print i, r
            # 1: MBI
            seq.append(name='MBI-%d' % i,
                       wfname=e_mbi.name,
                       trigger_wait=True,
                       goto_target='MBI-%d' % i,
                       jump_target='LDE-%d' % i)

            # 2: repeat LDE r times
            seq.append(name='LDE-%d' % i, wfname=e_lde.name, repetitions=r)

            # 3: spin pump a final time for the readout:
            seq.append(name='sp_final' + str(i), wfname=e_sp_final.name)
            seq.append(name='N_ro' + str(i), wfname=e_ro.name)

        if upload:
            qt.pulsar.upload(e_mbi, e_lde, e_sp_final, e_ro)
        qt.pulsar.program_sequence(seq)