Esempio n. 1
0
    def generate_sequence(self, upload=True):
        #print 'test'
        # define the necessary pulses

        X = pulselib.MW_pulse('Weak pi-pulse',
            MW_channel='MW_Imod',
            PM_channel='MW_pulsemod',
            PM_risetime = self.params['MW_pulse_mod_risetime'])

        T = pulse.SquarePulse(channel='MW_Qmod', 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)
Esempio n. 2
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'])

    if msmt.params['square_MW_pulses']:
        msmt.MW_pi = pulselib.MW_pulse(
            'Square 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'])

        msmt.MW_pi2 = pulselib.MW_pulse(
            'Square 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'])

        msmt.MW_first_pi2 = pulselib.MW_pulse(
            'Square 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_BellStateOffset'],
            length=msmt.params['MW_pi2_duration'],
            PM_risetime=msmt.params['MW_pulse_mod_risetime'])

        msmt.MW_RND_I = pulselib.MW_pulse(
            'Square 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'])
        msmt.MW_RND_Q = pulselib.MW_pulse(
            'Square 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'])
    else:

        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_first_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'] +
            msmt.params['MW_BellStateOffset'],
            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=msmt.params['MW_RND_I_ispi2'])
        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=msmt.params['MW_RND_Q_ispi2'])

    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_sample_hold_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='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=0.0,
                                      length=msmt.params['PLU_gate_duration'])

    return True
