Esempio n. 1
0
 def getFrequency(self):
     """Get the CW frequency (MHz)"""
     freq = yield self.query('CFRQ:VALUE?')
     freq = float(freq)
     freq = WithUnit(freq, 'Hz')
     #### return in MHz, so as not to overload the client MaxFreq
     freq = freq.inUnitsOf('MHz')
     returnValue(freq)
Esempio n. 2
0
 def setup_sequence_parameters(self):
     self.load_frequency()
     flop = self.parameters.RabiFlopping
     self.parameters[
         'Excitation_729.rabi_excitation_amplitude'] = flop.rabi_amplitude_729
     minim, maxim, steps = flop.manual_scan
     minim = minim['us']
     maxim = maxim['us']
     self.scan = linspace(minim, maxim, steps)
     self.scan = [WithUnit(pt, 'us') for pt in self.scan]
Esempio n. 3
0
 def sequence(self):
     #this hack will be not needed with the new dds parsing methods
     p = self.parameters.Ramsey_2ions
     frequency_advance_duration = WithUnit(8.0, 'us')
     gap = WithUnit(1.0, 'us')
     ampl_off = WithUnit(-63.0, 'dBm')
     
     #detuning = WithUnit(0.0,'kHz')
     
     #self.end = self.start + frequency_advance_duration + p.rabi_excitation_duration
     self.end = self.start
     #print self.end
     ###set all frequencies but keep amplitude low first###
     self.addDDS('729', self.end, frequency_advance_duration, p.ion1_excitation_frequency1, ampl_off)
     self.addDDS('729_1', self.end, frequency_advance_duration, p.ion1_excitation_frequency2, ampl_off)        
     self.addDDS('729_aux', self.end, frequency_advance_duration, p.ion2_excitation_frequency1, ampl_off)
     self.addDDS('729_aux_1', self.end, frequency_advance_duration, p.ion2_excitation_frequency2, ampl_off)
     self.end = self.end + frequency_advance_duration
     
     ###pi/2 pulses###
     self.addDDS('729', self.end, p.ion1_excitation_duration1, p.ion1_excitation_frequency1, p.ion1_excitation_amplitude1)
     self.addDDS('729_aux', self.end, p.ion2_excitation_duration1, p.ion2_excitation_frequency1, p.ion2_excitation_amplitude1)
     print 'left ion pulse 1:', p.ion1_excitation_duration1, p.ion1_excitation_frequency1, p.ion1_excitation_amplitude1
     print 'right ion pulse 1:', p.ion2_excitation_duration1, p.ion2_excitation_frequency1, p.ion2_excitation_amplitude1
     self.end = self.end + max(p.ion1_excitation_duration1,p.ion2_excitation_duration1) + gap
     
     ###pi pulses###
     
     self.addDDS('729_1', self.end, p.ion1_excitation_duration2, p.ion1_excitation_frequency2, p.ion1_excitation_amplitude2)
     self.addDDS('729_aux_1', self.end, p.ion2_excitation_duration2, p.ion2_excitation_frequency2, p.ion2_excitation_amplitude2)
     print 'left ion pulse 2:', p.ion1_excitation_duration2, p.ion1_excitation_frequency2, p.ion1_excitation_amplitude2
     print 'right ion pulse 2:', p.ion2_excitation_duration2, p.ion2_excitation_frequency2, p.ion2_excitation_amplitude2
     self.end = self.end + max(p.ion1_excitation_duration2,p.ion2_excitation_duration2) + gap   
     
     ### ramsey time ###
     
     
     
     self.end = self.end+p.ramsey_time - WithUnit(20.0,'us')
     
     self.addDDS('global397', self.end, WithUnit(20.0,'us'), WithUnit(90.0,'MHz'), WithUnit(-12.0,'dBm'))
      
     self.end = self.end + WithUnit(20.0,'us')
     
     print 'Ramsey_time:', p.ramsey_time
     
     ### undo pi pulses
      
     self.addDDS('729_1', self.end, p.ion1_excitation_duration2, p.ion1_excitation_frequency2, p.ion1_excitation_amplitude2,WithUnit(180,'deg'))
     self.addDDS('729_aux_1', self.end, p.ion2_excitation_duration2, p.ion2_excitation_frequency2, p.ion2_excitation_amplitude2,WithUnit(180,'deg'))
     #print 'left ion pulse 2:', p.ion1_excitation_duration2, p.ion1_excitation_frequency2, p.ion1_excitation_amplitude2
     self.end = self.end + max(p.ion1_excitation_duration2,p.ion2_excitation_duration2) + gap  
     
     ###pi/2 pulses###
     self.addDDS('729', self.end, p.ion1_excitation_duration1, p.ion1_excitation_frequency1, p.ion1_excitation_amplitude1,WithUnit(180,'deg'))
     self.addDDS('729_aux', self.end, p.ion2_excitation_duration1, p.ion2_excitation_frequency1, p.ion2_excitation_amplitude1,p.ion2_excitation_phase1)
     print 'phase:', p.ion2_excitation_phase1
     self.end = self.end + max(p.ion1_excitation_duration1,p.ion2_excitation_duration1) + gap
    def run(self, cxn, context):
        import time
        dds5_state = self.dds_cw.output('5')

        self.dds_cw.output('5', True)
        time.sleep(1)
        dt = self.parameters.DriftTracker
        ramsey_dt = self.parameters.DriftTrackerRamsey
        if dt.line_selection_1 == dt.line_selection_2:
            raise Exception ("The two Drift Tracking lines can not be the same")
        replace_1 = TreeDict.fromdict({
                                       'DriftTrackerRamsey.line_selection':dt.line_selection_1,
                                       'DriftTrackerRamsey.pi_time':ramsey_dt.line_1_pi_time,
                                       'DriftTrackerRamsey.amplitude':ramsey_dt.line_1_amplitude,
                                       'DriftTrackerRamsey.detuning':WithUnit(0,'Hz'),
                                       'StateReadout.use_camera_for_readout':ramsey_dt.use_camera_for_readout,
                                       })
        replace_2 = TreeDict.fromdict({
                                       'DriftTrackerRamsey.line_selection':dt.line_selection_2,
                                       'DriftTrackerRamsey.pi_time':ramsey_dt.line_2_pi_time,
                                       'DriftTrackerRamsey.amplitude':ramsey_dt.line_2_amplitude,
                                       'DriftTrackerRamsey.detuning':WithUnit(0,'Hz'),
                                       'StateReadout.use_camera_for_readout':ramsey_dt.use_camera_for_readout,
                                       })
        #replace_1,replace_2 = np.random.permutation([replace_1,replace_2]) this line breaks something
        self.ramsey_dt.set_parameters(replace_1)
        self.ramsey_dt.set_progress_limits(0, 50.0)
        frequency_1,excitation = self.ramsey_dt.run(cxn, context)
        error_sensitivity = ramsey_dt.error_sensitivity
        if not 0.5 - error_sensitivity <= excitation <= 0.5 + error_sensitivity:
            raise Exception("Incorrect Excitation {}".format(replace_1.DriftTrackerRamsey.line_selection)) 
        self.ramsey_dt.set_parameters(replace_2)
        self.ramsey_dt.set_progress_limits(50.0, 100.0)
        frequency_2,excitation = self.ramsey_dt.run(cxn, context)
        if not 0.5 - error_sensitivity <= excitation <= 0.5 + error_sensitivity:
            raise Exception("Incorrect Excitation {}".format(replace_2.DriftTrackerRamsey.line_selection)) 
        self.submit_centers(replace_1,frequency_1,replace_2,frequency_2)
        
        # resetting DDS5 state
        time.sleep(1)
        #self.dds_cw.output('5', False)
        self.dds_cw.output('5', dds5_state)
        time.sleep(1)
