Esempio n. 1
0
    def generate_sequence(self, upload=True):
        self._pulse_defs()

        seq = pulsar.Sequence('{}_{} sequence'.format(self.mprefix, self.name))

        elements = []
        elements.append(self.mbi_elt)
        elements.append(self.sync_elt)

        e = element.Element('H pulse', pulsar=qt.pulsar)
        e.append(self.T)
        e.append(self.shelving_pulse)
        e.append(pulse.cp(self.T, length=100e-9))
        n = e.append(
            pulse.cp(self.N_pulse,
                     frequency=self.N_pi.frequency -
                     self.params['N_rabi_frequency'],
                     length=self.N_pi.length / np.sqrt(2),
                     amplitude=1))
        t = e.length() - e.pulse_start_time(n, 'RF')

        e2 = element.Element('pi2', pulsar=qt.pulsar)
        e2.append(
            pulse.cp(self.N_pi2, phase=BSM.phaseref(self.N_pi2.frequency, t)))
        e2.append(self.TN)
        e2.append(pulse.cp(self.pi2pi_m1))

        elements.append(e2)

        for i in range(self.params['pts']):
            seq.append(name='MBI-{}'.format(i),
                       wfname=self.mbi_elt.name,
                       trigger_wait=True,
                       goto_target='MBI-{}'.format(i),
                       jump_target='H-{}'.format(i))

            e = element.Element('H pulse-{}'.format(i), pulsar=qt.pulsar)
            e.append(self.T)
            e.append(self.shelving_pulse)
            e.append(pulse.cp(self.T, length=100e-9))
            n = e.append(
                pulse.cp(self.N_pulse,
                         frequency=self.N_pi.frequency -
                         self.params['N_rabi_frequency'],
                         length=self.N_pi.length / np.sqrt(2),
                         amplitude=1,
                         phase=self.params['phases'][i]))
            elements.append(e)

            seq.append(name='H-{}'.format(i), wfname=e.name, trigger_wait=True)

            seq.append(name='pi2-{}'.format(i), wfname=e2.name)

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

        # program AWG
        if upload:
            qt.pulsar.upload(*elements)

        qt.pulsar.program_sequence(seq)
Esempio n. 2
0
    def get_sweep_elements(self):
        e = element.Element('Hadamard', pulsar=qt.pulsar)
        e.append(self.T)
        e.append(self.shelving_pulse)
        e.append(pulse.cp(self.T, length=100e-9))

        # this is for using the detuned pi pulse
        # prep_name = e.append(pulse.cp(self.N_pi2,
        #     phase = BSM.phaseref(self.N_pi2.frequency,
        #         -self.N_pi2.length) - 90.,
        #     amplitude = 1))

        # hadamard_name = e.append(pulse.cp(self.N_pulse,
        #     frequency = self.N_pi.frequency - self.params['N_rabi_frequency'],
        #     length = self.N_pi.length / np.sqrt(2),
        #     amplitude = 1,
        #     phase = 36.5))

        # t = e.length()-e.pulse_start_time(hadamard_name, 'RF')

        # this is by using two rotations around x/y -- This works much better!

        prep_name = e.append(pulse.cp(self.N_pi2, phase=-90, amplitude=1))

        # first a pi/2 over +Y
        h_pi2_name = e.append(
            pulse.cp(self.N_pi2,
                     phase=BSM.phaseref(self.N_pi2.frequency,
                                        e.pulse_length(prep_name)),
                     amplitude=1))

        # then a pi over +X
        h_pi_name = e.append(
            pulse.cp(
                self.N_pi,
                phase=BSM.phaseref(
                    self.N_pi2.frequency,
                    e.pulse_length(prep_name) + e.pulse_length(h_pi2_name)) +
                90.,
                amplitude=1))

        self.element = e
        self.params['tomo_time_offset'] = e.length() - e.pulse_start_time(
            prep_name, 'RF')

        return BSM.NTomo.get_sweep_elements(self)
Esempio n. 3
0
    def get_sweep_elements(self):
        e = element.Element('Hadamard', pulsar=qt.pulsar)
        e.append(self.T)
        e.append(self.shelving_pulse)
        e.append(pulse.cp(self.T, length=100e-9))
        
        # this is for using the detuned pi pulse
        # prep_name = e.append(pulse.cp(self.N_pi2,
        #     phase = BSM.phaseref(self.N_pi2.frequency, 
        #         -self.N_pi2.length) - 90.,
        #     amplitude = 1))

        # hadamard_name = e.append(pulse.cp(self.N_pulse,
        #     frequency = self.N_pi.frequency - self.params['N_rabi_frequency'],
        #     length = self.N_pi.length / np.sqrt(2),
        #     amplitude = 1,
        #     phase = 36.5))

        # t = e.length()-e.pulse_start_time(hadamard_name, 'RF')

        # this is by using two rotations around x/y -- This works much better!

        prep_name = e.append(pulse.cp(self.N_pi2,
            phase = -90,
            amplitude = 1))

        # first a pi/2 over +Y
        h_pi2_name = e.append(pulse.cp(self.N_pi2,
            phase = BSM.phaseref(self.N_pi2.frequency, 
                e.pulse_length(prep_name)),
            amplitude = 1))
        
        # then a pi over +X
        h_pi_name = e.append(pulse.cp(self.N_pi,
            phase = BSM.phaseref(self.N_pi2.frequency,
                e.pulse_length(prep_name)+e.pulse_length(h_pi2_name)) + 90.,
            amplitude = 1))

        self.element = e
        self.params['tomo_time_offset'] = e.length() - e.pulse_start_time(prep_name, 'RF')

        return BSM.NTomo.get_sweep_elements(self)
