def measure_pulsed_spectroscopy(self, freqs, MC=None, analyze=True,
                                    return_detector=False,
                                    close_fig=True, upload=True, update=True,
                                    use_max=False):
        """
        Measure pulsed spec with the qubit.

            Accepts a manual sequence parameters, which has to be a call to a
            pulse generation allowing for alternative sequences to be played
            instead of the standard one

        """

        self.prepare_for_pulsed_spec()
        self.heterodyne_instr.get_instr()._disable_auto_seq_loading = True

        self.cw_source.get_instr().pulsemod_state.set('On')
        self.cw_source.get_instr().power.set(self.spec_pow_pulsed.get())
        self.cw_source.get_instr().on()

        if MC is None:
            MC = self.MC.get_instr()

        spec_pars, RO_pars = self.get_spec_pars()
        # Upload the AWG sequence
        sq.Pulsed_spec_seq(spec_pars, RO_pars)

        self.AWG.get_instr().start()
        if return_detector:
            return det.Heterodyne_probe(self.heterodyne_instr.get_instr())

        else:
            MC.set_sweep_function(pw.wrap_par_to_swf(
                self.cw_source.get_instr().frequency, retrieve_value=True))
            MC.set_sweep_points(freqs)
            MC.set_detector_function(
                det.Heterodyne_probe(self.heterodyne_instr.get_instr()))
            MC.run(name='pulsed-spec'+self.msmt_suffix)
            if analyze or update:
                ma_obj = ma.Qubit_Spectroscopy_Analysis(
                    auto=True, label='pulsed', close_fig=close_fig)
                if use_max:
                    f_qubit = ma_obj.peaks['peak']
                else:
                    f_qubit = ma_obj.fitted_freq
                if update:
                    self.f_qubit(f_qubit)
            self.cw_source.get_instr().off()
            return f_qubit
Exemplo n.º 2
0
    def measure_heterodyne_spectroscopy(self,
                                        freqs=None,
                                        MC=None,
                                        analyze=True,
                                        close_fig=True):
        """ Varies the frequency of the microwave source to the resonator and
        measures the transmittance """
        if freqs is None:
            raise ValueError("Unspecified frequencies for measure_heterodyne_"
                             "spectroscopy")

        if MC is None:
            MC = self.MC

        previous_freq = self.heterodyne_instr.frequency()

        self.prepare_for_continuous_wave()
        MC.set_sweep_function(
            pw.wrap_par_to_swf(self.heterodyne_instr.frequency))
        MC.set_sweep_points(freqs)
        MC.set_detector_function(
            det.Heterodyne_probe(self.heterodyne_instr,
                                 trigger_separation=5e-6,
                                 demod_mode='single'))
        MC.run(name='resonator_scan' + self.msmt_suffix)

        self.heterodyne_instr.frequency(previous_freq)

        if analyze:
            ma.MeasurementAnalysis(auto=True, close_fig=close_fig)