Esempio n. 5
0
    def sequence(self):
        h = self.parameters.Heating
        frequency_advance_duration = WithUnit(6, 'us')
        ampl_off = WithUnit(-63.0, 'dBm')

        #import boerge_tools
        #boerge_tools.dump_keys(h)

        #make sure light turns on immediately with no delay
        repump_duration = frequency_advance_duration + h.blue_heating_duration + h.blue_heating_repump_additional
        self.addDDS('radial', self.start, frequency_advance_duration,
                    h.local_blue_heating_frequency_397, ampl_off)
        self.addDDS('radial', self.start + frequency_advance_duration,
                    h.blue_heating_duration,
                    h.local_blue_heating_frequency_397,
                    h.local_blue_heating_amplitude_397)
        self.addDDS('866', self.start, repump_duration,
                    h.blue_heating_frequency_866, h.blue_heating_amplitude_866)
        self.end = self.start + repump_duration
    def load_frequency(self):
        #reloads trap frequencyies and gets the latest information from the drift tracker
        self.reload_some_parameters(self.trap_frequencies)
        gate = self.parameters.MolmerSorensen
        # set the double pass to the carrier frequency
        frequency = cm.frequency_from_line_selection(gate.frequency_selection,
                                                     gate.manual_frequency_729,
                                                     gate.line_selection,
                                                     self.drift_tracker)
        #trap = self.parameters.TrapFrequencies
        self.parameters['MolmerSorensen.frequency'] = frequency
        self.parameters['LocalRotation.frequency'] = frequency

        ## now program the CW dds boards
        # Ok so, because we are stupid the single pass AOMs all use the -1 order
        # so if we make the single pass frequency 81 MHz, we're actually driving -red-
        # of the carrier by 1 MHz. Keep that in mind until we change it.
        mode = gate.sideband_selection
        trap_frequency = self.parameters['TrapFrequencies.' + mode]

        f_global = WithUnit(80.0, 'MHz') + WithUnit(0.15, 'MHz')
        freq_blue = f_global - trap_frequency - gate.detuning + gate.ac_stark_shift
        freq_red = f_global + trap_frequency + gate.detuning + gate.ac_stark_shift
        amp_blue = self.parameters.MolmerSorensen.amp_blue
        amp_red = self.parameters.MolmerSorensen.amp_red
        self.dds_cw.frequency('0', freq_blue)
        self.dds_cw.frequency('1', freq_red)
        self.dds_cw.frequency('2', f_global)  # for driving the carrier
        self.dds_cw.amplitude('0', amp_blue)
        self.dds_cw.amplitude('1', amp_red)
        #self.dds_cw.amplitude('2', amp)
        self.dds_cw.output('0', True)
        self.dds_cw.output('1', True)
        self.dds_cw.output('2', True)

        self.dds_cw.output('5', True)  # thermalize the single pass
        time.sleep(1.0)

        self.dds_cw.output('5', False)
        time.sleep(
            0.5
        )  # just make sure everything is programmed before starting the sequence
