def calibrate(self, set_vals=True): # here comes the actual calibration measurements. # get the optimal values using the qtlab analyze module # this module uses gnuplot and should not crash therefore. cur_df = os.path.join('D:/measuring/data', time.strftime("%Y%m%d")) last_rabi = lde_calibration.find_newest_data(cur_df, string='spin_control') last_ssro = lde_calibration.find_newest_data(cur_df, string='ADwin_SSRO') pi_duration = lde_calibration.rabi_calibration(datapath=last_rabi) opt_rotime = lde_calibration.ssro_calibration(datapath=last_ssro) if set_vals: self.pi_lt2_duration = int(pi_duration) self.pi2_lt2_duration = int(pi_duration / 2.0) print 'Set pi-pulse duration for LT2 to %s ns' % ( self.pi_lt2_duration) adpar['SSRO_duration'] = opt_ro_time print 'Set SSRO time for LT2 to %s us' % (opt_ro_time) return adpar['SSRO_duration'] else: return None
def main(): datafolder= 'D:/measuring/data/' date = dtime.strftime('%Y') + dtime.strftime('%m') + dtime.strftime('%d') datapath = datafolder+date + '/' nr_of_datapoints = 21 min_pulse_amp = 0.0 max_pulse_amp = 0.85 amplitude = np.linspace(min_pulse_amp,max_pulse_amp,nr_of_datapoints) pulse_dict = { "Pi":{"duration": 58., "amplitude":0.5}, "Pi_2": {"duration": 29., "amplitude": 0.7}, "init_state_pulse": {"duration":29. , "amplitude":0.7, "Do_Pulse": False}, "time_between_pulses": 10., "nr_of_pulses": 1., "duty_cycle_time": 20000., } execfile('ssro_ADwinv2.py') path = lde_calibration.find_newest_data(datapath,string='ADwin_SSRO_') ssro_dict=lde_calibration.ssro_calibration(path) #return ssro_dict par['RO_duration'] = int(round(ssro_dict["t_max"])) ins_green_aom.set_power(30e-6) execfile('esr.py') path = lde_calibration.find_newest_data(datapath,string='ESR') f_fit=lde_calibration.esr_calibration(path) f_drive=f_fit print f_drive microwaves.set_frequency(f_drive) start_measurement(cal.Pi_Pulse_amp,amplitude,pulse_dict,name='Cal_Pi_amp') #par[''] = par['sweep_par_name'] = 'Pi Pulse amp' path = lde_calibration.find_newest_data(datapath,string='Cal_Pi') fit_amp = lde_calibration.rabi_calibration(path,close_fig=False) print fit_amp pulse_dict["nr_of_pulses"] = 5 pulse_dict["duty_cycle_time"] = 500 min_pulse_amp=fit_amp-0.1 max_pulse_amp=fit_amp+0.1 amplitude = np.linspace(min_pulse_amp,max_pulse_amp,nr_of_datapoints) print amplitude start_measurement(cal.Pi_Pulse_amp,amplitude,pulse_dict,name='Cal_5_Pi_amp') path = lde_calibration.find_newest_data(datapath,string='Cal_5_Pi') fit_amp = lde_calibration.rabi_calibration(path,new_fig=False,close_fig=True) print fit_amp
def main(): datafolder= 'D:/msblok/Analysis/' date = time.strftime('%Y') + time.strftime('%m') + time.strftime('%d') datapath = datafolder+date + '/' nr_of_datapoints = 21 min_pulse_amp = 0.0 max_pulse_amp = 0.85 amplitude = np.linspace(min_pulse_amp,max_pulse_amp,nr_of_datapoints) pulse_dict = { "Pi":{"duration": 58.}, "Pi_2": {"duration": 29., "amplitude": 0.7}, "init_state_pulse": {"duration":29. , "amplitude":0.7, "Do_Pulse": False}, "time_between_pulses": 10., "nr_of_pulses": 1., "duty_cycle_time": 100., } path = lde_calibration.find_newest_data(datapath,string='ADwin_SSRO_') ssro_dict=lde_calibration.ssro_calibration(path) #return ssro_dict #par['RO_duration'] = int(round(ssro_dict["t_max"])) #execfile('esr.py') #path = lde_calibration.find_newest_data(datapath,string='ESR') #f_fit=lde_calibration.esr_calibration(path) #f_drive=f_fit #print f_drive #start_measurement(cal.Pi_Pulse_amp,amplitude,pulse_dict,name='Cal_Pi_amp') #par['sweep_par_name'] = 'Pi Pulse amp' path = lde_calibration.find_newest_data(datapath,string='Cal_Pi') fit_amp = lde_calibration.rabi_calibration(path,close_fig=False) #print fit_amp #pulse_dict["nr_of_pulses"] = 5 #pulse_dict["duty_cycle_time"] = 500 #min_pulse_amp=fit_amp-0.1 #max_pulse_amp=fit_amp+0.1 #amplitude = np.linspace(min_pulse_amp,max_pulse_amp,nr_of_datapoints) #print amplitude #start_measurement(cal.Pi_Pulse_amp,amplitude,pulse_dict,name='Cal_5_Pi_amp') path = lde_calibration.find_newest_data(datapath,string='Cal_5_Pi') fit_amp = lde_calibration.rabi_calibration(path,new_fig=False,close_fig=True) #print fit_amp # evt Rabi oscilatie path = lde_calibration.find_newest_data(datapath,string='rabi') rabi_calibration(path,ssro_dict=ssro_dict)
def Cal_SSRO(filename,lt1): if filename: name = filename else: if lt1: name = 'LT1' else: name = 'LT2' ssro_ADwin.ssro_ADwin_Cal(lt1=lt1) dp = self.get_datapath() path = lde_calibration.find_newest_data(dp,string='ADwin_SSRO') ssro_dict=lde_calibration.ssro_calibration(path) return ssro_dict
def calibrate(self, set_vals=True): # here comes the actual calibration measurements. # get the optimal values using the qtlab analyze module # this module uses gnuplot and should not crash therefore. cur_df = os.path.join("D:/measuring/data", time.strftime("%Y%m%d")) last_rabi = lde_calibration.find_newest_data(cur_df, string="spin_control") last_ssro = lde_calibration.find_newest_data(cur_df, string="ADwin_SSRO") pi_duration = lde_calibration.rabi_calibration(datapath=last_rabi) opt_rotime = lde_calibration.ssro_calibration(datapath=last_ssro) if set_vals: self.pi_lt2_duration = int(pi_duration) self.pi2_lt2_duration = int(pi_duration / 2.0) print "Set pi-pulse duration for LT2 to %s ns" % (self.pi_lt2_duration) adpar["SSRO_duration"] = opt_ro_time print "Set SSRO time for LT2 to %s us" % (opt_ro_time) return adpar["SSRO_duration"] else: return None
def main(): datafolder = 'D:/measuring/data/' date = dtime.strftime('%Y') + dtime.strftime('%m') + dtime.strftime('%d') datapath = datafolder + date + '/' nr_of_datapoints = 21 min_pulse_amp = 0.0 max_pulse_amp = 0.85 amplitude = np.linspace(min_pulse_amp, max_pulse_amp, nr_of_datapoints) pulse_dict = { "Pi": { "duration": 58., "amplitude": 0.5 }, "Pi_2": { "duration": 29., "amplitude": 0.7 }, "init_state_pulse": { "duration": 29., "amplitude": 0.7, "Do_Pulse": False }, "time_between_pulses": 10., "nr_of_pulses": 1., "duty_cycle_time": 20000., } execfile('ssro_ADwinv2.py') path = lde_calibration.find_newest_data(datapath, string='ADwin_SSRO_') ssro_dict = lde_calibration.ssro_calibration(path) #return ssro_dict par['RO_duration'] = int(round(ssro_dict["t_max"])) ins_green_aom.set_power(30e-6) execfile('esr.py') path = lde_calibration.find_newest_data(datapath, string='ESR') f_fit = lde_calibration.esr_calibration(path) f_drive = f_fit print f_drive microwaves.set_frequency(f_drive) start_measurement(cal.Pi_Pulse_amp, amplitude, pulse_dict, name='Cal_Pi_amp') #par[''] = par['sweep_par_name'] = 'Pi Pulse amp' path = lde_calibration.find_newest_data(datapath, string='Cal_Pi') fit_amp = lde_calibration.rabi_calibration(path, close_fig=False) print fit_amp pulse_dict["nr_of_pulses"] = 5 pulse_dict["duty_cycle_time"] = 500 min_pulse_amp = fit_amp - 0.1 max_pulse_amp = fit_amp + 0.1 amplitude = np.linspace(min_pulse_amp, max_pulse_amp, nr_of_datapoints) print amplitude start_measurement(cal.Pi_Pulse_amp, amplitude, pulse_dict, name='Cal_5_Pi_amp') path = lde_calibration.find_newest_data(datapath, string='Cal_5_Pi') fit_amp = lde_calibration.rabi_calibration(path, new_fig=False, close_fig=True) print fit_amp
name = filename else: if lt1: name = 'LT1' else: name = 'LT2' ssro_ADwin.ssro_ADwin_Cal(lt1=lt1) <<<<<<< HEAD dp = get_datapath() ======= dp = self.get_datapath() >>>>>>> 54c8270ec6ded7035f530c75005cf8bbd74414e7 path = lde_calibration.find_newest_data(dp,string='ADwin_SSRO') ssro_dict=lde_calibration.ssro_calibration(path) return ssro_dict def Cal_ESR(lt1): <<<<<<< HEAD f_fit = esr.measure_esr(lt1=lt1) #dp = get_datapath() #path = lde_calibration.find_newest_data(dp,string='ESR') #f_fit=lde_calibration.esr_calibration(path) #FIXME f_dip needs to be an argument ======= #FIXME: Uncomment this line (debug only!)
def Calibrate(self, m, name, lt1): datafolder = "D:/measuring/data/" date = dtime.strftime("%Y") + dtime.strftime("%m") + dtime.strftime("%d") datapath = datafolder + date + "/" min_pulse_amp = 0.0 max_pulse_amp = 0.85 # if lt1: # max_pulse_amp = 0.65 amplitude = np.linspace(min_pulse_amp, max_pulse_amp, self.nr_of_datapoints) pulse_dict = { "Pi": {"duration": 58.0, "amplitude": 0.4845}, "Pi_2": {"duration": 29.0, "amplitude": 0.7}, "init_state_pulse": {"duration": 29.0, "amplitude": 0.7, "Do_Pulse": False}, "time_between_pulses": 10.0, "nr_of_pulses": 1.0, "duty_cycle_time": 100.0, "time_between_CORPSE": 20.0, } ### Calibrate SSRO # name='SIL9_LT2' # m = ssro_ADwin(name) # par=m.setup() # m.measure(m,name,par) # ssro_ADwin.ssro_ADwin_Cal(lt1=lt1) path = lde_calibration.find_newest_data(datapath, string="ADwin_SSRO") ssro_dict = lde_calibration.ssro_calibration(path) # self.par['RO_duration'] = int(round(ssro_dict["t_max"])) ### Calibrate ESR freq # esr.measure_esr(lt1=lt1) path = lde_calibration.find_newest_data(datapath, string="ESR") f_fit = lde_calibration.esr_calibration(path) if lt1: f_fit = 2.82878e9 # WE measured this more accurate else: f_fit = 2.82877e9 - 0.418e6 self.f_drive = f_fit self.microwaves.set_frequency(self.f_drive) # plt=qt.Plot2D(name='MWCal',clear=True) ### Calibrate Single pi pulse single_pi = PulseCalibration(name="Single_Pi_amp") # self.start_measurement(single_pi,cal.Pi_Pulse_amp,amplitude,pulse_dict,lt1=lt1,ssro_dict=ssro_dict,name='Single_Pi_amp') self.par["sweep_par_name"] = "Pi Pulse amp" path = lde_calibration.find_newest_data(datapath, string="Single_Pi_amp") rabi_dict = lde_calibration.rabi_calibration(path, close_fig=True) fit_amp = rabi_dict["minimum"] ms0_readout = rabi_dict["Amplitude"] + rabi_dict["offset"] ### Cal 1 CORPSE Pulse min_pulse_amp = fit_amp - 0.15 max_pulse_amp = fit_amp + 0.15 # if lt1: # min_pulse_amp = fit_amp-0.25 # max_pulse_amp = fit_amp+0.05 amplitude = np.linspace(min_pulse_amp, max_pulse_amp, self.nr_of_datapoints) pulse_dict["istate_pulse"] = {"duration": 0, "amplitude": 0, "Do_Pulse": False} pulse_dict["time_between_CORPSE"] = 10.0 pulse_dict["nr_of_pulses"] = 1.0 CORPSE = PulseCalibration(name="CORPSE_amp") # self.start_measurement(CORPSE,cal.DSC_pulse_amp,amplitude,pulse_dict,lt1=lt1,ssro_dict=ssro_dict,name='CORPSE_amp') path = lde_calibration.find_newest_data(datapath, string="CORPSE_amp") CORPSE_dict = lde_calibration.rabi_calibration(path, new_fig=True, close_fig=True) ms1_readout = CORPSE_dict["lowest_meas_value"] ### Cal 5 Corpse pulses fit_amp = CORPSE_dict["minimum"] min_pulse_amp = fit_amp - 0.1 max_pulse_amp = fit_amp + 0.1 amplitude = np.linspace(min_pulse_amp, max_pulse_amp, self.nr_of_datapoints) Five_CORPSE = PulseCalibration(name="Five_CORPSE_amp") pulse_dict["nr_of_pulses"] = 5.0 # self.start_measurement(Five_CORPSE,cal.DSC_pulse_amp,amplitude,pulse_dict,lt1=lt1,ssro_dict=ssro_dict,name='Five_CORPSE_amp') path = lde_calibration.find_newest_data(datapath, string="Five_CORPSE_amp") Five_CORPSE_dict = lde_calibration.rabi_calibration(path, new_fig=True, close_fig=True) fit_amp = Five_CORPSE_dict["minimum"] ### Cal CORPSE Pi/2 pulse_dict["nr_of_pulses"] = 1.0 min_pulse_amp = fit_amp - 0.1 max_pulse_amp = fit_amp + 0.1 if lt1: min_pulse_amp = fit_amp - 0.12 max_pulse_amp = fit_amp + 0.1 amplitude = np.linspace(min_pulse_amp, max_pulse_amp, self.nr_of_datapoints) CORPSE_pi_over_two = PulseCalibration(name="CORPSE_pi_over_two") # self.start_measurement(CORPSE_pi_over_two,cal.DSC_pi_over_two_pulse_amp, # amplitude,pulse_dict,lt1=lt1,ssro_dict=ssro_dict,name='CORPSE_pi_over_two') path = lde_calibration.find_newest_data(datapath, string="CORPSE_pi_over_two") b = 2 * np.pi * rabi_dict["Amplitude"] * rabi_dict["freq"] a = rabi_dict["offset"] + rabi_dict["Amplitude"] pi_over_two_dict = lde_calibration.pi_over_two_calibration( path, [ms0_readout, ms1_readout], [a, b], new_fig=True, close_fig=True ) ### Cal CORPSE Pi/2 print "ms0_readout:" print ms0_readout print "ms1_readout:" print ms1_readout Cal_dict = { "SSRO": ssro_dict, "ESR": {"freq": f_fit}, "MW": rabi_dict, "MW_CORPSE": CORPSE_dict, "MW_Five_CORPSE": Five_CORPSE_dict, "MW_CORPSE_pi_over_two": pi_over_two_dict, } return Cal_dict