def displaced_thermal_example(): eta = lamb_dicke.lamb_dicke(trap_frequency, projection_angle) excitations = np.array([]) for alpha in alphas: te = rabi_flop_time_evolution(-1, eta) print alpha prob_excitation = te.compute_evolution_coherent(nbar=nbar, alpha=alpha, delta=delta, time_2pi=time_2pi, t=fixed_duration_time) excitations = np.append(excitations, prob_excitation) # print excitations # np.save('25_ions_leftandright', (excitations, alphas)) # print 'SAVED' # interpolation_function = interp1d(excitations, alphas, kind = 'cubic') # pyplot.figure() pyplot.plot(alphas, excitations, label='excitation to energy') # pyplot.figure() # sample_excitations = np.linspace(0.05,0.95,50) # pyplot.plot(sample_excitations, interpolation_function(sample_excitations)) # pyplot.title('First order red sideband', fontsize = 24) # pyplot.tight_layout() # pyplot.legend(prop={'size':16}) # pyplot.xlabel('Excitation Time (arb)', fontsize = 20) # pyplot.ylabel('Excitation', fontsize = 20) # pyplot.tick_params(axis='both', which='major', labelsize=14) pyplot.show()
def displaced_thermal_example(): eta = lamb_dicke.lamb_dicke(trap_frequency, projection_angle) excitations = np.array([]) alphas = np.linspace(0, 1, 4) for alpha in alphas: te = rabi_flop_time_evolution(-1 ,eta) print alpha prob_excitation = te.compute_evolution_coherent(nbar = nbar, alpha = alpha, delta = delta, time_2pi = time_2pi, t = fixed_duration_time) excitations = np.append(excitations, prob_excitation) # print excitations # np.save('37_ions_0', (excitations, alphas)) # print 'SAVED' # interpolation_function = interp1d(excitations, alphas, kind = 'cubic') # pyplot.figure() pyplot.plot(alphas, excitations, label = 'excitation to energy') # pyplot.figure() # sample_excitations = np.linspace(0.05,0.95,50) # pyplot.plot(sample_excitations, interpolation_function(sample_excitations)) # pyplot.title('First order red sideband', fontsize = 24) # pyplot.tight_layout() # pyplot.legend(prop={'size':16}) # pyplot.xlabel('Excitation Time (arb)', fontsize = 20) # pyplot.ylabel('Excitation', fontsize = 20) # pyplot.tick_params(axis='both', which='major', labelsize=14) pyplot.show()
''' info = ('Carrier Flops', ('2013Aug26','1640_18')) trap_frequency = T.Value(3.0, 'MHz') projection_angle = 45 #degrees offset_time = 0.8 sideband_order = -1 fitting_region = (0, 40) #microseconds ''' compute lamb dicke parameter ''' eta = lamb_dicke.lamb_dicke(trap_frequency, projection_angle) print 'Lamb Dicke parameter: {0:.3f}'.format(eta) ''' initialize the fitter ''' flop = rabi_flop_time_evolution(sideband_order, eta) ''' create fitting parameters ''' params = lmfit.Parameters() params.add('excitation_scaling', value = 0.5, vary = False) params.add('detuning', value = 0, vary = False) #units of rabi frequency params.add('time_2pi', value = 7.6, vary = False) #microseconds params.add('nbar', value = 6.0, min = 0.0, max = 200.0, vary = False) params.add('alpha', value = 4.5, min = 0.0, max = 200.0, vary = True) ''' load the dataset ''' dv = labrad.connect().data_vault title,dataset = info date,datasetName = dataset
''' info = ('Carrier Flops', ('2013Aug26', '1646_32')) trap_frequency = T.Value(3.0, 'MHz') projection_angle = 45 #degrees offset_time = 0.8 sideband_order = -1 fitting_region = (0, 1000) #microseconds ''' compute lamb dicke parameter ''' eta = lamb_dicke.lamb_dicke(trap_frequency, projection_angle) print 'Lamb Dicke parameter: {0:.2f}'.format(eta) ''' initialize the fitter ''' flop = rabi_flop_time_evolution(sideband_order, eta) ''' create fitting parameters ''' params = lmfit.Parameters() params.add('excitation_scaling', value=0.5, vary=False) params.add('detuning', value=0, vary=False) #units of rabi frequency params.add('time_2pi', value=7.6, vary=False) #microseconds params.add('nbar', value=11.06, min=0.0, max=200.0, vary=0) params.add('alpha', value=15.0, min=0.0, max=200.0, vary=1) ''' load the dataset ''' dv = labrad.connect().data_vault title, dataset = info date, datasetName = dataset