Esempio n. 7
0
 def get_current_line(self, time_offset=0.0):
     '''get the frequency of the current line now. Have an option to put in a time offset'''
     current_time = time.time() - self.start_time
     ## add additional offset to predict frequency in the future
     current_time = current_time + time_offset
     try:
         freq = self.fitter.evaluate(current_time, self.line_fit)
     except TypeError:
         raise Exception("Fit is not available")
     freq = WithUnit(freq, 'kHz')
     return freq
Esempio n. 8
0
 def get_transition_energies(self, B, zero_offset=WithUnit(0, 'MHz')):
     '''returns the transition enenrgies in MHz where zero_offset is the 0-field transition energy between S and D'''
     ans = []
     for m_s, E_s, repr_s in self.S.magnetic_to_energy(B):
         for m_d, E_d, repr_d in self.D.magnetic_to_energy(B):
             if abs(m_d - m_s) in self.allowed_transitions:
                 name = repr_s + repr_d
                 diff = E_d - E_s
                 diff += zero_offset
                 ans.append((name, diff))
     return ans
Esempio n. 9
0
 def sequence(self):
     p = self.parameters
     self.end = WithUnit(10, 'us')
     self.addSequence(turn_off_all)
     self.addSequence(doppler_cooling_after_repump_d)
     if p.OpticalPumping.optical_pumping_enable:
         self.addSequence(optical_pumping)
     if p.SidebandCooling.sideband_cooling_enable:
         self.addSequence(sideband_cooling)
     self.addSequence(ramsey_excitation)
     self.addSequence(tomography_readout)
Esempio n. 10
0
    def sequence(self):
        p = self.parameters
        self.end = WithUnit(10, 'us')
        self.addSequence(turn_off_all)
        #self.addSequence(sample_pid)

        self.addSequence(doppler_cooling_after_repump_d)
        if p.StatePreparation.optical_pumping_enable:
            self.addSequence(optical_pumping)

        self.addSequence(eit_cooling_statedetection)
