def sequence(self): p = self.parameters center = p.Transitions.MetastableQubit DDS_freq = p.ddsDefaults.metastable_qubit_dds_freq - ( p.MetastableMicrowaveInterrogation.detuning + center) self.addDDS('3GHz_qubit', self.start, p.MetastableMicrowaveInterrogation.duration, DDS_freq, p.ddsDefaults.metastable_qubit_dds_power, U(30.0, 'deg')) self.addDDS('3GHz_qubit', self.start + p.MetastableMicrowaveInterrogation.duration, p.MetastableMicrowaveInterrogation.duration, DDS_freq, p.ddsDefaults.metastable_qubit_dds_power, U(0.0, 'deg')) self.addDDS( '3GHz_qubit', self.start + 2 * p.MetastableMicrowaveInterrogation.duration, p.MetastableMicrowaveInterrogation.duration, DDS_freq, p.ddsDefaults.metastable_qubit_dds_power, U(90.0, 'deg')) self.addDDS( '3GHz_qubit', self.start + 3 * p.MetastableMicrowaveInterrogation.duration, p.MetastableMicrowaveInterrogation.duration, DDS_freq, p.ddsDefaults.metastable_qubit_dds_power, U(0.0, 'deg')) self.addDDS( '3GHz_qubit', self.start + 4 * p.MetastableMicrowaveInterrogation.duration, p.MetastableMicrowaveInterrogation.duration, DDS_freq, p.ddsDefaults.metastable_qubit_dds_power, U(30.0, 'deg')) self.end = self.start + 5 * p.MetastableMicrowaveInterrogation.duration
def sequence(self): p = self.parameters DDS_freq = p.ddsDefaults.metastable_qubit_dds_freq + p.Transitions.MetastableQubit / 8.0 N = p.MetastableMeasurementDrivenGate.total_num_sub_pulses t_deshelve = p.MetastableMeasurementDrivenGate.measurement_duration delta_t = p.Pi_times.metastable_qubit / N self.addDDS('976SP', self.start, N * (N + 1) * delta_t + N * t_deshelve, p.ddsDefaults.repump_976_freq, p.ddsDefaults.repump_976_power) for n in np.linspace(1, int(N), int(N)): self.addDDS( '3GHz_qubit', self.start + n * (n - 1.) * delta_t + (n - 1.) * t_deshelve, n * delta_t, DDS_freq, p.ddsDefaults.metastable_qubit_dds_power, U(0.0, 'deg')) self.addDDS( '760SP', self.start + n * delta_t + n * (n - 1) * delta_t + (n - 1) * t_deshelve, t_deshelve, p.ddsDefaults.repump_760_1_freq, p.ddsDefaults.repump_760_1_power) self.addDDS( '3GHz_qubit', self.start + n * delta_t + n * (n - 1.) * delta_t + n * t_deshelve, n * delta_t, DDS_freq, p.ddsDefaults.metastable_qubit_dds_power, U(22.5, 'deg')) self.end = self.start + N * (N + 1) * delta_t + N * t_deshelve
def sequence(self): from StatePreparation import StatePreparation from subsequences.GlobalRotation import GlobalRotation from subsequences.StateReadout import StateReadout from subsequences.EmptySequence import EmptySequence from subsequences.StateReadout import StateReadout ## calculate the 729 params rf = self.parameters.RabiFlopping # calculating the 729 freq form the Rabi flop params freq_729=self.calc_freq(rf.line_selection , rf.selection_sideband , rf.order) # print "1234" # print " freq 729 " , freq_729 # print " Wait time ", self.parameters.RamseyScanGap.ramsey_duration # # building the sequence self.addSequence(StatePreparation) self.addSequence(GlobalRotation, { "GlobalRotation.frequency":freq_729, "GlobalRotation.angle": U(np.pi/2.0, 'rad'), "GlobalRotation.phase": U(0, 'deg')}) self.addSequence(EmptySequence, { "EmptySequence.empty_sequence_duration" : U(2, 'ms')}) self.addSequence(EmptySequence, { "EmptySequence.empty_sequence_duration" : self.parameters.RamseyScanGap.ramsey_duration}) self.addSequence(GlobalRotation, {"GlobalRotation.frequency":freq_729, "GlobalRotation.angle": U(np.pi/2.0, 'rad'), "GlobalRotation.phase": U(0, 'deg') }) self.addSequence(StateReadout)
def correct_cavity_drift(self): center_before = self.run_interleaved_linescan() if (center_before == RuntimeError) or (center_before == TypeError): return False delta = (self.init_line_center - center_before ) # cavity shift in MHz, no labrad units j = 0 while np.abs(delta) > 1.0: j += 1 new_cavity_voltage = self.cavity_voltage + ( delta * 0.01) # 0.01 V/ MHz on cavity if np.abs(new_cavity_voltage - self.cavity_voltage) < 0.5: self.pzt_server.set_voltage(self.cavity_chan, U(new_cavity_voltage, 'V')) self.cavity_voltage = new_cavity_voltage else: print('Linescan fit did not work, killing tweak up') break center_after = self.run_interleaved_linescan() if (center_after == RuntimeError) or (center_after == TypeError): return False self.pv.set_parameter( ('Transitions', 'main_cooling_369', U(center_after, 'MHz'))) delta = (self.init_line_center - center_after) print('Finished cavity tweak up, resuming experiment') return True, j
def set_scan(self, scan_param, minim, maxim, steps, unit): self.parameter_to_scan = scan_param try: self.window = self.module.scannable_params[scan_param][1] except: self.window = 'current' # no window defined # Enable scan only from the scannable params #m1, m2, default, unit = self.module.scannable_params[scan_param][0] self.scan_unit = unit # adding the last element to the scan self.scan = np.arange(minim, maxim, steps) self.scan = np.append(self.scan,maxim) self.scan = [U(pt, unit) for pt in self.scan] x=self.scan[0] if x.isCompatible('s'): self.submit_unit='us' elif x.isCompatible('Hz'): self.submit_unit='MHz' else: self.submit_unit=self.scan_unit self.scan_submit = [pt[self.submit_unit] for pt in self.scan] self.scan_submit = [U(pt, self.submit_unit) for pt in self.scan_submit]
def sequence(self): p = self.parameters if p.MicrowaveInterrogation.microwave_source == 'HP+DDS': DDS_freq = p.ddsDefaults.qubit_dds_freq - p.Transitions.qubit_0 pulse_delay = p.MicrowaveInterrogation.ttl_switch_delay pi_time = p.Pi_times.qubit_0 self.addTTL('MicrowaveTTL', self.start + pulse_delay, pi_time / 2.0) self.addDDS( 'Microwave_qubit', self.start, pi_time / 2.0 + pulse_delay, DDS_freq, p.MicrowaveInterrogation.power, U(90.0, 'deg') + p.MicrowaveInterrogation.overall_phase) self.end = self.start + pi_time / 2.0 + pulse_delay elif p.MicrowaveInterrogation.microwave_source == 'DDSx32': DDS_freq = p.ddsDefaults.qubit_dds_x32_freq + p.Transitions.qubit_0 / 32.0 pulse_delay = p.MicrowaveInterrogation.ttl_switch_delay pi_time = p.Pi_times.qubit_0 phase = U(90.0, 'deg') / 32.0 + p.MicrowaveInterrogation.overall_phase self.addTTL('MicrowaveTTL', self.start + pulse_delay, pi_time / 2.0) self.addDDS('Microwave_qubit', self.start, pi_time / 2.0 + pulse_delay, DDS_freq, p.ddsDefaults.qubit_dds_x32_power, phase) self.end = self.start + pi_time / 2.0 + pulse_delay
def run(self, cxn, context): self.pulser.line_trigger_state(False) self.setup_datavault( 'frequency', 'photons') # gives the x and y names to Data Vault self.setup_grapher('Interleaved Linescan') self.detunings = self.get_scan_list( self.p.InterleavedLinescan.line_scan, 'MHz') return_detuning, return_counts = [], [] for i, detuning in enumerate(self.detunings): if context == (0, 2): should_break = self.update_progress(i / float(len(self.detunings))) if should_break: return should_break # self.p.Transitions.main_cooling_369 divide by 2 for the double pass freq = U(detuning, 'MHz') / 2.0 + self.p.ddsDefaults.DP369_freq track_detuning, track_counts = self.program_pulser(freq, detuning) return_detuning.append(track_detuning) return_counts.append(track_counts) # skip first couple points of data since they occasionally come in at random values # after performing a Shelving experiment, should not affect fit. Then set the parameter # in parametervault to the fitted center popt, pcov = fit(self.lorentzian_fit, return_detuning[2:], return_counts[2:], p0=self.fit_guess) self.pv.set_parameter( ('Transitions', 'main_cooling_369', U(popt[0], 'MHz')))
def run(self, cxn, context): self.set_default_parameters() self.setup_datavault('time', 'probability') self.setup_grapher('Rabi Flopping qubit_0') self.times = np.arange(0.1, 6.1 * self.pi_time, 3.2) probs, times = [], [] for i, duration in enumerate(self.times): should_break = self.update_progress(i/float(len(self.times))) if should_break: self.pulser.line_trigger_state(False) break self.p['MicrowaveInterrogation.duration'] = U(duration, 'us') self.program_pulser(sequence) [counts] = self.run_sequence() if i % self.p.StandardStateDetection.points_per_histogram == 0: hist = self.process_data(counts) self.plot_hist(hist) pop = self.get_pop(counts) self.dv.add(duration, pop) probs.append(pop) times.append(duration) popt, pcov = fit(self.rabi, times, probs, p0=[1.0, self.pi_time, 0.0, 0.0], bounds=(0.0, [1.0, 200.0, 3.14, 1.0])) self.pv.set_parameter(('Pi_times', 'qubit_0', U(popt[1], 'us'))) print('Updated qubit_0 pi_time to ' + str(popt[1])[:8] + ' microseconds') return popt[1]
def sequence(self): p = self.parameters center = p.Transitions.MetastableQubit pi_time = p.Pi_times.metastable_qubit DDS_freq = p.ddsDefaults.metastable_qubit_dds_freq + ( p.MetastableMicrowaveRamsey.detuning + center) / 8.0 self.addDDS('3GHz_qubit', self.start, pi_time / 2.0, DDS_freq, p.ddsDefaults.metastable_qubit_dds_power, U(0.0, 'deg')) self.addDDS('3GHz_qubit', self.start + pi_time / 2.0 + p.EmptySequence.duration, pi_time / 2.0, DDS_freq, p.ddsDefaults.metastable_qubit_dds_power, p.Metastable_Microwave_Interrogation.microwave_phase / 8.0) if p.MetastableMicrowaveRamsey.cooling_lasers_during_microwaves == 'On': self.addDDS('935SP', self.start + pi_time / 2.0, p.EmptySequence.duration, p.ddsDefaults.repump_935_freq, p.ddsDefaults.repump_935_power) self.addDDS( '369DP', self.start + pi_time / 2.0, p.EmptySequence.duration, p.Transitions.main_cooling_369 / 2.0 + U(200.0, 'MHz') + p.DopplerCooling.detuning / 2.0, U(-4.0, 'dBm')) self.addDDS('DopplerCoolingSP', self.start + pi_time / 2.0, p.EmptySequence.duration, p.ddsDefaults.doppler_cooling_freq, p.ddsDefaults.doppler_cooling_power) self.end = self.start + pi_time + p.EmptySequence.duration
def ampChangedHPA19(self, client): from labrad.units import WithUnit as U output = self.GPIB19spinAmpDec.value() vernier = self.GPIB19spinAmpVer.value() out = U(output, 'dBm') ver = U(vernier, 'dBm') yield client.set_amplitude(out, ver)
def run(self, cxn, context): self.setup_datavault('frequency', 'probability') self.setup_grapher('QuadrupoleOpticalPumpingLinescan') self.frequencies = self.get_scan_list(self.p.QuadrupoleOpticalPumpingLinescan.scan, 'MHz') for i, freq in enumerate(self.frequencies): should_break = self.update_progress(i/float(len(self.frequencies))) if should_break: break self.p['OpticalPumping.method'] = 'QuadrupoleOnly' if self.p.Modes.state_detection_mode == 'Shelving': self.p['OpticalPumping.duration'] = U(0.0, 'us') self.p['OpticalPumping.quadrupole_op_duration'] = self.p.OpticalPumping.quadrupole_op_duration self.p['OpticalPumping.quadrupole_op_detuning'] = U(freq, 'MHz') self.p['Modes.state_detection_mode'] = 'Shelving' self.program_pulser(sequence) [doppler_counts, detection_counts] = self.run_sequence(num=2, max_runs=500) deshelving_errors = np.where(doppler_counts <= self.p.Shelving_Doppler_Cooling.doppler_counts_threshold) detection_counts = np.delete(detection_counts, deshelving_errors) elif self.p.Modes.state_detection_mode == 'Standard': self.p['OpticalPumping.duration'] = U(0.0, 'us') self.p['OpticalPumping.quadrupole_op_duration'] = self.p.OpticalPumping.quadrupole_op_duration self.p['OpticalPumping.quadrupole_op_detuning'] = U(freq, 'MHz') self.p['Modes.state_detection_mode'] = 'Standard' self.program_pulser(sequence) [detection_counts] = self.run_sequence(num=1, max_runs=1000) hist = self.process_data(detection_counts) self.plot_hist(hist) pop = self.get_pop(detection_counts) self.dv.add(freq, pop)
def sequence(self): from StatePreparation import StatePreparation from subsequences.RabiExcitation import RabiExcitation from subsequences.StateReadout import StateReadout from subsequences.EmptySequence import EmptySequence from subsequences.TurnOffAll import TurnOffAll from subsequences.GlobalRotation import GlobalRotation self.end = U(10., 'us') p = self.parameters line1 = p.DriftTracker.line_selection_1 channel_729 = p.CalibrationScans.calibration_channel_729 freq_729 = self.calc_freq(line1) amp = p.DriftTrackerRamsey.line_1_amplitude duration = p.DriftTrackerRamsey.line_1_pi_time ramsey_time = p.DriftTrackerRamsey.gap_time_1 phase_2nd_pulse = p.DriftTrackerRamsey.phase_1 print "RAMSEY PARAMS" print freq_729 print amp print duration print ramsey_time print phase_2nd_pulse self.addSequence(TurnOffAll) self.addSequence(StatePreparation) self.addSequence( RabiExcitation, { 'Excitation_729.channel_729': channel_729, 'Excitation_729.rabi_excitation_frequency': freq_729, 'Excitation_729.rabi_excitation_amplitude': amp, 'Excitation_729.rabi_excitation_duration': 0.5 * duration, 'Excitation_729.rabi_excitation_phase': U(0, 'deg') }) # self.addSequence(GlobalRotation, { "GlobalRotation.frequency":freq_729, # "GlobalRotation.angle": U(np.pi/2.0, 'rad'), # "GlobalRotation.phase": U(0, 'deg'), # "GlobalRotation.amplitude": amp}) self.addSequence( EmptySequence, {"EmptySequence.empty_sequence_duration": ramsey_time}) self.addSequence( RabiExcitation, { 'Excitation_729.channel_729': channel_729, 'Excitation_729.rabi_excitation_frequency': freq_729, 'Excitation_729.rabi_excitation_amplitude': amp, 'Excitation_729.rabi_excitation_duration': 0.5 * duration, 'Excitation_729.rabi_excitation_phase': phase_2nd_pulse }) # self.addSequence(GlobalRotation, {"GlobalRotation.frequency":freq_729, # "GlobalRotation.angle": U(np.pi/2.0, 'rad'), # "GlobalRotation.phase": phase_2nd_pulse, # "GlobalRotation.amplitude": amp}) self.addSequence(StateReadout)
def run_finally(self): line1 = self.p.DriftTracker.line_selection_1 line2 = self.p.DriftTracker.line_selection_2 old_carr1 = self.carrier_values[self.carrier_dict[line1]] old_carr2 = self.carrier_values[self.carrier_dict[line2]] carr1 = old_carr1 - self.detuning_1_global carr2 = old_carr2 - self.detuning_2_global print("RamseyDriftTracker detuning_1_global =", self.detuning_1_global, "Hz") print("RamseyDriftTracker detuning_2_global =", self.detuning_2_global, "Hz") submission = [(line1, U(carr1 * 1e-6, "MHz")), (line2, U(carr2 * 1e-6, "MHz"))] try: global_cxn = labrad.connect(cl.global_address, password=cl.global_password, tls_mode="off") global_cxn.sd_tracker_global.set_measurements( submission, cl.client_name) except: logger.error("Failed to connect to global drift tracker.", exc_info=True) return global_cxn.disconnect()
def get_current_setpoint(self, c): dev = self.selectDevice(c) value = yield dev.query('?CS1') if value: value = U(float(value), 'A') else: value = U(0.0, 'A') returnValue(value)
def full_info(self): from labrad.units import WithUnit as U full_info = ('spectrum_sensitivity', (U(40.0, 'kHz'), U(2.0, 'kHz'), U(500.0, 'us'), U(-24.0, 'dBm'))) return full_info
def pulse_initialize(self, c, value): ''' Initializes the power supply for pulse mode by setting voltage and current to 0. ''' notified = self.getOtherListeners(c) if value==True: yield self.set_voltage(U(0,'V')) yield self.set_current(U(0,'A')) self.pulmsignal(value, notified)
def sequence(self): p = self.parameters center = p.Transitions.MetastableQubit DDS_freq = p.ddsDefaults.metastable_qubit_dds_freq - (p.MetastableMicrowaveInterrogation.detuning + center) if p.MetastableMicrowaveInterrogation.duration < p.MetastableRabiQND.time_to_project: self.addDDS('3GHz_qubit', self.start, p.MetastableMicrowaveInterrogation.duration, DDS_freq, p.ddsDefaults.metastable_qubit_dds_power) self.end = self.start + p.MetastableMicrowaveInterrogation.duration elif p.MetastableMicrowaveInterrogation.duration >= p.MetastableRabiQND.time_to_project: self.addDDS('3GHz_qubit', self.start, p.MetastableRabiQND.time_to_project, DDS_freq, p.ddsDefaults.metastable_qubit_dds_power, U(0.0, 'deg')) self.addDDS('3GHz_qubit', self.start + p.MetastableRabiQND.time_to_project, p.Pi_times.metastable_qubit/2.0, DDS_freq, p.ddsDefaults.metastable_qubit_dds_power, U(180.0, 'deg')) self.addDDS('760SP', self.start + p.MetastableRabiQND.time_to_project + p.Pi_times.metastable_qubit/2.0, p.MetastableRabiQND.projection_time, p.ddsDefaults.repump_760_1_freq, p.ddsDefaults.repump_760_1_power) self.addDDS('3GHz_qubit', self.start + p.MetastableRabiQND.time_to_project + p.Pi_times.metastable_qubit/2.0 + p.MetastableRabiQND.projection_time, p.Pi_times.metastable_qubit/2.0, DDS_freq, p.ddsDefaults.metastable_qubit_dds_power, U(0.0, 'deg')) self.addDDS('3GHz_qubit', self.start + p.MetastableRabiQND.time_to_project + p.Pi_times.metastable_qubit + p.MetastableRabiQND.projection_time, p.MetastableMicrowaveInterrogation.duration - p.MetastableRabiQND.time_to_project, DDS_freq, p.ddsDefaults.metastable_qubit_dds_power, U(0.0, 'deg')) #self.addDDS('3GHz_qubit', # self.start + p.MetastableMicrowaveInterrogation.duration + p.Pi_times.metastable_qubit + p.MetastableRabiQND.projection_time, # p.Pi_times.metastable_qubit, # DDS_freq, # p.ddsDefaults.metastable_qubit_dds_power) self.end = self.start + p.MetastableMicrowaveInterrogation.duration + p.MetastableRabiQND.projection_time + p.Pi_times.metastable_qubit
def set_fixed_params(self): self.p['Line_Selection.qubit'] = 'qubit_0' self.p['MicrowaveInterrogation.detuning'] = U(0.0, 'kHz') self.p['MicrowaveInterrogation.microwave_phase'] = U(0.0, 'deg') self.p['Modes.state_detection_mode'] = 'Shelving' self.p['Deshelving.power1'] = self.p.ddsDefaults.repump_760_1_power self.p['Deshelving.power2'] = self.p.ddsDefaults.repump_760_2_power self.p['Deshelving.repump_power'] = self.p.ddsDefaults.repump_935_power self.p['HighFidelityMeasurement.drift_tracking'] = 'On'
def run(self, cxn, context): self.setup_parameters() self.setup_datavault('Frequency (THz)', 'kcounts/sec') self.low_rail = self.centerfrequency[ 'THz'] - self.scan_range['THz'] / 2.0 self.high_rail = self.centerfrequency[ 'THz'] + self.scan_range['THz'] / 2.0 self.tempdata = [] low_x = np.linspace(self.centerfrequency['THz'], self.low_rail, 100) high_x = np.linspace(self.centerfrequency['THz'], self.high_rail, 100) delay = self.wait_time['s'] self.pulser.amplitude(self.repump_AOM_chan, self.repump_power, context=self.context) for i in range(100): progress = i / 200.0 self.take_data(progress, delay) self.wm.set_pid_course(self.probe_dac_port, str(low_x[i])) self.rescue_ion(self.rescue_time['s']) self.check_break(progress) self.wm.set_pid_course(self.probe_dac_port, str(self.centerfrequency['THz'])) self.pulser.amplitude(self.repump_AOM_chan, U(-8.0, 'dBm'), context=self.context) # time.sleep(5*delay) time.sleep(10) self.pulser.amplitude(self.repump_AOM_chan, self.repump_power, context=self.context) for i in range(100): progress = (100 + i) / 200.0 self.take_data(progress, delay) self.wm.set_pid_course(self.probe_dac_port, str(high_x[i])) self.rescue_ion(self.rescue_time['s']) self.check_break(progress) self.wm.set_pid_course(self.probe_dac_port, str(self.centerfrequency['THz'])) self.pulser.amplitude(self.repump_AOM_chan, U(-8.0, 'dBm'), context=self.context) time.sleep(5 * delay) if len(self.tempdata) > 0: self.tempdata.sort() self.dv.add(self.tempdata) try: self.setup_grapher('935_linescan') except KeyError: pass
def toggle_repump_lasers(self, state): if state == 'Off': self.pulser.amplitude('760SP', U(-46.0, 'dBm')) self.pulser.amplitude('760SP2', U(-46.0, 'dBm')) if state == 'On': self.pulser.amplitude('760SP', self.p.ddsDefaults.repump_760_1_power) self.pulser.amplitude('760SP2', self.p.ddsDefaults.repump_760_2_power)
def sequence(self): from StatePreparation import StatePreparation from subsequences.LocalRotation import LocalRotation from subsequences.StateReadout import StateReadout from subsequences.EmptySequence import EmptySequence from subsequences.StateReadout import StateReadout ## calculate the 729 params rf = self.parameters.RabiFlopping # calculating the 729 freq form the Rabi flop params freq_729 = self.calc_freq(rf.line_selection, rf.selection_sideband, rf.order) # adding the Ramsey detuning freq_729 = freq_729 + self.parameters.RamseyScanGap.detuning print "1234" print " freq 729 ", freq_729 print " Wait time ", self.parameters.RamseyScanGap.ramsey_duration # building the sequence self.addSequence(StatePreparation) self.addSequence( LocalRotation, { "LocalRotation.frequency": freq_729, "LocalRotation.angle": U(np.pi / 2.0, 'rad'), "LocalRotation.phase": U(0, 'deg') }) self.addSequence( EmptySequence, { "EmptySequence.empty_sequence_duration": 0.5 * self.parameters.RamseyScanGap.ramsey_duration }) self.addSequence( LocalRotation, { "LocalRotation.frequency": freq_729, "LocalRotation.angle": U(np.pi / 1.0, 'rad'), "LocalRotation.phase": U(0, 'deg') }) self.addSequence( EmptySequence, { "EmptySequence.empty_sequence_duration": 0.5 * self.parameters.RamseyScanGap.ramsey_duration }) self.addSequence( LocalRotation, { "LocalRotation.frequency": freq_729, "LocalRotation.angle": U(np.pi / 2.0, 'rad'), "LocalRotation.phase": self.parameters.Ramsey.second_pulse_phase }) self.addSequence(StateReadout)
def analyze(self): if self.completed: self.p.set_parameter("StateReadout", "amplitude_397", self.peak_amp_397) freq = (self.peak_freq_397 - 5 * MHz) * 1e-6 self.p.set_parameter("StateReadout", "frequency_397", U(freq, "MHz")) self.p.set_parameter("StateReadout", "att_397", U(self.att_397, "dBm")) self.cxn.disconnect()
def sequence(self): p = self.parameters self.end = self.start + p.Shelving.duration self.addDDS('RF_Drive', self.start, p.Shelving.duration / 2.0, U(110.0, 'MHz'), U(-20.0, 'dBm')) self.addDDS('935SP', self.start + p.Shelving.duration / 2.0, p.Shelving.duration / 2.0, U(200.0, 'MHz'), U(-10.0, 'dBm'))
def sequence(self): ampl_off = U(-63.0, 'dBm') frequency = U(200, "MHz") start = U(1, "us") frequency_advance_duration = U(6, "us") slope_duration = U(4, "us") duration = U(8, "us") self.addDDS('729global', start, frequency_advance_duration, frequency, ampl_off) self.addDDS('729global', start + frequency_advance_duration, slope_duration, frequency, U(-5, "dBm"), profile=2) self.addDDS('729global', start + frequency_advance_duration + slope_duration, duration, frequency, U(-5, "dBm"), profile=4) self.addDDS('729global', start + frequency_advance_duration + slope_duration + duration, frequency_advance_duration, frequency, ampl_off, profile=0) self.end = U(100, "us") self.addSequence(StateReadout)
def run_initial(cls, cxn, parameters_dict): # print "Switching the 866DP to auto mode" cxn.pulser.switch_auto('866DP') # Set up MS option ms = parameters_dict.MolmerSorensen if ms.bichro_enable: # self.parameters['MolmerSorensen.frequency'] = freq_729 #self.parameters['LocalRotation.frequency'] = freq_729 # calc frequcy shift of the SP mode = ms.sideband_selection trap_frequency = parameters_dict['TrapFrequencies.' + mode] # print "Run initial to set the dds_cw freq" # print "Running ms gate trap freq is ", trap_frequency # be carfull we are collecting the minus order from th SP # minus sign in the detuning getts closer to the carrier f_global = U(80.0, 'MHz') + U(0.15, 'MHz') freq_blue = f_global - trap_frequency - ms.detuning + ms.ac_stark_shift - ms.asymetric_ac_stark_shift freq_red = f_global + trap_frequency + ms.detuning + ms.ac_stark_shift + ms.asymetric_ac_stark_shift # print "AC strak shift", ms.ac_stark_shift, " ms detuning ",ms.detuning # print "MS freq_blue", freq_blue # print "MS freq_red ", freq_red amp_blue = ms.amp_blue amp_red = ms.amp_red cxn.dds_cw.frequency('0', freq_blue) cxn.dds_cw.frequency('1', freq_red) cxn.dds_cw.frequency('2', f_global) # for driving the carrier cxn.dds_cw.amplitude('0', amp_blue) cxn.dds_cw.amplitude('1', amp_red) cxn.dds_cw.output('0', True) cxn.dds_cw.output('1', True) cxn.dds_cw.output('2', True) ampl_off = U(-63.0, 'dBm') cxn.dds_cw.amplitude('3',ampl_off ) cxn.dds_cw.amplitude('4',ampl_off) cxn.dds_cw.output('3', False) # time to thermalize the single pass cxn.dds_cw.output('4', False) # time to thermalize the single pass cxn.dds_cw.output('5', True) # time to thermalize the single pass time.sleep(0.5) #cxn.dds_cw.output('5', False) time.sleep(0.5) # just make sure everything is programmed before starting the sequence
def sequence(self): p = self.parameters self.addDDS('411DP', self.start, p.ZeemanPumping.duration, U(250.0, 'MHz') + p.Transitions.zeeman_pumping_minus / 2.0, p.ZeemanPumping.power) self.addDDS('760SP', self.start, p.ZeemanPumping.duration, U(160.0, 'MHz'), U(-7.0, 'dBm')) self.addTTL('976SP', self.start, p.ZeemanPumping.duration) self.end = self.start + p.ZeemanPumping.duration
def sequence(self): p = self.parameters self.addTTL('DopplerCoolingShutter', self.start - U(8.0, 'ms'), p.TestSequence.duration) self.addDDS('DopplerCoolingSP', self.start, p.TestSequence.duration, U(110.0, 'MHz'), U(-20.8, 'dBm')) self.addDDS('369DP', self.start, p.TestSequence.duration, U(200.0, 'MHz'), U(-0.1, 'dBm')) self.end = self.start + p.TestSequence.duration
def analyze_trackline1(self): cxn = labrad.connect() pv = cxn.parametervault ramsey_time = self.p.DriftTrackerRamsey.gap_time_1 duration = self.p.DriftTrackerRamsey.line_1_pi_time if self.StateReadout_readout_mode == "pmt": p1, p2 = self.data.TrackLine1.y[-1] else: p1, p2 = self.data.TrackLine1.y[int( self.p.DriftTrackerRamsey.ion_number)] if p1 == p2 == 0 or p1 == p2 == 1: logger.error("Abnormal populations, something isn't right.") raise TerminationRequested pstar = abs((p1 - p2) / (p1 + p2)) if pstar > .8: new_ramsey_time = ramsey_time / 2 if new_ramsey_time >= self.min_gap: ## pv.set_parameter("DriftTrackerRamsey", "gap_time_1", U(new_ramsey_time, "s")) logger.info("Halving gap_time_1.") if self.p.DriftTrackerRamsey.auto_schedule: pv.set_parameter("DriftTrackerRamsey", "auto_schedule", False) self.scheduler.submit("main", self.expid, priority=100) raise TerminationRequested elif pstar > .55: new_ramsey_time = ramsey_time * 2 / 3 if new_ramsey_time >= self.min_gap: pv.set_parameter("DriftTrackerRamsey", "gap_time_1", U(new_ramsey_time, "s")) logger.info("Reducing gap_time_1 by 1/3.") else: pv.set_parameter("DriftTrackerRamsey", "gap_time_1", U(self.min_gap, "s")) logger.info("Reducing gap_time_1 to minimum, as specified.") elif pstar < .15: new_ramsey_time = ramsey_time * 3 / 2 if new_ramsey_time < self.max_gap: pv.set_parameter("DriftTrackerRamsey", "gap_time_1", U(new_ramsey_time, "s")) logger.info("Increasing gap_time_1 by 3/2.") else: pv.set_parameter("DriftTrackerRamsey", "gap_time_1", U(self.max_gap, "s")) logger.info("Increasing gap_time_1 to maximum, as specified.") detuning = np.arcsin( (p1 - p2) / (p1 + p2)) / (2 * np.pi * ramsey_time + 4 * duration) self.detuning_1_global = detuning cxn.disconnect()
def sequence(self): p = self.parameters # select which zeeman level to prepare if p.Line_Selection.qubit == 'qubit_0': center = p.Transitions.qubit_0 pi_time = p.Pi_times.qubit_0 theta = (np.pi*p.MicrowaveInterrogation.duration/pi_time) % (4.0*np.pi) elif p.Line_Selection.qubit == 'qubit_plus': center = p.Transitions.qubit_plus pi_time = p.Pi_times.qubit_plus theta = (np.pi*p.MicrowaveInterrogation.duration/pi_time) % (4.0*np.pi) elif p.Line_Selection.qubit == 'qubit_minus': center = p.Transitions.qubit_minus pi_time = p.Pi_times.qubit_minus theta = (np.pi*p.MicrowaveInterrogation.duration/pi_time) % (4.0*np.pi) DDS_freq = p.ddsDefaults.qubit_dds_freq - (p.MicrowaveInterrogation.detuning + center) phi1 = np.arccos(-theta/(4.0*np.pi))*180.0/np.pi phi2 = 3.0*phi1 # initial attempt at rotation angle theta self.addDDS('Microwave_qubit', self.start, p.MicrowaveInterrogation.duration, DDS_freq, p.MicrowaveInterrogation.power, U(0.0, 'deg')) # corrective portion of the sequence self.addDDS('Microwave_qubit', self.start + p.MicrowaveInterrogation.duration, pi_time, DDS_freq, p.MicrowaveInterrogation.power, U(phi1, 'deg')) self.addDDS('Microwave_qubit', self.start + pi_time + p.MicrowaveInterrogation.duration, 2.0*pi_time, DDS_freq, p.MicrowaveInterrogation.power, U(phi2, 'deg')) self.addDDS('Microwave_qubit', self.start + 3.0*pi_time + p.MicrowaveInterrogation.duration, pi_time, DDS_freq, p.MicrowaveInterrogation.power, U(phi1, 'deg')) self.end = self.start + 4.0*pi_time + p.MicrowaveInterrogation.duration
def sequence(self): p = self.parameters self.addTTL('ReadoutCount', self.start, p.MLStateDetection.duration) self.addDDS('935SP', self.start, p.MLStateDetection.duration, U(320.0, 'MHz'), p.MLStateDetection.repump_power) self.addDDS('ModeLockedSP', self.start, p.MLStateDetection.duration, U(192.0, 'MHz'), p.MLStateDetection.ML_power) self.addDDS('369DP', self.start, p.MLStateDetection.duration, U(100.0, 'MHz'), U(-46.0, 'dBm')) self.end = self.start + p.MLStateDetection.duration