Exemplo n.º 3
0
    def measure_spectroscopy(self,
                             freqs=None,
                             MC=None,
                             analyze=True,
                             close_fig=True,
                             update=False):
        """ Varies qubit drive frequency and measures the resonator
        transmittance """
        if freqs is None:
            raise ValueError("Unspecified frequencies for "
                             "measure_spectroscopy and no previous value")

        if MC is None:
            MC = self.MC

        self.prepare_for_continuous_wave()
        self.cw_source.on()

        MC.set_sweep_function(pw.wrap_par_to_swf(self.cw_source.frequency))
        MC.set_sweep_points(freqs)
        MC.set_detector_function(
            det.Heterodyne_probe(self.heterodyne_instr,
                                 trigger_separation=2.8e-6,
                                 demod_mode='single'))
        MC.run(name='spectroscopy' + self.msmt_suffix)

        self.cw_source.off()

        if analyze:
            ma.MeasurementAnalysis(auto=True, close_fig=close_fig)
    def measure_spectroscopy(self, freqs, pulsed=False, MC=None,
                             analyze=True, close_fig=True,
                             force_load=True, use_max=False, update=True):
        self.prepare_for_continuous_wave()
        self.cw_source.get_instr().on()
        if MC is None:
            MC = self.MC.get_instr()
        if pulsed:
            # Redirect to the pulsed spec function
            return self.measure_pulsed_spectroscopy(freqs=freqs,
                                                    MC=MC,
                                                    analyze=analyze,
                                                    close_fig=close_fig,
                                                    update=update,
                                                    upload=force_load)

        MC.set_sweep_function(pw.wrap_par_to_swf(
                              self.cw_source.get_instr().frequency, retrieve_value=True))
        MC.set_sweep_points(freqs)
        MC.set_detector_function(
            det.Heterodyne_probe(
                self.heterodyne_instr.get_instr(),
                trigger_separation=5e-6 + self.RO_acq_integration_length(),
                RO_length=self.RO_acq_integration_length()))
        MC.run(name='spectroscopy'+self.msmt_suffix)

        if analyze:
            ma.MeasurementAnalysis(auto=True, close_fig=close_fig)
        self.cw_source.get_instr().off()
    def measure_spectroscopy(self,
                             freqs,
                             pulsed=False,
                             MC=None,
                             analyze=True,
                             close_fig=True,
                             mode='ROGated_SpecGate',
                             force_load=False):
        self.prepare_for_continuous_wave()
        self.cw_source.on()
        if MC is None:
            MC = self.MC
        if pulsed:
            # Redirect to the pulsed spec function
            return self.measure_pulsed_spectroscopy(freqs=freqs,
                                                    MC=MC,
                                                    analyze=analyze,
                                                    close_fig=close_fig,
                                                    mode=mode,
                                                    force_load=force_load)

        MC.set_sweep_function(pw.wrap_par_to_swf(self.cw_source.frequency))
        MC.set_sweep_points(freqs)
        MC.set_detector_function(
            det.Heterodyne_probe(self.heterodyne_instr,
                                 trigger_separation=2.8e-6))
        MC.run(name='spectroscopy' + self.msmt_suffix)

        if analyze:
            ma.MeasurementAnalysis(auto=True, close_fig=close_fig)
        self.cw_source.off()
    def measure_pulsed_spectroscopy(self,
                                    freqs,
                                    MC=None,
                                    analyze=True,
                                    return_detector=False,
                                    close_fig=True,
                                    upload=True):
        """
        Measure pulsed spec with the qubit.

            Accepts a manual sequence parameters, which has to be a call to a
            pulse generation allowing for alternative sequences to be played
            instead of the standard one

        """

        self.prepare_for_pulsed_spec()
        self.heterodyne_instr._disable_auto_seq_loading = True

        self.cw_source.pulsemod_state.set('On')
        self.cw_source.power.set(self.spec_pow_pulsed.get())
        self.cw_source.on()

        if MC is None:
            MC = self.MC

        spec_pars, RO_pars = self.get_spec_pars()
        # Upload the AWG sequence
        sq.Pulsed_spec_seq(spec_pars, RO_pars)

        self.AWG.start()
        if return_detector:
            return det.Heterodyne_probe(self.heterodyne_instr)

        else:
            MC.set_sweep_function(self.cw_source.frequency)
            MC.set_sweep_points(freqs)
            MC.set_detector_function(
                det.Heterodyne_probe(self.heterodyne_instr))
            MC.run(name='pulsed-spec' + self.msmt_suffix)
            if analyze:
                ma.MeasurementAnalysis(auto=True, close_fig=close_fig)
        self.cw_source.off()
Exemplo n.º 7
0
 def measure_resonator_dac(self, freqs, dac_voltages,
                           MC=None, analyze=True, close_fig=True):
     self.prepare_for_continuous_wave()
     if MC is None:
         MC = self.MC
     MC.set_sweep_functions(
         [self.heterodyne_instr.frequency,
          self.IVVI.parameters['dac{}'.format(self.dac_channel())]])
     MC.set_sweep_points(freqs)
     MC.set_sweep_points_2D(dac_voltages)
     MC.set_detector_function(det.Heterodyne_probe(self.heterodyne_instr))
     MC.run(name='Resonator_dac_scan'+self.msmt_suffix, mode='2D')
     if analyze:
         ma.MeasurementAnalysis(auto=True, TwoD=True, close_fig=close_fig)
    def measure_heterodyne_spectroscopy(self, freqs, MC=None,
                                        analyze=True, close_fig=True):
        self.prepare_for_continuous_wave()

        # sqts.Pulsed_spec_seq(spec_pars, RO_pars)
        if MC is None:
            MC = self.MC.get_instr()
        MC.set_sweep_function(pw.wrap_par_to_swf(
                              self.heterodyne_instr.get_instr().frequency, retrieve_value=True))
        MC.set_sweep_points(freqs)
        MC.set_detector_function(
            det.Heterodyne_probe(self.heterodyne_instr.get_instr(),
                                 trigger_separation=self.RO_acq_integration_length()+5e-6, RO_length=self.RO_acq_integration_length()))
        MC.run(name='Resonator_scan'+self.msmt_suffix)
        if analyze:
            ma.MeasurementAnalysis(auto=True, close_fig=close_fig)