Esempio n. 11
0
    def sequence(self):
        #this hack will be not needed with the new dds parsing methods
        pl = self.parameters.LocalRotation
        frequency_advance_duration = WithUnit(6, 'us')
        ampl_off = WithUnit(-63.0, 'dBm')
        
        time = pl.pi_time/2.
        self.end = self.start + 2*frequency_advance_duration + time
        #first advance the frequency but keep amplitude low        
        self.addDDS('729local', self.start, frequency_advance_duration, pl.frequency, ampl_off)
        #turn on
        self.addDDS('729local', self.start + frequency_advance_duration, time, pl.frequency, pl.amplitude, pl.phase)
        
        # make sure the local pulse is off before starting the next thing
        self.addDDS('729local', self.start, frequency_advance_duration, pl.frequency, ampl_off)

        f = WithUnit(80.0 - 0.2, 'MHz')
        amp = pl.sp_amplitude
        self.addDDS('SP_local', self.start, frequency_advance_duration, f, ampl_off)
        self.addDDS('SP_local', self.start + frequency_advance_duration, time, f, amp)
Esempio n. 12
0
def simple_scan(parameter, unit, offset=None):
    minim, maxim, steps = parameter
    minim = minim[unit]
    maxim = maxim[unit]
    if offset is not None:
        minim += offset[unit]
        maxim += offset[unit]

    scan = np.linspace(minim, maxim, steps)
    scan = [WithUnit(pt, unit) for pt in scan]
    return scan
Esempio n. 13
0
 def __init__(self, scan_script_cls, measure_script_cls, parameter, minim,
              maxim, steps, units):
     self.scan_script_cls = scan_script_cls
     self.measure_script_cls = measure_script_cls
     self.parameter = parameter
     self.units = units
     self.scan_points = linspace(minim, maxim, steps)
     self.scan_points = [WithUnit(pt, units) for pt in self.scan_points]
     scan_name = self.name_format(scan_script_cls.name,
                                  measure_script_cls.name)
     super(scan_experiment_1D_measure, self).__init__(scan_name)
Esempio n. 14
0
 def get_excluded_points(self, c, client):
     '''
     Get excluded local fit data points, including B field and line center
     Input i.e.: ('lattice')
     Return i.e.: ([(Value(58.58644199371338, 's'), Value(3.307939265053879, 'gauss')),
                    (Value(335.5155029296875, 's'), Value(3.307939265053879, 'gauss'))],
                   [(Value(58.58644199371338, 's'), Value(-21.578811982043565, 'MHz')),
                    (Value(335.5155029296875, 's'), Value(-21.578811982043565, 'MHz'))])
     '''
     self.client_examination(client)
     excluded_B = []
     excluded_line_center = []
     for t, b_field in zip(self.t_measure_B_nofit[client],
                           self.B_field_nofit[client]):
         excluded_B.append((WithUnit(t, 's'), WithUnit(b_field, 'gauss')))
     for t, freq in zip(self.t_measure_line_center_nofit[client],
                        self.line_center_nofit[client]):
         excluded_line_center.append((WithUnit(t,
                                               's'), WithUnit(freq, 'MHz')))
     return [excluded_B, excluded_line_center]
Esempio n. 15
0
    def sequence(self):
        ma = self.parameters.Motion_Analysis
        
        freq_397 = WithUnit(85.0, 'MHz')
        freq_866 = WithUnit(80.0, 'MHz')
        
        self.addTTL('TTL1', self.start, ma.pulse_width_397 + WithUnit(2, 'us')) # 2 us for safe TTL switch on        
        self.addDDS('global397', self.start + WithUnit(1, 'us'), ma.pulse_width_397, freq_397, ma.amplitude_397)
        self.addDDS('866DP', self.start + WithUnit(1, 'us'), ma.pulse_width_397, freq_866, ma.amplitude_866)

        start = self.start + ma.pulse_width_397 + WithUnit(2, 'us') + ma.ramsey_time
        
        self.addTTL('TTL1', start, ma.pulse_width_397 + WithUnit(2, 'us'))
        self.addDDS('global397', start + WithUnit(1, 'us'), ma.pulse_width_397, freq_397, ma.amplitude_397)
        self.addDDS('866DP', start + WithUnit(1, 'us'), ma.pulse_width_397, freq_866, ma.amplitude_866)        
        
        self.end = start + ma.pulse_width_397 + WithUnit(2, 'us')
        
        #self.end = self.start + ma.pulse_width_397 + WithUnit(2, 'us')
        self.addSequence(optical_pumping)
 def compute_phase_correction(self, parity_signal):
     '''
     computes the correction of the phase 
     '''
     contrast = self.parameters.Parity_LLI.contrast
     if np.abs(parity_signal) > contrast:
         error_signal = -1 * np.sign(parity_signal) * 90.0
     else:
         error_signal = np.arccos(
             parity_signal / contrast) * 180 / np.pi - 90.0
     return WithUnit(error_signal, 'deg')
