def measure_BusT1(self, times, MC=None):

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

        cal_points = 4
        lengths_cal = times[-1] + \
            np.arange(1, 1+cal_points)*(times[1]-times[0])
        lengths_vec = np.concatenate((times, lengths_cal))

        mw_pulse_pars, RO_pars = self.get_pulse_pars()
        flux_pulse_pars, dist_dict = self.get_flux_pars()
        BusT1 = awg_swf.BusT1(times,
                              mw_pulse_pars,
                              RO_pars,
                              flux_pulse_pars,
                              dist_dict=dist_dict,
                              AWG=self.AWG.get_instr(),
                              upload=False, return_seq=True)

        exec('self.AWG.get_instr().ch%d_amp(2.)' % self.fluxing_channel())
        seq = BusT1.pre_upload()

        MC.set_sweep_function(BusT1)
        MC.set_sweep_points(lengths_vec)

        MC.set_detector_function(self.int_avg_det)
        self.AWG.get_instr().ch4_amp(flux_pulse_pars['swap_amp'])
        MC.run('Bus_T1')
        ma.T1_Analysis(auto=True, label='Bus_T1')
예제 #2
0
def measure_BusT1(device, q0_name, times, MC=None):
    if MC is None:
        MC = qc.station.components['MC']
    q0 = device.qubits()[q0_name]
    cal_points = 4
    cal_pts = times[-1] + \
        np.arange(1, 1+cal_points)*(times[1]-times[0])
    times = np.concatenate((times, cal_pts))

    operation_dict = device.get_operation_dict()
    AWG = q0.AWG

    busT1swf = awg_swf.awg_seq_swf(fsqs.BusT1,
                                   parameter_name='times',
                                   unit='s',
                                   AWG=q0.AWG,
                                   fluxing_channels=[q0.fluxing_channel()],
                                   awg_seq_func_kwargs={
                                       'operation_dict': operation_dict,
                                       'q0': q0_name,
                                       'distortion_dict': q0.dist_dict()
                                   })

    MC.set_sweep_function(busT1swf)
    MC.set_sweep_points(times)

    MC.set_detector_function(q0.int_avg_det_rot)
    MC.run('BusT1_{}'.format(q0.name))
    ma.T1_Analysis(label='BusT1')
    def measure_T1(self, times, MC=None, analyze=True, close_fig=True):
        self.prepare_for_timedomain()
        if MC is None:
            MC = self.MC

        MC.set_sweep_function(
            awg_swf.T1(pulse_pars=self.pulse_pars, RO_pars=self.RO_pars))
        MC.set_sweep_points(times)
        MC.set_detector_function(self.int_avg_det)
        MC.run('T1' + self.msmt_suffix)
        if analyze:
            a = ma.T1_Analysis(auto=True, close_fig=close_fig)
            return a.T1
 def measure_T1(self, times, MC=None, analyze=True, close_fig=True):
     '''
     if update is True will update self.T1 with the measured value
     '''
     self.prepare_for_timedomain()
     if MC is None:
         MC = self.MC
     # append the calibration points, times are for location in plot
     times = np.concatenate([
         times,
         (times[-1] + times[0], times[-1] + times[1], times[-1] + times[2],
          times[-1] + times[3])
     ])
     MC.set_sweep_function(awg_swf.CBox_v3_T1(CBox=self.CBox, upload=True))
     MC.set_sweep_points(times)
     MC.set_detector_function(
         det.CBox_v3_integrated_average_detector(self.CBox))
     MC.run('T1' + self.msmt_suffix)
     if analyze:
         a = ma.T1_Analysis(auto=True, close_fig=True)
         return a.T1
예제 #5
0
 def test_loading_T1_fit_res_from_file(self):
     a = ma.T1_Analysis(timestamp='20170607_210448', auto=False)
     T1 = a.get_measured_T1()[0]
     self.assertAlmostEqual(T1 * 1e6, 18.0505, places=3)
예제 #6
0
 def test_T1_single_weight(self):
     a = ma.T1_Analysis(timestamp='20170607_152324')
     self.assertAlmostEqual(a.T1 * 1e6, 35.0788, places=3)