Esempio n. 3
0
    def generate_sequence(self, upload=True, debug=False):
        # MBI element

        if (self.params['do_MBI'] > 0):
            Ninit_elt = self._MBI_element()
        else:
            Ninit_elt = self._Ninit_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',
            PM_risetime=self.params['MW_pulse_mod_risetime'])

        FM = pulse.SquarePulse(channel='FM',
                               name='modulation',
                               amplitude=0,
                               length=20e-6)

        fpga_gate = pulselib.MW_pulse(name='fpga_gate_pulse',
                                      MW_channel='fpga_gate',
                                      amplitude=4.0,
                                      length=10e-9,
                                      PM_channel='MW_pulsemod',
                                      PM_risetime=20 *
                                      self.params['MW_pulse_mod_risetime'])

        clock_pulse = pulse.clock_train(channel='fpga_clock',
                                        amplitude=1,
                                        nr_up_points=2,
                                        nr_down_points=2,
                                        cycles=1000)

        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 np.arange(self.params['adptv_steps']):

            FM_duration = self.params['FM_delay'] + 2 * self.params[
                'MW_pulse_durations'][i] + self.params['fpga_mw_duration'][
                    i] + self.params['ramsey_time'][i] + 1e-6
            for j, FM_amp in enumerate(self.params['FM_amplitude']):
                #print 'FM_amp', FM_amp
                #print 'FM_duration', FM_duration
                e = element.Element('adpt_step_nr-%(v0)d_MWline%(v1)d' % {
                    "v0": i,
                    "v1": j
                },
                                    pulsar=qt.pulsar,
                                    global_time=True)
                last = e.add(pulse.cp(T, length=10e-9),
                             name='T1_%(v0)d_%(v1)d' % {
                                 "v0": i,
                                 "v1": j
                             })
                #print 'FM_%(v0)d_%(v1)d'% {"v0":i, "v1":j}
                last = e.add(pulse.cp(FM, amplitude=FM_amp,
                                      length=FM_duration),
                             name='FM_%(v0)d_%(v1)d' % {
                                 "v0": i,
                                 "v1": j
                             },
                             refpulse=last)
                last = e.add(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]),
                             name='first_pi2_%(v0)d_%(v1)d' % {
                                 "v0": i,
                                 "v1": j
                             },
                             refpulse=last,
                             start=self.params['FM_delay'],
                             refpoint='start')

                last = e.add(pulse.cp(T, length=self.params['ramsey_time'][i]),
                             name='tau_%(v0)d_%(v1)d' % {
                                 "v0": i,
                                 "v1": j
                             },
                             refpulse=last)

                if self.params['MW_only_by_awg']:
                    last = e.add(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],
                        phase=self.params['phase_second_pi2'][i]),
                                 name='second_pi2_%(v0)d_%(v1)d' % {
                                     "v0": i,
                                     "v1": j
                                 },
                                 refpulse=last)

                else:
                    last = e.add(pulse.cp(
                        fpga_gate,
                        amplitude=4.0,
                        length=self.params['fpga_mw_duration'][i]),
                                 name='fpga_gate_pulse_%(v0)d_%(v1)d' % {
                                     "v0": i,
                                     "v1": j
                                 },
                                 refpulse=last)
                    e.add(pulse.cp(
                        clock_pulse,
                        amplitude=1.0,
                        cycles=2000 +
                        int(0.25e9 * self.params['fpga_mw_duration'][i])),
                          name='fpga_clock_%(v0)d_%(v1)d' % {
                              "v0": i,
                              "v1": j
                          },
                          start=-5000e-9,
                          refpulse=last,
                          refpoint='start')
                last = 'FM_%(v0)d_%(v1)d' % {"v0": i, "v1": j}
                last = e.add(pulse.cp(T, length=10e-9),
                             name='T2_%(v0)d_%(v1)d' % {
                                 "v0": i,
                                 "v1": j
                             },
                             refpulse=last)
                if j != len(self.params['FM_amplitude']) - 1:
                    elts.append(e)
                else:
                    last = e.add(T, name='extra_wait', refpulse=last)
                    last = e.add(adwin_sync, name='adwin_sync', refpulse=last)

                    last = e.add(pulse.cp(T, length=100e-9),
                                 name='final_wait',
                                 refpulse=last)
                    elts.append(e)

        print 'Elements created...'
        #print 'N-spin init repetitions:', self.params['init_repetitions']
        # sequence
        seq = pulsar.Sequence('Adaptive phase-estimation sequence')
        for i, e in enumerate(elts):
            if (self.params['do_MBI'] > 0):
                seq.append(name='Ninit-dp_%(v0)d' % {"v0": i},
                           wfname=Ninit_elt.name,
                           trigger_wait=True,
                           goto_target='Ninit-dp_%(v0)d' % {"v0": i},
                           jump_target=e.name + 'dp_%(v0)d' % {"v0": i})
            #else:
            #print 'No nitrogen initialization'
            #seq.append(name = 'Ninit-dp_%(v0)d-adptvStep_%(v1)d' % {"v0":i, "v1":j}, wfname = Ninit_elt.name,
            #    trigger_wait = True, repetitions=self.params['init_repetitions'])
            if '_MWline0' in e.name:
                seq.append(name=e.name,
                           wfname=e.name,
                           trigger_wait=True,
                           repetitions=1)
            else:
                last_mw_pulse_str = 'MWline' + str(
                    len(self.params['FM_amplitude']) - 1)

                if last_mw_pulse_str in e.name:
                    last_adpt_step_str = 'adpt_step_nr-' + str(
                        self.params['adptv_steps'] - 1)
                    if last_adpt_step_str in e.name:
                        seq.append(
                            name=e.name,
                            wfname=e.name,
                            trigger_wait=False,
                            repetitions=1,
                            goto_target='adpt_step_nr-%(v0)d_MWline%(v1)d' % {
                                "v0": i / len(self.params['FM_amplitude']),
                                "v1": 0
                            },
                            jump_target='adpt_step_nr-%(v0)d_MWline%(v1)d' % {
                                "v0": 0,
                                "v1": 0
                            })

                    else:

                        seq.append(
                            name=e.name,
                            wfname=e.name,
                            trigger_wait=False,
                            repetitions=1,
                            goto_target='adpt_step_nr-%(v0)d_MWline%(v1)d' % {
                                "v0": i / len(self.params['FM_amplitude']),
                                "v1": 0
                            },
                            jump_target='adpt_step_nr-%(v0)d_MWline%(v1)d' % {
                                "v0": i / len(self.params['FM_amplitude']) + 1,
                                "v1": 0
                            })
                else:
                    seq.append(name=e.name,
                               wfname=e.name,
                               trigger_wait=False,
                               repetitions=1)
        # program AWG
        if upload:
            qt.pulsar.program_awg(seq,
                                  Ninit_elt,
                                  *elts,
                                  debug=debug,
                                  loop=False)
            print 'Done uploading!!'