Esempio n. 17
0
 def setup_sequence_parameters(self):
     self.load_frequency()
     self.parameters[
         'Excitation_729.rabi_excitation_amplitude'] = self.parameters.RabiFlopping.rabi_amplitude_729
     self.parameters[
         'Excitation_729.rabi_excitation_duration'] = self.parameters.RabiFlopping_Sit.sit_on_excitation
     minim, maxim, steps = self.parameters.SidebandCoolingDetuningScan.manual_scan
     minim = minim['kHz']
     maxim = maxim['kHz']
     self.scan = linspace(minim, maxim, steps)
     self.scan = [WithUnit(pt, 'kHz') for pt in self.scan]
    def sequence(self):

        p = self.parameters
        self.end = WithUnit(10, 'us')

        self.addSequence(turn_off_all)

        self.addSequence(doppler_cooling_after_repump_d)
        if p.StatePreparation.optical_pumping_enable:
            self.addSequence(optical_pumping)
        if p.StatePreparation.sideband_cooling_enable:
            self.addSequence(sideband_cooling)
        self.addSequence(
            local_pi_over_2_no_splocal,
            TreeDict.fromdict({'LocalRotation.phase': WithUnit(0.0, 'deg')}))
        self.addSequence(stark_shift_global)
        self.addSequence(
            local_pi_over_2_no_splocal,
            TreeDict.fromdict({'LocalRotation.phase': WithUnit(0.0, 'deg')}))
        self.addSequence(tomography_readout)
Esempio n. 19
0
 def setup_sequence_parameters(self):
     self.load_frequency()
     self.parameters[
         'Excitation_729.rabi_excitation_amplitude'] = self.parameters.RabiFlopping.rabi_amplitude_729
     self.parameters[
         'Excitation_729.rabi_excitation_duration'] = self.parameters.RabiFlopping_Sit.sit_on_excitation
     minim, maxim, steps = self.parameters.ParametricCoupling.manual_time_scan
     minim = minim['us']
     maxim = maxim['us']
     self.scan = linspace(minim, maxim, steps)
     self.scan = [WithUnit(pt, 'us') for pt in self.scan]
 def sequence(self):
     
     p = self.parameters.Crystallization 
     print "Turnning on the crystalization ttl"
     #print self.start
     print p.duration
     print  self.start
     #print p.repump_d_duration
     self.end = self.start + p.duration
     
     self.addTTL('crystallization', self.start, p.duration + WithUnit(0.2, 'us') )
Esempio n. 21
0
    def sequence(self):
        #this hack will be not needed with the new dds parsing methods
        p = self.parameters.Excitation_729
        q = self.parameters.LocalStarkShift

        #print "Frequency" + str(p.rabi_excitation_frequency)

        frequency_advance_duration = WithUnit(6, 'us')
        ampl_off = WithUnit(-63.0, 'dBm')
        f0 = WithUnit(80., 'MHz')  # base frequency for Stark shift laser
        self.end = self.start + frequency_advance_duration + p.rabi_excitation_duration
        #first advance the frequency but keep amplitude low
        self.addDDS(p.channel_729, self.start, frequency_advance_duration,
                    p.rabi_excitation_frequency, ampl_off)
        if q.enable:  # also turn on local stark shift
            self.addDDS('stark_shift', self.start, frequency_advance_duration,
                        f0 + q.detuning, ampl_off)
            self.addDDS('729DP', self.start, frequency_advance_duration,
                        p.rabi_excitation_frequency, ampl_off)
        #turn on
        self.addDDS(p.channel_729, self.start + frequency_advance_duration,
                    p.rabi_excitation_duration, p.rabi_excitation_frequency,
                    p.rabi_excitation_amplitude, p.rabi_excitation_phase)
        if q.enable:
            self.addDDS('stark_shift', self.start + frequency_advance_duration,
                        p.rabi_excitation_duration, f0 + q.detuning,
                        q.amplitude)
            self.addDDS('729DP_1', self.start + frequency_advance_duration,
                        p.rabi_excitation_duration,
                        p.rabi_excitation_frequency, WithUnit(-12, 'dBm'))
            #self.addTTL('bichromatic_2', self.start, + p.rabi_excitation_duration + frequency_advance_duration) # REMOVE THIS LATER
        if p.bichro:
            # only one of these double passes should be on so it shouldn't hurt to do both TTLs
            self.addTTL(
                'bichromatic_1', self.start,
                +p.rabi_excitation_duration + frequency_advance_duration)
            self.addTTL(
                'bichromatic_2', self.start,
                +p.rabi_excitation_duration + frequency_advance_duration)
            self.end = self.end + WithUnit(
                2.0, 'us')  # small buffer to turn off the TTL