Esempio n. 4
0
    def get_sweep_elements(self):        
        
        e = element.Element('e1', pulsar=qt.pulsar)
        e.append(self.T)
        e.append(self.shelving_pulse)
        e.append(pulse.cp(self.T, length=100e-9))
        n = e.append(self.N_pi2)
        t = e.length()-e.pulse_start_time(n, 'RF')

        elts = []
        for i in range(self.params['pts']):            
            e2 = element.Element('e2-{}'.format(i), 
                pulsar=qt.pulsar)            
            e2.append(pulse.cp(self.N_pi2,
                phase = BSM.phaseref(self.N_pi2.frequency,t) + self.params['phases'][i]))
            e2.append(self.TN)
            # e2.append(self.pi2pi_m1)
            
            elts.append([e,e2])
        
        return elts
Esempio n. 5
0
    def get_sweep_elements(self):

        e = element.Element('e1', pulsar=qt.pulsar)
        e.append(self.T)
        e.append(self.shelving_pulse)
        e.append(pulse.cp(self.T, length=100e-9))
        n = e.append(self.N_pi2)
        t = e.length() - e.pulse_start_time(n, 'RF')

        elts = []
        for i in range(self.params['pts']):
            e2 = element.Element('e2-{}'.format(i), pulsar=qt.pulsar)
            e2.append(
                pulse.cp(self.N_pi2,
                         phase=BSM.phaseref(self.N_pi2.frequency, t) +
                         self.params['phases'][i]))
            e2.append(self.TN)
            # e2.append(self.pi2pi_m1)

            elts.append([e, e2])

        return elts
Esempio n. 6
0
    def generate_sequence(self, upload=True):
        self._pulse_defs()        

        seq = pulsar.Sequence('{}_{} sequence'.format(self.mprefix,
            self.name))
        
        elements = []
        elements.append(self.mbi_elt)
        elements.append(self.sync_elt)

        e = element.Element('H pulse', pulsar=qt.pulsar)
        e.append(self.T)
        e.append(self.shelving_pulse)
        e.append(pulse.cp(self.T, length=100e-9))
        n = e.append(pulse.cp(self.N_pulse,
            frequency = self.N_pi.frequency - self.params['N_rabi_frequency'],
            length = self.N_pi.length / np.sqrt(2),
            amplitude = 1))
        t = e.length()-e.pulse_start_time(n, 'RF')

        e2 = element.Element('pi2', pulsar=qt.pulsar)            
        e2.append(pulse.cp(self.N_pi2,
            phase = BSM.phaseref(
                self.N_pi2.frequency, t)))
        e2.append(self.TN)
        e2.append(pulse.cp(self.pi2pi_m1))

        elements.append(e2)

        for i in range(self.params['pts']):
            seq.append(name = 'MBI-{}'.format(i),
                wfname = self.mbi_elt.name,
                trigger_wait = True,
                goto_target = 'MBI-{}'.format(i),
                jump_target = 'H-{}'.format(i))
            
            e = element.Element('H pulse-{}'.format(i), pulsar=qt.pulsar)
            e.append(self.T)
            e.append(self.shelving_pulse)
            e.append(pulse.cp(self.T, length=100e-9))
            n = e.append(pulse.cp(self.N_pulse,
                frequency = self.N_pi.frequency - self.params['N_rabi_frequency'],
                length = self.N_pi.length / np.sqrt(2),
                amplitude = 1,
                phase = self.params['phases'][i]))
            elements.append(e)

            seq.append(name = 'H-{}'.format(i),
                wfname = e.name,
                trigger_wait = True)

            seq.append(name = 'pi2-{}'.format(i),
                wfname = e2.name)            

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

        # program AWG
        if upload:
            qt.pulsar.upload(*elements)
        
        qt.pulsar.program_sequence(seq)