Exemplo n.º 9
0
 def measure_resonator_power(self, freqs, powers,
                             MC=None, analyze=True, close_fig=True):
     '''
     N.B. This one does not use powers but varies the mod-amp.
     Need to find a way to keep this function agnostic to that
     '''
     self.prepare_for_continuous_wave()
     if MC is None:
         MC = self.MC
     MC.set_sweep_functions(
         [pw.wrap_par_to_swf(self.heterodyne_instr.frequency),
          pw.wrap_par_to_swf(self.heterodyne_instr.RF_power)])
     MC.set_sweep_points(freqs)
     MC.set_sweep_points_2D(powers)
     MC.set_detector_function(det.Heterodyne_probe(self.heterodyne_instr))
     MC.run(name='Resonator_power_scan'+self.msmt_suffix, mode='2D')
     if analyze:
         ma.MeasurementAnalysis(auto=True, TwoD=True, close_fig=close_fig)
Exemplo n.º 10
0
 def measure_heterodyne_spectroscopy(self,
                                     freqs,
                                     MC=None,
                                     analyze=True,
                                     close_fig=True,
                                     RO_length=2000e-9):
     self.prepare_for_continuous_wave()
     if MC is None:
         MC = self.MC
     MC.set_sweep_function(
         pw.wrap_par_to_swf(self.heterodyne_instr.frequency))
     MC.set_sweep_points(freqs)
     MC.set_detector_function(
         det.Heterodyne_probe(self.heterodyne_instr,
                              trigger_separation=2.8e-6,
                              RO_length=2274e-9))
     MC.run(name='Resonator_scan' + self.msmt_suffix)
     if analyze:
         ma.MeasurementAnalysis(auto=True, close_fig=close_fig)
Exemplo n.º 11
0
    def measure_pulsed_spectroscopy(self,
                                    freqs,
                                    mode='ROGated_SpecGate',
                                    MC=None,
                                    analyze=True,
                                    close_fig=True,
                                    force_load=False):
        # This is a trick so I can reuse the heterodyne instr
        # to do pulsed-spectroscopy
        self.heterodyne_instr._disable_auto_seq_loading = True

        if mode == 'ROMod_SpecGated':
            if ('Pulsed_spec_with_RF_mod'
                    not in self.AWG.setup_filename.get()) or force_load:
                st_seqs.Pulsed_spec_seq_RF_mod(
                    IF=self.f_RO_mod.get(),
                    spec_pulse_length=spec_pulse_length,
                    marker_interval=30e-6,
                    RO_pulse_delay=self.RO_pulse_delay.get())
        elif mode == 'ROGated_SpecGate':
            if ('Pulsed_spec_with_RF_gated'
                    not in self.AWG.setup_filename.get()) or force_load:
                st_seqs.Pulsed_spec_seq_RF_gated(self.RO_pars, self.pulse_pars)
        else:
            NotImplementedError(
                'Pulsed Spec mode not supported. Only ROMod_SpecGated and ROGated_SpecGate are avaible right now.\n'
            )

        self.cw_source.pulsemod_state.set('on')
        self.cw_source.power.set(self.spec_pow_pulsed.get())

        self.AWG.start()
        if hasattr(self.heterodyne_instr, 'mod_amp'):
            self.heterodyne_instr.set('mod_amp', self.mod_amp_cw.get())
        else:
            self.heterodyne_instr.RF.power(self.RO_power_cw())
        MC.set_sweep_function(pw.wrap_par_to_swf(self.cw_source.frequency))
        MC.set_sweep_points(freqs)
        MC.set_detector_function(det.Heterodyne_probe(self.heterodyne_instr))
        MC.run(name='pulsed-spec' + self.msmt_suffix)
        if analyze:
            ma.MeasurementAnalysis(auto=True, close_fig=close_fig)
Exemplo n.º 12
0
    def measure_homodyne_acqusition_delay(self,
                                          delays=None,
                                          MC=None,
                                          analyze=True,
                                          close_fig=True):
        """
        Varies the delay between the homodyne modulation signal and
        acquisition. Measures the transmittance.
        """
        if delays is None:
            raise ValueError("Unspecified delays for measure_homodyne_"
                             "acquisition_delay")

        if MC is None:
            MC = self.MC

        # set number of averages to 1 due to a readout bug
        previous_nr_averages = self.heterodyne_instr.nr_averages()
        self.heterodyne_instr.nr_averages(1)
        previous_delay = self.heterodyne_instr.acquisition_delay()

        self.prepare_for_continuous_wave()
        MC.set_sweep_function(
            pw.wrap_par_to_swf(self.heterodyne_instr.acquisition_delay))
        MC.set_sweep_points(delays)
        MC.set_detector_function(
            det.Heterodyne_probe(self.heterodyne_instr,
                                 trigger_separation=5e-6,
                                 demod_mode='single'))
        MC.run(name='acquisition_delay_scan' + self.msmt_suffix)

        self.heterodyne_instr.acquisition_delay(previous_delay)
        self.heterodyne_instr.nr_averages(previous_nr_averages)

        if analyze:
            ma.MeasurementAnalysis(auto=True, close_fig=close_fig)