Esempio n. 22
0
    def run(self, cxn, context):
        dt = self.parameters.DriftTracker
        ramsey_dt = self.parameters.DriftTrackerRamsey
        if dt.line_selection_1 == dt.line_selection_2:
            raise Exception("The two Drift Tracking lines can not be the same")
        replace_1 = TreeDict.fromdict({
            'DriftTrackerRamsey.line_selection':
            dt.line_selection_1,
            'DriftTrackerRamsey.pi_time':
            ramsey_dt.line_1_pi_time,
            'DriftTrackerRamsey.amplitude':
            ramsey_dt.line_1_amplitude,
            'DriftTrackerRamsey.detuning':
            WithUnit(0, 'Hz'),
        })
        replace_2 = TreeDict.fromdict({
            'DriftTrackerRamsey.line_selection':
            dt.line_selection_2,
            'DriftTrackerRamsey.pi_time':
            ramsey_dt.line_2_pi_time,
            'DriftTrackerRamsey.amplitude':
            ramsey_dt.line_2_amplitude,
            'DriftTrackerRamsey.detuning':
            WithUnit(0, 'Hz')
        })

        replace_1, replace_2 = np.random.permutation([replace_1, replace_2])
        self.ramsey_dt.set_parameters(replace_1)
        self.ramsey_dt.set_progress_limits(0, 50.0)
        frequency_1, excitation = self.ramsey_dt.run(cxn, context)
        error_sensitivity = ramsey_dt.error_sensitivity
        if not 0.5 - error_sensitivity <= excitation <= 0.5 + error_sensitivity:
            raise Exception("Incorrect Excitation {}".format(
                replace_1.DriftTrackerRamsey.line_selection))
        self.ramsey_dt.set_parameters(replace_2)
        self.ramsey_dt.set_progress_limits(50.0, 100.0)
        frequency_2, excitation = self.ramsey_dt.run(cxn, context)
        if not 0.5 - error_sensitivity <= excitation <= 0.5 + error_sensitivity:
            raise Exception("Incorrect Excitation {}".format(
                replace_2.DriftTrackerRamsey.line_selection))
        self.submit_centers(replace_1, frequency_1, replace_2, frequency_2)