Esempio n. 7
0
    def generate_sequence(self, upload=True):
        self._pulse_defs()

        elements = []
        for i in range(self.params['pts']):
            e = element.Element('Echo-{}'.format(i),
                pulsar = qt.pulsar)
            e.append(pulse.cp(self.TIQ, length=500e-9))
            e.append(pulse.cp(self.pi2_4MHz,
                lock_phase_to_element_time = False))
            e.append(pulse.cp(self.TIQ, 
                length = self.params['2tau']/2. + \
                    self.params['pi_position_shifts'][i]))

            ### for doing a CORPSE pi
            pi_phase = BSM.phaseref(self.pi2_4MHz.frequency,
                self.pi2_4MHz.effective_length() + self.params['2tau']/2. + \
                    self.params['pi_position_shifts'][i])
            
            e.append(pulse.cp(self.CORPSE_pi,
                phase = pi_phase,
                frequency = self.pi2_4MHz.frequency))

            ### regular pi
            # pi_phase = BSM.phaseref(self.pi2_4MHz.frequency,
            #     self.pi2_4MHz.effective_length() + self.params['2tau']/2. + \
            #         self.params['pi_position_shifts'][i])
            
            # e.append(pulse.cp(self.pi_4MHz,
            #     lock_phase_to_element_time = False,
            #     phase = pi_phase))
            
            e.append(pulse.cp(self.TIQ,
                length = self.params['2tau']/2. - \
                    self.params['pi_position_shifts'][i]))

            ### pay attention here with which pi pulse we're using!
            second_pi2_phase = BSM.phaseref(self.pi2_4MHz.frequency,
                self.pi2_4MHz.effective_length() + self.params['2tau'] + \
                    self.CORPSE_pi.effective_length())
            
            # second_pi2_phase = BSM.phaseref(self.pi2_4MHz.frequency,
            #     self.pi2_4MHz.effective_length() + self.params['2tau'] + \
            #         self.pi_4MHz.effective_length())
            
            e.append(pulse.cp(self.pi2_4MHz,
                lock_phase_to_element_time = False,
                phase = second_pi2_phase))

            e.append(pulse.cp(self.TIQ,
                length = 500e-9))

            elements.append(e)

            # e.print_overview()

        seq = seq = pulsar.Sequence('{}_{} sequence'.format(self.mprefix,
            self.name))
        for i,e in enumerate(elements):
            seq.append(name = 'MBI-{}'.format(i),
                wfname = self.mbi_elt.name,
                trigger_wait = True,
                goto_target = 'MBI-{}'.format(i),
                jump_target = 'Echo-{}'.format(i))
            seq.append(name = 'Echo-{}'.format(i),
                wfname = e.name,
                trigger_wait = True)
            seq.append(name = 'sync-{}'.format(i),
                wfname = self.sync_elt.name)

        # program AWG
        if upload:
            qt.pulsar.upload(self.mbi_elt, self.sync_elt, *elements)
        
        qt.pulsar.program_sequence(seq)
Esempio n. 8
0
    def generate_sequence(self, upload=True):
        self._pulse_defs()

        elements = []
        for i in range(self.params['pts']):
            e = element.Element('Echo-{}'.format(i), pulsar=qt.pulsar)
            e.append(pulse.cp(self.TIQ, length=500e-9))
            e.append(pulse.cp(self.pi2_4MHz, lock_phase_to_element_time=False))
            e.append(pulse.cp(self.TIQ,
                length = self.params['2tau']/2. + \
                    self.params['pi_position_shifts'][i]))

            ### for doing a CORPSE pi
            pi_phase = BSM.phaseref(self.pi2_4MHz.frequency,
                self.pi2_4MHz.effective_length() + self.params['2tau']/2. + \
                    self.params['pi_position_shifts'][i])

            e.append(
                pulse.cp(self.CORPSE_pi,
                         phase=pi_phase,
                         frequency=self.pi2_4MHz.frequency))

            ### regular pi
            # pi_phase = BSM.phaseref(self.pi2_4MHz.frequency,
            #     self.pi2_4MHz.effective_length() + self.params['2tau']/2. + \
            #         self.params['pi_position_shifts'][i])

            # e.append(pulse.cp(self.pi_4MHz,
            #     lock_phase_to_element_time = False,
            #     phase = pi_phase))

            e.append(pulse.cp(self.TIQ,
                length = self.params['2tau']/2. - \
                    self.params['pi_position_shifts'][i]))

            ### pay attention here with which pi pulse we're using!
            second_pi2_phase = BSM.phaseref(self.pi2_4MHz.frequency,
                self.pi2_4MHz.effective_length() + self.params['2tau'] + \
                    self.CORPSE_pi.effective_length())

            # second_pi2_phase = BSM.phaseref(self.pi2_4MHz.frequency,
            #     self.pi2_4MHz.effective_length() + self.params['2tau'] + \
            #         self.pi_4MHz.effective_length())

            e.append(
                pulse.cp(self.pi2_4MHz,
                         lock_phase_to_element_time=False,
                         phase=second_pi2_phase))

            e.append(pulse.cp(self.TIQ, length=500e-9))

            elements.append(e)

            # e.print_overview()

        seq = seq = pulsar.Sequence('{}_{} sequence'.format(
            self.mprefix, self.name))
        for i, e in enumerate(elements):
            seq.append(name='MBI-{}'.format(i),
                       wfname=self.mbi_elt.name,
                       trigger_wait=True,
                       goto_target='MBI-{}'.format(i),
                       jump_target='Echo-{}'.format(i))
            seq.append(name='Echo-{}'.format(i),
                       wfname=e.name,
                       trigger_wait=True)
            seq.append(name='sync-{}'.format(i), wfname=self.sync_elt.name)

        # program AWG
        if upload:
            qt.pulsar.upload(self.mbi_elt, self.sync_elt, *elements)

        qt.pulsar.program_sequence(seq)