Esempio n. 23
0
    def sequence(self):

        t = WithUnit(500., 'us')
        self.start = self.start + WithUnit(5, 'us')
        self.end = self.start + t
        #ch = 'global397'
        ch = '729DP_1'
        freq = WithUnit(0., 'MHz')
        ampl = WithUnit(-5., 'dBm')
        phase = WithUnit(0, 'deg')
        prof = 0
        self.addDDS(ch, self.start, t, freq, ampl, phase, prof)
        self.start = self.start + WithUnit(2, 'us') + t
        ampl = WithUnit(-5., 'dBm')
        freq = WithUnit(0, 'MHz')
        phase = WithUnit(90, 'deg')
        self.addDDS(ch, self.start, t, freq, ampl, phase, prof)
    def setup_sequence_parameters(self):
        op = self.parameters.OpticalPumping
        sp = self.parameters.StatePreparation
        optical_pumping_frequency = cm.frequency_from_line_selection(op.frequency_selection, op.manual_frequency_729, op.line_selection, self.drift_tracker, sp.optical_pumping_enable)
        self.parameters['OpticalPumping.optical_pumping_frequency_729'] = optical_pumping_frequency
        aux = self.parameters.OpticalPumpingAux
        aux_optical_pumping_frequency = cm.frequency_from_line_selection('auto', WithUnit(0,'MHz'),  aux.aux_op_line_selection, self.drift_tracker, aux.aux_op_enable)
        self.parameters['OpticalPumpingAux.aux_optical_frequency_729'] = aux_optical_pumping_frequency
        sc = self.parameters.SidebandCooling
        sideband_cooling_frequency = cm.frequency_from_line_selection(sc.frequency_selection, sc.manual_frequency_729, sc.line_selection, self.drift_tracker, sp.sideband_cooling_enable)
        if sc.frequency_selection == 'auto': 
            trap = self.parameters.TrapFrequencies
            sideband_cooling_frequency = cm.add_sidebands(sideband_cooling_frequency, sc.sideband_selection, trap)
        self.parameters['SidebandCooling.sideband_cooling_frequency_729'] = sideband_cooling_frequency
        #print "sbc"
        #print sideband_cooling_frequency
        sc2 = self.parameters.SequentialSBCooling
        sc2freq = cm.frequency_from_line_selection(sc.frequency_selection, sc.manual_frequency_729, sc.line_selection, self.drift_tracker, sp.sideband_cooling_enable)
        sc2freq = cm.add_sidebands(sc2freq, sc2.sideband_selection, trap)
        self.parameters['SequentialSBCooling.frequency'] = sc2freq
        #print sc2freq

        ### sideband precooling stuff ###
        spc = self.parameters.SidebandPrecooling
        sbc_carrier_frequency = cm.frequency_from_line_selection(sc.frequency_selection, sc.manual_frequency_729, sc.line_selection, self.drift_tracker, sp.sideband_cooling_enable)
        frequency_1 = WithUnit(0.0, 'MHz')
        frequency_2 = WithUnit(0.0, 'MHz')
        if spc.mode_1 != 'off':
            tf = self.parameters['TrapFrequencies.' + spc.mode_1]
            frequency_1 = sbc_carrier_frequency - tf
        if spc.mode_2 != 'off':
            tf = self.parameters['TrapFrequencies.' + spc.mode_2]
            frequency_2 = sbc_carrier_frequency - tf
        self.parameters['SidebandPrecooling.frequency_1'] = frequency_1
        self.parameters['SidebandPrecooling.frequency_2'] = frequency_2

        # set state readout time
        if self.use_camera:
            self.parameters['StateReadout.state_readout_duration'] = self.parameters.StateReadout.camera_readout_duration
        else:
            self.parameters['StateReadout.state_readout_duration'] = self.parameters.StateReadout.pmt_readout_duration
Esempio n. 25
0
    def sequence(self):

        st = self.parameters.StateReadout
        readout_mode = st.readout_mode
        repump_additional = self.parameters.DopplerCooling.doppler_cooling_repump_additional  # need the doppler paramters for the additional repumper time

        if 'camera' in readout_mode:
            #            print "using camera in the subseq for readout"
            st.use_camera_for_readout = True
        else:
            #             print "using PMT"
            st.use_camera_for_readout = False

        # fic the readout duration according to PMT/Camera
        if st.use_camera_for_readout:
            readout_duration = st.camera_readout_duration
        else:
            readout_duration = st.pmt_readout_duration

        # sending the camera trigger and adjusting the times
        if st.use_camera_for_readout:
            self.addTTL('camera', self.start, st.camera_trigger_width)
            # adding 2 milli sec to allow the camera transfer
            duration_397 = readout_duration + st.camera_transfer_additional
            duration_866 = readout_duration + st.camera_transfer_additional + repump_additional
        else:
            # removing the additional time for the camera transfer
            duration_397 = readout_duration
            duration_866 = readout_duration + repump_additional

        self.addTTL('ReadoutCount', self.start, readout_duration)

        self.addDDS('397', self.start, duration_397,
                    st.state_readout_frequency_397,
                    st.state_readout_amplitude_397)
        #self.addDDS ('866',self.start, duration_866, st.state_readout_frequency_866, st.state_readout_amplitude_866)
        # changing the 866 from a dds to a rf source enabled by a switch
        self.addTTL('866DP', self.start + WithUnit(0.25, 'us'),
                    duration_866 - WithUnit(0.1, 'us'))

        self.end = self.start + duration_866
Esempio n. 26
0
	def addDDS(self, channel, start, duration, frequency, amplitude, phase = WithUnit(0, 'deg')):
		"""
		add a dds pulse to the pulse sequence
		"""
		dds_channel = dds_config.get(channel, None)
		if dds_channel is not None:
			#additional configuration provided
			channel = dds_channel.name
			frequency = dds_channel.freq_conversion(frequency)
			amplitude = dds_channel.ampl_conversion(amplitude)
			phase = dds_channel.phase_conversion(phase)
		self._dds_pulses.append((channel, start, duration, frequency, amplitude, phase))
Esempio n. 27
0
 def sequence(self):
     p = self.parameters
     self.end = WithUnit(10, 'us')
     self.addSequence(turn_off_all)
     self.addSequence(doppler_cooling_after_repump_d)
     if p.OpticalPumping.optical_pumping_enable:
         self.addSequence(optical_pumping)
     if p.SidebandCooling.sideband_cooling_enable:
         self.addSequence(sideband_cooling)
     self.addSequence(empty_sequence, TreeDict.fromdict({'EmptySequence.empty_sequence_duration':p.Heating.background_heating_time}))
     self.addSequence(rabi_excitation)
     self.addSequence(tomography_readout)
Esempio n. 28
0
 def setup_sequence_parameters(self):
     flop = self.parameters.RabiFlopping
     frequency = cm.frequency_from_line_selection(flop.frequency_selection, flop.manual_frequency_729, flop.line_selection, self.drift_tracker)
     trap = self.parameters.TrapFrequencies
     if flop.frequency_selection == 'auto':
         frequency = cm.add_sidebands(frequency, flop.sideband_selection, trap)   
     self.parameters['Excitation_729.rabi_excitation_frequency'] = frequency
     self.parameters['Excitation_729.rabi_excitation_amplitude'] = flop.rabi_amplitude_729
     minim,maxim,steps = self.parameters.RamseyScanPhase.scanphase
     minim = minim['deg']; maxim = maxim['deg']
     self.scan = linspace(minim,maxim, steps)
     self.scan = [WithUnit(pt, 'deg') for pt in self.scan]
 def calculate_detuning(self, excitations):
     dt = self.parameters.DriftTrackerRamsey
     if not dt.optical_pumping_enable_DT:
         #if we are not doing optical pumping during drift tracking, then need to double the measured excitations
         excitations[0] = excitations[0]*2.0
         excitations[1] = excitations[1]*2.0
     average = (excitations[0] + excitations[1]) / 2.0
     deviation = (excitations[0] - excitations[1])
     detuning = arcsin(deviation) / (2.0 * pi * dt.gap_time['s'])
     detuning = WithUnit(detuning, 'Hz')
     self.dv.add([time.time(), average, deviation])
     return detuning, average
 def setup_sequence_parameters(self):
     self.load_frequency()
     flop = self.parameters.RabiPowerFlopping_2ions
     self.parameters[
         'Rabi_excitation_729_2ions.ion1_excitation_duration'] = flop.ion1_excitation_duration
     self.parameters[
         'Rabi_excitation_729_2ions.ion2_excitation_duration'] = flop.ion2_excitation_duration
     minim, maxim, steps = flop.manual_power_scan
     minim = minim['dBm']
     maxim = maxim['dBm']
     if flop.log_scale_scan:
         #print "log scale"
         self.scan = np.linspace(10**(minim / 10),
                                 10**(maxim / 10),
                                 num=steps)
         self.scan = 10 * np.log10(self.scan)
         self.scan = [WithUnit(pt, 'dBm') for pt in self.scan]
     else:
         #print "linear scale"
         self.scan = np.linspace(minim, maxim, steps)
         self.scan = [WithUnit(pt, 'dBm') for pt in self.scan]
Esempio n. 31
0
 def setup_sequence_parameters(self):
     self.load_frequency()
     flop = self.parameters.RabiFlopping
     self.parameters[
         'Excitation_729.rabi_excitation_amplitude'] = flop.rabi_amplitude_729
     self.parameters[
         'Excitation_729.rabi_excitation_duration'] = self.parameters.RabiFlopping_Sit.sit_on_excitation
     minim, maxim, steps = self.parameters.Heating.scan_pulse_freq
     minim = minim['MHz']
     maxim = maxim['MHz']
     self.scan = linspace(minim, maxim, steps)
     self.scan = [WithUnit(pt, 'MHz') for pt in self.scan]