예제 #1
0
def calibrate_theta_pulse(name, multiplicity=1, debug=False, mw2=False, **kw):

    m = pulsar_msmt.GeneralPiCalibrationSingleElement(name)
    espin_funcs.prepare(m)

    pulse_shape = m.params['pulse_shape']
    pts = 25

    m.params['pts'] = pts

    if pulse_shape == 'Square':

        raise KeyError('This hasnt been written for square pulses yet!')

    ps.X_pulse(
        m)  #### update the pulse params depending on the chosen pulse shape.

    m.params['repetitions'] = 2500

    m.params['MW_pulse_amplitudes'] = np.linspace(0.3,
                                                  m.params['Hermite_pi_amp'],
                                                  pts)

    m.params['multiplicity'] = np.ones(pts) * multiplicity
    m.params['delay_reps'] = 0
    # for the autoanalysis
    m.params['sweep_name'] = 'MW amplitude (V)'

    m.params['sweep_pts'] = m.params['MW_pulse_amplitudes']
    m.params['wait_for_AWG_done'] = 1

    m.MW_pi = pulse.cp(ps.X_pulse(m), phase=0)
    espin_funcs.finish(m, debug=debug, pulse_pi=m.MW_pi)
예제 #2
0
def sweep_number_pi_pulses(name, debug=False, pts=30):
    m = pulsar_msmt.GeneralPiCalibration(name)
    espin_funcs.prepare(m)
    ps.X_pulse(
        m)  #### update the pulse params depending on the chosen pulse shape.
    m.params['multiplicity'] = np.arange(1, 1 + 2 * pts, 2)
    m.params['pulse_type'] = 'Hermite quantum memory'
    # pts = 10

    m.params['pts'] = pts
    # m.params['repetitions'] = 3000 if multiplicity == 1 else 5000
    m.params['repetitions'] = 1000  #if multiplicity == 1 else 5000

    # Pulse settings
    m.params['MW_duration'] = m.params['fast_pi_duration']
    m.params['MW_pulse_amplitudes'] = np.ones(pts) * m.params[
        'fast_pi_amp']  #XXXXX -0.05, 0.05
    m.params['delay_reps'] = 20

    # for the autoanalysis
    m.params['sweep_name'] = 'Number of pulses'
    m.params['sweep_pts'] = m.params['multiplicity']
    m.params['wait_for_AWG_done'] = 1

    # Add Hermite X pulse

    m.MW_pi = ps.X_pulse(m)
    espin_funcs.finish(m, debug=debug, pulse_pi=m.MW_pi)
예제 #3
0
def _create_mw_pulses(msmt,Gate):
    Gate.mw_X = ps.X_pulse(msmt)
    Gate.mw_pi2 = ps.Xpi2_pulse(msmt)
    Gate.mw_mpi2 = ps.mXpi2_pulse(msmt)
    Gate.mw_first_pulse = pulse.cp(ps.Xpi2_pulse(msmt),amplitude = msmt.params['mw_first_pulse_amp'],length = msmt.params['mw_first_pulse_length'],phase = msmt.params['mw_first_pulse_phase'])
    Gate.mw_second_pulse = pulse.cp(ps.X_pulse(msmt),amplitude = msmt.params['mw_second_pulse_amp'],length = msmt.params['mw_second_pulse_length'])
    


    if hasattr(Gate,'first_pulse_is_pi2') and hasattr(Gate,'first_mw_pulse_phase'):
        if Gate.first_pulse_is_pi2:
            Gate.mw_first_pulse = pulse.cp(Gate.mw_pi2, phase = Gate.first_mw_pulse_phase)
    elif hasattr(Gate,'first_pulse_is_pi2'):
        if Gate.first_pulse_is_pi2:
            Gate.mw_first_pulse = pulse.cp(Gate.mw_pi2, phase = msmt.params['mw_first_pulse_phase'])

    if hasattr(Gate,'no_first_pulse'):
        if Gate.no_first_pulse:
            Gate.mw_first_pulse = pulse.cp(Gate.mw_X,amplitude = 0)

    if hasattr(Gate,'no_mw_pulse'):
        if Gate.no_mw_pulse:
            Gate.mw_first_pulse = pulse.cp(Gate.mw_X,amplitude = 0)
            Gate.mw_pi2 = pulse.cp(Gate.mw_X,amplitude = 0)
            Gate.mw_mpi2 = pulse.cp(Gate.mw_X,amplitude = 0)
            Gate.mw_X = pulse.cp(Gate.mw_X,amplitude = 0)
예제 #4
0
def _create_mw_pulses(msmt,Gate):
    Gate.mw_X = ps.X_pulse(msmt)
    Gate.mw_pi2 = ps.Xpi2_pulse(msmt)
    Gate.mw_mpi2 = ps.mXpi2_pulse(msmt)


    if msmt.params['do_calc_theta'] > 0 or msmt.params['general_sweep_name'] == 'sin2_theta':
        fit_a  = msmt.params['sin2_theta_fit_a']      
        fit_x0 = msmt.params['sin2_theta_fit_x0']     
        fit_of = msmt.params['sin2_theta_fit_of']
        p0 = msmt.params['sin2_theta']    
        msmt.params['mw_first_pulse_amp'] = fit_x0 - np.sqrt((p0-1+fit_of)/fit_a) ### calc right pulse amp from theta calibration
    Gate.mw_first_pulse = pulse.cp(ps.X_pulse(msmt),amplitude = msmt.params['mw_first_pulse_amp'],length = msmt.params['mw_first_pulse_length'],phase = msmt.params['mw_first_pulse_phase'])
    

    if msmt.params['first_mw_pulse_is_pi2'] > 0 and hasattr(Gate,'first_mw_pulse_phase'):
            Gate.mw_first_pulse = pulse.cp(Gate.mw_pi2, phase = Gate.first_mw_pulse_phase)
    elif msmt.params['first_mw_pulse_is_pi2']:
            Gate.mw_first_pulse = pulse.cp(Gate.mw_pi2, phase = msmt.params['mw_first_pulse_phase'])

    if hasattr(Gate,'no_first_pulse'):
        if Gate.no_first_pulse:
            Gate.mw_first_pulse = pulse.cp(Gate.mw_X,amplitude = 0)

    if hasattr(Gate,'no_mw_pulse') or msmt.params['do_only_opt_pi'] >0:
        if Gate.no_mw_pulse:
            Gate.mw_first_pulse = pulse.cp(Gate.mw_X,amplitude = 0)
            Gate.mw_pi2 = pulse.cp(Gate.mw_X,amplitude = 0)
            Gate.mw_mpi2 = pulse.cp(Gate.mw_X,amplitude = 0)
            Gate.mw_X = pulse.cp(Gate.mw_X,amplitude = 0)
        if msmt.params['do_only_opt_pi'] >0:
            Gate.mw_first_pulse = pulse.cp(Gate.mw_X,amplitude = 0)
            Gate.mw_pi2 = pulse.cp(Gate.mw_X,amplitude = 0)
            Gate.mw_mpi2 = pulse.cp(Gate.mw_X,amplitude = 0)
            Gate.mw_X = pulse.cp(Gate.mw_X,amplitude = 0)
def calibrate_pi_pulse(name, multiplicity=1, debug=False):
    m = pulsar_msmt.GeneralPiCalibrationSingleElement(name)
    
    m.params.from_dict(qt.exp_params['samples'][SAMPLE])
    m.params.from_dict(qt.exp_params['protocols']['AdwinSSRO'])
    m.params.from_dict(qt.exp_params['protocols'][SAMPLE_CFG]['AdwinSSRO'])
    m.params.from_dict(qt.exp_params['protocols'][SAMPLE_CFG]['AdwinSSRO-integrated'])
    m.params.from_dict(qt.exp_params['protocols']['AdwinSSRO+espin'])
    m.params.from_dict(qt.exp_params['protocols']['cr_mod'])
    m.params.from_dict(qt.exp_params['protocols'][SAMPLE_CFG]['pulses'])

    m.params['pulse_type'] = 'Hermite quantum memory'
    # m.params['pulse_type'] = 'Square quantum memory'



    pts = 16

    m.params['pts'] = pts
    # m.params['repetitions'] = 3000 if multiplicity == 1 else 5000
    m.params['repetitions'] = 600 if multiplicity == 1 else 1000
    rng = 0.2 if multiplicity == 1 else 0.03

    ### Pulse settings
    m.params['multiplicity'] = np.ones(pts)*multiplicity

    # For square pulses
    m.params['MW_duration'] = m.params['Hermite_pi_length']
    m.params['MW_pulse_amplitudes'] = m.params['Hermite_pi_amp'] + np.linspace(-rng, rng, pts)  #XXXXX -0.05, 0.05 
    
    # For hermite pulses
    # m.params['MW_duration'] = m.params['Hermite_fast_pi_duration']
    # m.params['MW_pulse_amplitudes'] =  m.params['Hermite_fast_pi_amp'] + np.linspace(-0.04, 0.02, pts)  #XXXXX -0.05, 0.05 

    m.params['delay_reps'] = 195 ## Currently not used
    # m.params['mw_power'] = 20 ###put in msmt_params.
    

    # for the autoanalysis
    m.params['sweep_name'] = 'MW amplitude (V)'
   
    m.params['sweep_pts'] = m.params['MW_pulse_amplitudes']
    m.params['wait_for_AWG_done'] = 1

    # Add Hermite X pulse
    
    ps.X_pulse(m)
    m.MW_pi = pulse.cp(ps.X_pulse(m),phase = 0)

    print 'duration ', m.params['MW_duration']
    print 'amp ', m.params['MW_pulse_amplitudes'][0]
    espin_funcs.finish(m, debug=debug, pulse_pi=m.MW_pi)
예제 #6
0
def calibrate_pi_pulse(name, multiplicity=1,RO_basis = 'Z', debug=False, mw2=False, wait_time_pulses=15000e-9, **kw):

    
    m = GeneralPiCalibrationSingleElement(name+str(multiplicity))
    
    m.params.from_dict(qt.exp_params['samples'][SAMPLE])
    m.params.from_dict(qt.exp_params['protocols']['AdwinSSRO'])
    m.params.from_dict(qt.exp_params['protocols'][SAMPLE_CFG]['AdwinSSRO'])
    m.params.from_dict(qt.exp_params['protocols'][SAMPLE_CFG]['AdwinSSRO-integrated'])
    m.params.from_dict(qt.exp_params['protocols']['AdwinSSRO+espin'])
    m.params.from_dict(qt.exp_params['protocols']['cr_mod'])
    m.params.from_dict(qt.exp_params['protocols'][SAMPLE_CFG]['pulses'])

    pulse_shape = m.params['pulse_shape']
    pts = 20

    m.params['pts'] = pts
    
    ps.X_pulse(m) #### update the pulse params depending on the chosen pulse shape.

    m.params['repetitions'] = 1600 if multiplicity == 1 else 2000
    rng = 0.15 if multiplicity == 1 else 0.04


    ### comment NK: the previous parameters for MW_duration etc. were not used anywhere in the underlying measurement class.
    ###             therefore, I removed them
    if mw2:
        m.params['MW_pulse_amplitudes'] = m.params['mw2_fast_pi_amp'] + np.linspace(-rng, rng, pts)
    else: 
        m.params['MW_pulse_amplitudes'] = m.params['fast_pi_amp'] + np.linspace(-rng, rng, pts)  
            
    print m.params['MW_pulse_amplitudes'] 
    
    m.params['multiplicity'] = np.ones(pts)*multiplicity
    m.params['wait_time_pulses']=wait_time_pulses
    m.params['RO_basis'] = RO_basis
    m.params['delay_reps'] = 0
    # for the autoanalysis
    m.params['sweep_name'] = 'MW amplitude (V)'
   
    m.params['sweep_pts'] = m.params['MW_pulse_amplitudes']
    m.params['wait_for_AWG_done'] = 1

    m.MW_pi=ps.X_pulse(m)
    m.MW_pi2=ps.Xpi2_pulse(m)

    # m.MW_pi = pulse.cp(ps.mw2_X_pulse(m), phase = 0) if mw2 else pulse.cp(ps.X_pulse(m), phase = 0)
    # m.MW_pi = pulse.cp(ps.mw2_X_pulse(m), phase = 0) if mw2 else pulse.cp(ps.X_pulse(m), phase = 0)
    espin_funcs.finish(m, debug=debug, pulse_pi=m.MW_pi,pulse_pi2=m.MW_pi2)
예제 #7
0
def fidelity_SSRO_0_p1(name):
    m = pulsar_msmt.SSRO_calibration_msp1(name)

    m.params.from_dict(qt.exp_params['samples'][SAMPLE])
    m.params.from_dict(qt.exp_params['protocols']['AdwinSSRO'])
    m.params.from_dict(qt.exp_params['protocols']['cr_mod'])
    m.params.from_dict(qt.exp_params['protocols'][SAMPLE_CFG]['AdwinSSRO'])
    m.params.from_dict(
        qt.exp_params['protocols'][SAMPLE_CFG]['AdwinSSRO-integrated'])
    m.params.from_dict(qt.exp_params['protocols']['AdwinSSRO+espin'])
    m.params.from_dict(qt.exp_params['protocols'][SAMPLE_CFG]['pulses'])
    #m.params.from_dict(qt.exp_params['protocols'][SAMPLE_CFG]['Magnetometry'])

    m.params['pts'] = 1
    pts = m.params['pts']
    m.params['repetitions'] = 750
    m.params['Ex_SP_amplitude'] = 0
    sweep_param = 'length'

    print m.params['pts']

    X = ps.X_pulse(m)

    # m.autoconfig() #Redundant because executed in m.run()? Tim
    #m.generate_sequence()
    m.generate_sequence(upload=True, Pi_pulse=X)
    m.run()
    qt.msleep(2)
    m.save()
    qt.msleep(2)
    m.finish()
예제 #8
0
def pi_pulse_sweepdelay(name, multiplicity=1, debug=False):
    m = pulsar_msmt.PiCalibration_SweepDelay(name)
    espin_funcs.prepare(m)

    m.params['pulse_type'] = 'Hermite quantum memory'
    # m.params['pulse_type'] = 'Square quantum memory'
    pts = 11

    m.params['pts'] = pts
    # m.params['repetitions'] = 3000 if multiplicity == 1 else 5000
    m.params['repetitions'] = 1000 if multiplicity == 1 else 5000

    # Pulse settings
    m.params['multiplicity'] = np.ones(pts) * multiplicity
    m.params['MW_duration'] = m.params['Hermite_fast_pi_duration']
    m.params[
        'MW_pulse_amplitudes'] = m.params['Hermite_fast_pi_amp'] * np.ones(pts)

    m.params['delay_reps'] = np.linspace(1, 100, pts)

    m.params['mw_power'] = 20

    # for the autoanalysis
    m.params['sweep_name'] = 'Interpulse delay (us)'

    m.params['sweep_pts'] = m.params['interpulse_delay'] * 1e6
    m.params['wait_for_AWG_done'] = 1

    # Add Hermite X pulse

    m.MW_pi = ps.X_pulse(m)
    espin_funcs.finish(m, debug=debug, pulse_pi=m.MW_pi)
예제 #9
0
def ssro_MWInit(name,
                multiplicity=[0],
                debug=False,
                mw2=[False],
                el_states=['ms0'],
                **kw):

    m = pulsar_msmt.SSRO_MWInit(name)

    # Import all msmst params
    m.params.from_dict(qt.exp_params['samples'][SAMPLE])
    m.params.from_dict(qt.exp_params['protocols']['AdwinSSRO'])
    m.params.from_dict(qt.exp_params['protocols'][SAMPLE_CFG]['AdwinSSRO'])
    m.params.from_dict(qt.exp_params['protocols']['AdwinSSRO+espin'])
    m.params.from_dict(qt.exp_params['protocols']['cr_mod'])
    m.params.from_dict(qt.exp_params['protocols'][SAMPLE_CFG]['pulses'])

    # MW settings
    pulse_shape = kw.get('pulse_shape', None)
    if pulse_shape == None:
        pulse_shape == m.params['pulse_shape']
    else:
        m.params['pulse_shape'] = pulse_shape

    m.params['wait_for_AWG_done'] = 1
    # m.params['sequence_wait_time'] = 20
    m.params['send_AWG_start'] = 1
    m.params['pts'] = 1

    m.params['repetitions'] = 5000
    m.params['Ex_SP_amplitude'] = 0

    for mult, mw2, s in zip(multiplicity, mw2, el_states):
        #selecting correct parameters
        if s == 'msm1' and qt.current_setup == 'lt3':
            m.params['Hermite_pi_length'] = 144e-9
            m.params['Hermite_pi_amp'] = 0.939
            m.params['electron_transition'] = '_m1'
            m.params['mw_frq'] = 1.719319e9 - 100e3
        if s == 'msm1' and qt.current_setup == 'lt4':
            m.params['Hermite_pi_length'] = 126e-9
            m.params['Hermite_pi_amp'] = 0.844
            m.params['electron_transition'] = '_m1'
            m.params['mw_frq'] = 1.718064e9

        m.params['multiplicity'] = mult
        ### need to select the correct frequency

        m.MW_pi = pulse.cp(ps.pi_pulse_MW2(m), phase=0) if mw2 else pulse.cp(
            ps.X_pulse(m), phase=0)

        m.autoconfig()
        m.generate_sequence(upload=True, pulse_pi=m.MW_pi)
        m.setup()
        if not debug:
            print 'electron state: ' + str(s)
            m.run(setup=False, autoconfig=False)
            m.save(s)
    m.finish()
def electronT2_NoTriggers(name,
                          debug=False,
                          range_start=0e-6,
                          range_end=1000e-6):
    m = pulsar_delay.ElectronT2NoTriggers(name)

    m.params.from_dict(qt.exp_params['samples'][SAMPLE])
    m.params.from_dict(qt.exp_params['protocols']['AdwinSSRO'])
    m.params.from_dict(qt.exp_params['protocols'][SAMPLE_CFG]['AdwinSSRO'])
    m.params.from_dict(
        qt.exp_params['protocols'][SAMPLE_CFG]['AdwinSSRO-integrated'])
    m.params.from_dict(qt.exp_params['protocols']['AdwinSSRO+espin'])
    m.params.from_dict(qt.exp_params['protocols']['cr_mod'])
    m.params.from_dict(qt.exp_params['protocols'][SAMPLE_CFG]['pulses'])

    m.params['pulse_type'] = 'Hermite'

    m.params['Ex_SP_amplitude'] = 0
    m.params[
        'AWG_to_adwin_ttl_trigger_duration'] = 2e-6  # commenting this out gives an erro
    m.params['wait_for_AWG_done'] = 1
    m.params['sequence_wait_time'] = 1

    pts = 51
    m.params['pts'] = pts
    m.params['repetitions'] = 500
    #m.params['wait_for_AWG_done']=1
    #m.params['evolution_times'] = np.linspace(0,0.25*(pts-1)*1/m.params['N_HF_frq'],pts)
    # range from 0 to 1000 us
    m.params['evolution_times'] = np.linspace(range_start, range_end, pts)

    # MW pulses
    m.params['detuning'] = 0  #-1e6 #0.5e6
    X_pi2 = ps.Xpi2_pulse(m)
    X_pi = ps.X_pulse(m)
    m.params['pulse_sweep_pi2_phases1'] = np.ones(pts) * m.params[
        'X_phase']  # First pi/2 = +X
    # m.params['pulse_sweep_pi2_phases2'] = np.ones(pts) * (m.params['X_phase']+180 )   # Second pi/2 = mX
    m.params['pulse_sweep_pi2_phases2'] = np.ones(pts) * m.params['X_phase']
    m.params['pulse_sweep_pi_phases'] = np.ones(pts) * m.params['X_phase']

    # for the autoanalysis
    m.params['sweep_name'] = 'evolution time (ns)'
    m.params['sweep_pts'] = (m.params['evolution_times'] +
                             2 * m.params['Hermite_pi2_length'] +
                             m.params['Hermite_pi_length']) * 1e9

    # for the self-triggering through the delay line
    # m.params['self_trigger_delay'] = 500e-9 # 0.5 us
    # m.params['self_trigger_duration'] = 100e-9

    # Start measurement
    m.autoconfig()
    m.generate_sequence(upload=True, pulse_pi2=X_pi2, pulse_pi=X_pi)

    if not debug:
        m.run(autoconfig=False)
        m.save()
        m.finish()
예제 #11
0
def calibrate_pi_pulse(name, multiplicity=1, debug=False, mw2=False, **kw):

    m = pulsar_msmt.GeneralPiCalibrationSingleElement(name)
    espin_funcs.prepare(m)

    pulse_shape = m.params['pulse_shape']
    pts = 15

    m.params['pts'] = pts

    ps.X_pulse(
        m)  #### update the pulse params depending on the chosen pulse shape.

    m.params['repetitions'] = 1000 if multiplicity == 1 else 1000
    rng = 0.1 if multiplicity == 1 else 0.06

    ### comment NK: the previous parameters for MW_duration etc. were not used anywhere in the underlying measurement class.
    ###             therefore, I removed them
    if mw2:
        m.params[
            'MW_pulse_amplitudes'] = m.params['mw2_fast_pi_amp'] + np.linspace(
                -rng, rng, pts)
    else:
        m.params[
            'MW_pulse_amplitudes'] = m.params['fast_pi_amp'] + np.linspace(
                -rng, rng, pts)

    # m.params['MW_pulse_amplitudes'] = np.linspace(0,0.9,pts)

    m.params['interpulse_delay'] = [7.5e-6] * pts
    m.params['AWG_controlled_readout'] = 0
    m.params['multiplicity'] = np.ones(pts) * multiplicity
    m.params['delay_reps'] = 0
    # for the autoanalysis
    m.params['sweep_name'] = 'MW amplitude (V)'

    m.params['sweep_pts'] = m.params['MW_pulse_amplitudes']
    m.params['wait_for_AWG_done'] = 1

    m.MW_pi = pulse.cp(ps.mw2_X_pulse(m), phase=0) if mw2 else pulse.cp(
        ps.X_pulse(m), phase=0)
    espin_funcs.finish(m, debug=debug, pulse_pi=m.MW_pi)
예제 #12
0
def _LDE_rephasing_elt(msmt,Gate,forced_wait_duration = 0,addressed_carbon=None):
    """waits the right amount of time after and LDE element for the 
    electron to rephase.

    NOTE: after developing the purification code for several one realizes that we should distinguish between LDE 1 and LDE 2.
    The two elements are very different from each other.
    """
    _create_wait_times(Gate)
    _create_syncs_and_triggers(msmt,Gate)
    e = element.Element(Gate.name, pulsar = qt.pulsar)

    if forced_wait_duration == 0:

        ### we need to add some time for the following carbon gate to this rephasing element
        ### this time is tau_cut and is calculated below.
        # TODO: generalize this to multiple carbons
        c = str(addressed_carbon)
        e_trans = msmt.params['electron_transition']

        #### for concatenating LDE with a longer entangling sequence, see also purify_slave, function carbon_swap_gate:
        if 'ElectronDD_tau' in msmt.params.to_dict().keys():
            tau = msmt.params['ElectronDD_tau']
        else:
            tau = msmt.params['C'+c+'_Ren_tau'+e_trans][0]
        ps.X_pulse(msmt) # update pi pulse parameters
        fast_pi_duration        = msmt.params['fast_pi_duration'] 
        pulse_tau               = tau - fast_pi_duration/2.0
        n_wait_reps, tau_remaind = divmod(round(2*pulse_tau*1e9),1e3) 
        if n_wait_reps %2 == 0:
            tau_cut = 1e-6
        else:
            tau_cut = 1.5e-6


        # LDE 2 does not need tau_cut because we do dynamic phase correction with a fixed tau_cut.
        if 'LDE_rephasing_2' in Gate.name:
            tau_cut =1e-6 #0e-6
            # print e.samples()


        ### avg. repump time + tau_cut gives the right amount of time.
        wait_duration = msmt.params['average_repump_time'] + tau_cut

        
        test = pulse.cp(Gate.T, length=wait_duration,name='rephasing')
        test.name = 'rephase'
        e.add(test)

    else:
        e = element.Element(Gate.name, pulsar = qt.pulsar)
        test = pulse.cp(Gate.T,length=forced_wait_duration,name = 'rephase_with_known_wait')
        e.add(test)
    return e
예제 #13
0
def _create_mw_pulses(msmt,Gate):
    Gate.mw_X = ps.X_pulse(msmt)
    Gate.mw_pi2 = ps.Xpi2_pulse(msmt)
    Gate.mw_mpi2 = ps.mXpi2_pulse(msmt)
    Gate.mw_first_pulse = pulse.cp(ps.Xpi2_pulse(msmt),amplitude = msmt.params['mw_first_pulse_amp'],length = msmt.params['mw_first_pulse_length'],phase = msmt.params['mw_first_pulse_phase'])

    
    if 'first_mw_pulse_type' in msmt.params:
        if msmt.params['first_mw_pulse_type'] == 'pi':
            Gate.mw_first_pulse = pulse.cp(Gate.mw_X, phase = msmt.params['mw_first_pulse_phase'])
        elif msmt.params['first_mw_pulse_type'] == 'pi2':
            Gate.mw_first_pulse = pulse.cp(Gate.mw_pi2, phase = msmt.params['mw_first_pulse_phase'])
        elif msmt.params['first_mw_pulse_type'] == 'none':
            Gate.mw_first_pulse = pulse.cp(Gate.mw_X,amplitude = 0)
        elif msmt.params['first_mw_pulse_type'] == 'square':
            msmt.params['pulse_shape'] = 'Square'
            Gate.mw_first_pulse = ps.X_pulse(msmt)
            msmt.params['pulse_shape'] = 'Hermite'
        else:
            raise ValueError("What are you doing first_mw_pulse_type does not make sense.")
    else:
        if hasattr(Gate,'first_pulse_is_pi2') and hasattr(Gate,'first_mw_pulse_phase'):
            if Gate.first_pulse_is_pi2:
                Gate.mw_first_pulse = pulse.cp(Gate.mw_pi2, phase = Gate.first_mw_pulse_phase)
        elif hasattr(Gate,'first_pulse_is_pi2'):
            if Gate.first_pulse_is_pi2:
                Gate.mw_first_pulse = pulse.cp(Gate.mw_pi2, phase = msmt.params['mw_first_pulse_phase'])

        if hasattr(Gate,'no_first_pulse'):
            if Gate.no_first_pulse:
                Gate.mw_first_pulse = pulse.cp(Gate.mw_X,amplitude = 0)

        if hasattr(Gate,'no_mw_pulse'):
            if Gate.no_mw_pulse:
                Gate.mw_first_pulse = pulse.cp(Gate.mw_X,amplitude = 0,  length = 0)
                Gate.mw_pi2 = pulse.cp(Gate.mw_X,amplitude = 0,          length = 0)
                Gate.mw_mpi2 = pulse.cp(Gate.mw_X,amplitude = 0,         length = 0)
                Gate.mw_X = pulse.cp(Gate.mw_X,amplitude = 0,            length = 0)
def calibrate_pi2_pulse(name, debug=False):
    m = pulsar_msmt.GeneralPi2Calibration(name)

    m.params.from_dict(qt.exp_params['samples'][SAMPLE])
    m.params.from_dict(qt.exp_params['protocols']['AdwinSSRO'])
    m.params.from_dict(qt.exp_params['protocols'][SAMPLE_CFG]['AdwinSSRO'])
    m.params.from_dict(
        qt.exp_params['protocols'][SAMPLE_CFG]['AdwinSSRO-integrated'])
    m.params.from_dict(qt.exp_params['protocols']['AdwinSSRO+espin'])
    m.params.from_dict(qt.exp_params['protocols']['cr_mod'])
    m.params.from_dict(qt.exp_params['protocols'][SAMPLE_CFG]['pulses'])

    print 'pulse_shape =', m.params['pulse_shape']

    pts = 11
    m.params['pulse_type'] = 'Square QuMem'
    m.params['pts_awg'] = pts
    m.params['repetitions'] = 1500

    # Append pi & pi/2 pulses to instance
    m.MW_pi = ps.X_pulse(m)

    m.MW_pi2 = ps.Xpi2_pulse(m)

    # we do actually two msmts for every sweep point, that's why the awg gets only half of the
    # pts;
    m.params['pts'] = 2 * pts

    m.params['Ex_SP_amplitude'] = 0
    # m.params['SP_duration'] = 50
    m.params['wait_for_AWG_done'] = 1

    # Square pulses
    sweep_axis = m.params['fast_pi2_amp'] + np.linspace(-0.1, 0.1, pts)
    m.params['pulse_pi2_sweep_amps'] = sweep_axis

    # Hermite pulses
    sweep_axis = m.params['Hermite_fast_pi2_amp'] + np.linspace(
        -0.08, 0.08, pts)
    m.params['pulse_pi2_sweep_amps'] = sweep_axis

    # for the autoanalysis
    m.params['sweep_name'] = 'MW pi/2 amp (V)'
    m.params['sweep_pts'] = np.sort(np.append(sweep_axis, sweep_axis))

    espin_funcs.finish(m, debug=debug, pulse_pi=m.MW_pi, pulse_pi2=m.MW_pi2)
예제 #15
0
def calibrate_pi2_pulse(name, debug=False, mw2=False):
    m = pulsar_msmt.GeneralPi2Calibration(name)
    espin_funcs.prepare(m)

    pts = 11
    m.params['pulse_type'] = 'Hermite'
    m.params['pts_awg'] = pts
    m.params['repetitions'] = 2000

    if mw2:
        print m.params['mw2_pulse_shape']
        m.MW_pi = ps.mw2_X_pulse(m)
        m.MW_pi2 = ps.mw2_Xpi2_pulse(m)
        sweep_axis = m.params['mw2_Hermite_pi2_amp'] + np.linspace(
            -0.12, 0.12, pts)
        m.params['pulse_pi2_sweep_amps'] = sweep_axis
    else:
        print m.params['pulse_shape']
        m.MW_pi = ps.X_pulse(m)
        m.MW_pi2 = ps.Xpi2_pulse(m)
        sweep_axis = m.params['Hermite_pi2_amp'] + np.linspace(
            -0.12, 0.12, pts)
        m.params['pulse_pi2_sweep_amps'] = sweep_axis

    # print 'this is the length',m.MW_pi2.length
    # we do actually two msmts for every sweep point, that's why the awg gets only half of the
    # pts;
    m.params['pts'] = 2 * pts

    m.params['Ex_SP_amplitude'] = 0
    # m.params['SP_duration'] = 50
    m.params['wait_for_AWG_done'] = 1

    # Square pulses
    # sweep_axis =  m.params['fast_pi2_amp'] + np.linspace(-0.02, 0.02, pts)
    # m.params['pulse_pi2_sweep_amps'] = sweep_axis

    # for the autoanalysis
    m.params['sweep_name'] = 'MW pi/2 amp (V)'
    m.params['sweep_pts'] = np.sort(np.append(sweep_axis, sweep_axis))

    espin_funcs.finish(m, debug=debug, pulse_pi=m.MW_pi, pulse_pi2=m.MW_pi2)
def pi_pulse_sweepdelay(name, multiplicity=1, debug=False):
    m = pulsar_msmt.PiCalibration_SweepDelay(name)

    m.params.from_dict(qt.exp_params['samples'][SAMPLE])
    m.params.from_dict(qt.exp_params['protocols']['AdwinSSRO'])
    m.params.from_dict(qt.exp_params['protocols'][SAMPLE_CFG]['AdwinSSRO'])
    m.params.from_dict(
        qt.exp_params['protocols'][SAMPLE_CFG]['AdwinSSRO-integrated'])
    m.params.from_dict(qt.exp_params['protocols']['AdwinSSRO+espin'])
    m.params.from_dict(qt.exp_params['protocols']['cr_mod'])
    m.params.from_dict(qt.exp_params['protocols'][SAMPLE_CFG]['pulses'])

    m.params['pulse_type'] = 'Hermite quantum memory'
    # m.params['pulse_type'] = 'Square quantum memory'
    pts = 21

    m.params['pts'] = pts
    # m.params['repetitions'] = 3000 if multiplicity == 1 else 5000
    m.params['repetitions'] = 1000 if multiplicity == 1 else 5000

    # Pulse settings
    m.params['multiplicity'] = np.ones(pts) * multiplicity
    m.params['MW_duration'] = m.params['Hermite_fast_pi_duration']
    m.params[
        'MW_pulse_amplitudes'] = m.params['Hermite_fast_pi_amp'] * np.ones(pts)

    m.params['delay_reps'] = np.linspace(1, 100, pts)

    # for the autoanalysis
    m.params['sweep_name'] = 'Interpulse delay (us)'

    m.params['sweep_pts'] = m.params['interpulse_delay'] * 1e6
    m.params['wait_for_AWG_done'] = 1

    # Add Hermite X pulse
    # m.MW_pi = hermite_Xpi(m)
    m.MW_pi = ps.X_pulse(m)
    espin_funcs.finish(m, debug=debug, pulse_pi=m.MW_pi)
def sweep_number_pi_pulses(name,  debug=False, pts = 30):
    m = pulsar_msmt.GeneralPiCalibration(name)
    
    m.params.from_dict(qt.exp_params['samples'][SAMPLE])
    m.params.from_dict(qt.exp_params['protocols']['AdwinSSRO'])
    m.params.from_dict(qt.exp_params['protocols'][SAMPLE_CFG]['AdwinSSRO'])
    m.params.from_dict(qt.exp_params['protocols'][SAMPLE_CFG]['AdwinSSRO-integrated'])
    m.params.from_dict(qt.exp_params['protocols']['AdwinSSRO+espin'])
    m.params.from_dict(qt.exp_params['protocols']['cr_mod'])
    m.params.from_dict(qt.exp_params['protocols'][SAMPLE_CFG]['pulses'])

    m.params['multiplicity'] = np.arange(1, 1 + 2 * pts, 2)
    m.params['pulse_type'] = 'Hermite quantum memory'
    # pts = 10


    m.params['pts'] = pts
    # m.params['repetitions'] = 3000 if multiplicity == 1 else 5000
    m.params['repetitions'] = 1000 #if multiplicity == 1 else 5000

    # Pulse settings
    m.params['MW_duration'] = m.params['Hermite_fast_pi_duration']
    m.params['MW_pulse_amplitudes'] =  np.ones(pts) * m.params['Hermite_fast_pi_amp']  #XXXXX -0.05, 0.05 
    m.params['delay_reps'] = 1000
    m.params['mw_power'] = 20
    

    # for the autoanalysis
    m.params['sweep_name'] = 'Number of pulses'
    m.params['sweep_pts'] = m.params['multiplicity']
    m.params['wait_for_AWG_done'] = 1
    

    # Add Hermite X pulse
    
    m.MW_pi = ps.X_pulse(m)
    espin_funcs.finish(m, debug=debug, pulse_pi=m.MW_pi)
예제 #18
0
def calibrate_BB1_pi_pulse(name, multiplicity=1, debug=False):
    m = pulsar_msmt.ScrofulousPiCalibrationSingleElement(name)

    m.params.from_dict(qt.exp_params['samples'][SAMPLE])
    m.params.from_dict(qt.exp_params['protocols']['AdwinSSRO'])
    m.params.from_dict(qt.exp_params['protocols'][SAMPLE_CFG]['AdwinSSRO'])
    m.params.from_dict(
        qt.exp_params['protocols'][SAMPLE_CFG]['AdwinSSRO-integrated'])
    m.params.from_dict(qt.exp_params['protocols']['AdwinSSRO+espin'])
    m.params.from_dict(qt.exp_params['protocols']['cr_mod'])
    m.params.from_dict(qt.exp_params['protocols'][SAMPLE_CFG]['pulses'])

    pts = 16

    m.params['pulse_type'] = 'Hermite'

    m.params['pts'] = pts
    # m.params['repetitions'] = 3000 if multiplicity == 1 else 5000
    m.params['repetitions'] = 600 if multiplicity == 1 else 600
    rng = 0.2 if multiplicity == 1 else 0.08

    ### Pulse settings
    m.params['multiplicity'] = np.ones(pts) * multiplicity

    # For square pulses
    m.params[
        'MW_pulse_amplitudes'] = m.params['BB1_fast_pi_amp'] + np.linspace(
            -rng, rng, pts)
    ### which pulse amplitudes are swept? Is a string containing integers. e.g. '123' sweeps all amplitudes
    m.params['swept_pulses'] = '12345'

    m.params['delay_reps'] = 1  #195 ## Currently not used

    # for the autoanalysis
    m.params['sweep_name'] = 'MW amplitude (V)'

    m.params['sweep_pts'] = m.params['MW_pulse_amplitudes']
    m.params['wait_for_AWG_done'] = 1

    # Add Hermite X pulse
    # m.MW_pi = hermite_Xpi(m)
    m.MW_pi = ps.X_pulse(m)
    m.MW_pi = pulse.cp(m.MW_pi,
                       length=m.params['BB1_fast_pi_duration'],
                       amplitude=m.params['BB1_fast_pi_amp'])
    m.MW_pi2 = ps.Xpi2_pulse(m)

    # m.Phi60 = pulse.cp(m.MW_pi, phase = m.params['X_phase']+60)

    ### scrofolous pulse: https://arxiv.org/pdf/quant-ph/0208092.pdf
    m.Phi1 = pulse.cp(m.MW_pi, phase=60)
    m.Phi2 = pulse.cp(m.MW_pi, phase=300)
    m.params['composite_pulse_keys'] = ['1', '2', '1']
    m.pulse_dict = {
        '1': m.Phi1,
        '2': m.Phi2
    }  ### keys refer to composite_pulse_keys

    #### BB1 pulse is below
    # m.Phi1 = pulse.cp(m.MW_pi, phase = m.params['X_phase']+104.5)
    # m.Phi2 = pulse.cp(m.MW_pi, phase = m.params['X_phase']+313.4)
    # m.Phi3 = pulse.cp(m.MW_pi, phase = m.params['X_phase'])
    # m.params['composite_pulse_keys'] = ['1','2','2','1','3'] ### determines what pulse you want to do in which oder
    # m.pulse_dict = {'1': m.Phi1,'2' : m.Phi2,'3' : m.Phi3} ### keys refer to composite_pulse_keys

    print 'amp ', m.params['MW_pulse_amplitudes'][0]
    espin_funcs.finish(m, debug=debug, pulse_dict=m.pulse_dict)
def hahn_echo_variable_delayline(name,
                                 debug=False,
                                 vary_refocussing_time=True,
                                 range_start=-2e-6,
                                 range_end=2e6,
                                 evolution_1_self_trigger=False,
                                 evolution_2_self_trigger=False,
                                 refocussing_time=1e-6):
    m = pulsar_delay.ElectronRefocussingTriggered(name)

    m.params.from_dict(qt.exp_params['samples'][SAMPLE])
    m.params.from_dict(qt.exp_params['protocols']['AdwinSSRO'])
    m.params.from_dict(qt.exp_params['protocols'][SAMPLE_CFG]['AdwinSSRO'])
    m.params.from_dict(
        qt.exp_params['protocols'][SAMPLE_CFG]['AdwinSSRO-integrated'])
    m.params.from_dict(qt.exp_params['protocols']['AdwinSSRO+espin'])
    m.params.from_dict(qt.exp_params['protocols']['cr_mod'])
    m.params.from_dict(qt.exp_params['protocols'][SAMPLE_CFG]['pulses'])
    m.params.from_dict(qt.exp_params['protocols']['AdwinSSRO+delay'])

    m.params['delay_to_voltage_fitparams'] = np.loadtxt(
        '../lt4_V_c_from_dl_fit_20170323_1914.txt')
    m.params['delay_to_voltage_fitfunc'] = V_c_from_dl_fit

    m.params['pulse_type'] = 'Hermite'

    m.params['Ex_SP_amplitude'] = 0
    m.params['AWG_to_adwin_ttl_trigger_duration'] = 2e-6
    m.params['wait_for_AWG_done'] = 1
    m.params['sequence_wait_time'] = 1

    m.params['self_trigger_duration'] = 100e-9

    # m.params['delay_voltage_DAC_channel'] = 16 # should be moved to msmt_params?
    m.params['do_delay_voltage_control'] = 1

    pts = 11

    m.params['pts'] = pts
    m.params['repetitions'] = 1000

    if vary_refocussing_time:
        m.params['refocussing_time'] = np.linspace(range_start, range_end, pts)
        m.params['defocussing_offset'] = 0.0 * np.ones(pts)
        m.params['self_trigger_delay'] = m.params['refocussing_time']

        m.params['sweep_name'] = 'single-sided free evolution time (us)'
        m.params['sweep_pts'] = (m.params['refocussing_time']) * 1e6

    else:
        m.params['refocussing_time'] = np.ones(pts) * refocussing_time
        m.params['defocussing_offset'] = np.linspace(range_start, range_end,
                                                     pts)
        m.params['self_trigger_delay'] = m.params['refocussing_time']

        m.params['sweep_name'] = 'defocussing offset (us)'
        m.params['sweep_pts'] = (m.params['defocussing_offset']) * 1e6

    # MW pulses
    X_pi2 = ps.Xpi2_pulse(m)
    X_pi = ps.X_pulse(m)

    # Start measurement
    m.autoconfig()
    print(m.params['delay_voltages'])
    m.generate_sequence(upload=True,
                        pulse_pi2=X_pi2,
                        pulse_pi=X_pi,
                        evolution_1_self_trigger=evolution_1_self_trigger,
                        evolution_2_self_trigger=evolution_2_self_trigger)

    if not debug:
        m.run(autoconfig=False)
        m.save()
        m.finish()
def electronRefocussingTriggered(name,
                                 debug=False,
                                 range_start=-2e-6,
                                 range_end=2e-6,
                                 evolution_1_self_trigger=True,
                                 evolution_2_self_trigger=False,
                                 vary_refocussing_time=False,
                                 refocussing_time=200e-6):
    m = pulsar_delay.ElectronRefocussingTriggered(name)

    m.params.from_dict(qt.exp_params['samples'][SAMPLE])
    m.params.from_dict(qt.exp_params['protocols']['AdwinSSRO'])
    m.params.from_dict(qt.exp_params['protocols'][SAMPLE_CFG]['AdwinSSRO'])
    m.params.from_dict(
        qt.exp_params['protocols'][SAMPLE_CFG]['AdwinSSRO-integrated'])
    m.params.from_dict(qt.exp_params['protocols']['AdwinSSRO+espin'])
    m.params.from_dict(qt.exp_params['protocols']['cr_mod'])
    m.params.from_dict(qt.exp_params['protocols'][SAMPLE_CFG]['pulses'])

    m.params['pulse_type'] = 'Hermite'

    m.params['Ex_SP_amplitude'] = 0
    m.params[
        'AWG_to_adwin_ttl_trigger_duration'] = 2e-6  # commenting this out gives an erro
    m.params['wait_for_AWG_done'] = 1
    m.params['sequence_wait_time'] = 1

    m.params['do_delay_voltage_control'] = 0
    m.params['delay_voltage_DAC_channel'] = 14

    pts = 51
    m.params['pts'] = pts
    m.params['repetitions'] = 1000
    #m.params['wait_for_AWG_done']=1
    #m.params['evolution_times'] = np.linspace(0,0.25*(pts-1)*1/m.params['N_HF_frq'],pts)
    # range from 0 to 1000 us

    # calibrated using Hahn echo
    m.params['self_trigger_delay'] = 2.950e-6 * np.ones(pts)
    m.params['self_trigger_duration'] = 100e-9

    if vary_refocussing_time:
        m.params['refocussing_time'] = np.linspace(range_start, range_end, pts)
        m.params['defocussing_offset'] = 0.0 * np.ones(pts)

        m.params['sweep_name'] = 'single-sided free evolution time (us)'
        m.params['sweep_pts'] = (m.params['refocussing_time']) * 1e6

    else:
        m.params['refocussing_time'] = np.ones(pts) * refocussing_time
        m.params['defocussing_offset'] = np.linspace(range_start, range_end,
                                                     pts)

        m.params['sweep_name'] = 'defocussing offset (us)'
        m.params['sweep_pts'] = (m.params['defocussing_offset']) * 1e6

    # MW pulses
    X_pi2 = ps.Xpi2_pulse(m)
    X_pi = ps.X_pulse(m)

    # for the self-triggering through the delay line
    # m.params['self_trigger_delay'] = 500e-9 # 0.5 us
    # m.params['self_trigger_duration'] = 100e-9

    # Start measurement
    m.autoconfig()
    m.generate_sequence(upload=True,
                        pulse_pi2=X_pi2,
                        pulse_pi=X_pi,
                        evolution_1_self_trigger=evolution_1_self_trigger,
                        evolution_2_self_trigger=evolution_2_self_trigger)

    if not debug:
        m.run(autoconfig=False)
        m.save()
        m.finish()
예제 #21
0
def ssro_MWInit(name, multiplicity=1, debug=False, mw2=False, **kw):

    m = pulsar_msmt.SSRO_MWInit(name)
    
    # Import all msmst params
    m.params.from_dict(qt.exp_params['samples'][SAMPLE])
    m.params.from_dict(qt.exp_params['protocols']['AdwinSSRO'])
    m.params.from_dict(qt.exp_params['protocols'][SAMPLE_CFG]['AdwinSSRO'])
    m.params.from_dict(qt.exp_params['protocols'][SAMPLE_CFG]['AdwinSSRO-integrated'])
    m.params.from_dict(qt.exp_params['protocols']['AdwinSSRO+espin'])
    m.params.from_dict(qt.exp_params['protocols']['cr_mod'])
    m.params.from_dict(qt.exp_params['protocols'][SAMPLE_CFG]['pulses'])

    stools.turn_off_all_lasers()

    # MW settings
    pulse_shape = kw.get('pulse_shape', None)
    if pulse_shape == None:
        pulse_shape == m.params['pulse_shape']
    else:
        m.params['pulse_shape'] = pulse_shape

    m.params['multiplicity'] = np.ones(pts)*multiplicity
    ### need to selectr the correct frequency
    if mw2:
        if m.params['pulse_shape'] == 'Hermite':
            print 'Using Hermite pulses'
            m.params['mw2_duration']            = m.params['mw2_Hermite_pi_length']
            m.params['mw2_pulse_amplitudes']    = m.params['mw2_Hermite_pi_amp'] 
            m.params['MW_pulse_amplitudes']     = m.params['mw2_Hermite_pi_amp'] 
        else:
            print 'Using square pulses'
            m.params['mw2_duration']            =  m.params['mw2_Square_pi_length']
            m.params['mw2_pulse_amplitudes']    = m.params['mw2_Square_pi_amp'] 
            m.params['MW_pulse_amplitudes']     = m.params['mw2_Square_pi_amp'] 
    else:
        if m.params['pulse_shape'] == 'Hermite':
            print 'Using Hermite pulses'
            m.params['MW_duration'] = m.params['Hermite_pi_length']
            m.params['MW_pulse_amplitudes'] = m.params['Hermite_pi_amp']
        else:
            print 'Using square pulses'
            m.params['MW_duration'] =  m.params['Square_pi_length']
            m.params['MW_pulse_amplitudes'] = m.params['Square_pi_amp']


    ### SSRO RO duration sweep params
    #### Maybe not hardcode RO time
    m.params['SSRO_duration_list'] = np.arange(0,500,10)
    m.params['pts'] = len(m.params['SSRO_duration_list'])

    m.params['Ex_SP_amplitude'] = 0.



    m.params['sweep_name'] = 'SSRO_MWInit duration'
    m.params['sweep_pts'] = m.params['SP_duration_list']
    m.params['wait_for_AWG_done'] = 1

    m.MW_pi = pulse.cp(ps.pi_pulse_MW2(m), phase = 0) if mw2 else pulse.cp(ps.X_pulse(m), phase = 0)
    espin_funcs.finish(m, debug=debug, pulse_pi=m.MW_pi)
예제 #22
0
def gateset(m,
            debug=False,
            decoupling=True,
            multiple=False,
            pi=True,
            single_decoupling=False,
            last_seq=False,
            fid_1=['e'],
            fid_2=['e'],
            sequence_type='all',
            germ=['e'],
            germ_position=[1, 3],
            N_decoupling=[4],
            run_numbers=[1, 2, 3]):
    """
    Function used to run GST on the individual experiment level.
    """

    if sequence_type == 'specific_germ_position':
        m = pulsar_delay.GateSetWithDecoupling(name)
        mbi_funcs.prepare(m)  # load msmt params

    #from mbi_funcs.py
    m.params['E_RO_durations'] = [m.params['SSRO_duration']]
    m.params['E_RO_amplitudes'] = [m.params['Ex_RO_amplitude']]
    m.params['send_AWG_start'] = [1]
    m.params['sequence_wait_time'] = [0]

    #Specific to make it work on LT2
    m.params['initial_msmt_delay'] = 5000.0e-9

    #The total number of sequence repetitions
    m.params['reps_per_ROsequence'] = 5000

    m.params['fid_1'] = fid_1
    m.params['fid_2'] = fid_2
    m.params['sequence_type'] = sequence_type
    m.params['germ'] = germ
    m.params['germ_position'] = germ_position
    m.params['N_decoupling'] = N_decoupling
    m.params['run_numbers'] = run_numbers

    #Muss auch nicht imer definiert werden

    #Calculae the larmor frequency, since we want to sit on larmor revival points for this experiment
    tau_larmor = np.round(1 / m.params['C1_freq_0'], 9)
    m.params['tau_larmor'] = tau_larmor

    if decoupling:

        #The spacing in between germ pulses
        t_bw_germs = 50e-9
        m.params['wait_time'] = t_bw_germs

        #We need to check that our germ / fiducial pulses fit between two larmor times, and otherwise make it an
        #integer multiple of the initial value. Strictly the fiducial does not go in here. In the end this is probably not necessary since
        #our sequences are very short.
        sequence_length = max(len(max(fid_1, key=len)), len(max(
            fid_2, key=len)), len(max(germ, key=len))) * (
                m.params['Hermite_pi2_length'] + t_bw_germs) + t_bw_germs

        if 2 * tau_larmor <= sequence_length:
            tau_larmor *= np.ceil(sequence_length / (2 * tau_larmor))
            print "Adjusted larmor frequency to multiple", tau_larmor
        # tau_larmor *= 4
        # print tau_larmor

        m.params['tau_larmor'] = tau_larmor

        m.params['sweep_name'] = 'Total evolution time [ms]'
        m.params['sweep_pts'] = run_numbers * np.ones(
            len(run_numbers)) * tau_larmor * 1.e3

    else:
        m.params['sweep_name'] = 'Germ repetitions'
        m.params['sweep_pts'] = run_numbers

    #Set up the pulses we want to use in the experiment. First all the pi2 pulses.
    X_pi2 = ps.Xpi2_pulse(m)
    Y_pi2 = ps.Ypi2_pulse(m)
    mX_pi2 = ps.mXpi2_pulse(m)
    mY_pi2 = ps.mYpi2_pulse(m)

    #Set up all the pi pulses.
    X_pi = ps.X_pulse(m)
    Y_pi = ps.Y_pulse(m)
    mX_pi = ps.mX_pulse(m)
    mY_pi = ps.mY_pulse(m)

    # for the autoanalysis
    # m.params['sweep_name']  = 'Run number'
    # m.params['sweep_pts']   = 1

    # Now calculate how many sweeps we want to do. For now we want to put a germ pulse at different subsequent
    # locations. Later, we want to make this random
    if sequence_type == "all":
        if len(fid_1) == len(fid_2) == len(germ) == len(N_decoupling) == len(
                run_numbers):
            m.params['pts'] = len(fid_1)
        else:
            sys.exit(
                "A mistake happened. Check your fiducials and germ lists have the same length."
            )

    else:
        m.params['pts'] = len(germ_position)

    # Start measurement
    m.autoconfig()
    m.generate_sequence(pi=pi,
                        decoupling=decoupling,
                        upload=True,
                        single_decoupling=single_decoupling,
                        x_pulse_pi2=X_pi2,
                        y_pulse_pi2=Y_pi2,
                        x_pulse_mpi2=mX_pi2,
                        y_pulse_mpi2=mY_pi2,
                        x_pulse_pi=X_pi,
                        y_pulse_pi=Y_pi,
                        x_pulse_mpi=mX_pi,
                        y_pulse_mpi=mY_pi)

    if not debug:
        m.run(autoconfig=False)

        if multiple:
            print run_numbers[0]
            m.save(name='Start_run%d' % run_numbers[0])

        else:
            m.save()

        if not multiple:
            m.finish()

        else:
            if last_seq == True:
                m.finish()
def QMem(name,
         carbon_list=[5],
         carbon_init_list=[5],
         carbon_init_states=['up'],
         carbon_init_methods=['MBI'],
         carbon_init_thresholds=[1],
         number_of_MBE_steps=0,
         mbe_bases=['Y', 'Y'],
         MBE_threshold=1,
         logic_state='X',
         el_RO='positive',
         debug=True,
         tomo_list=['X'],
         Repetitions=300,
         carbon_swap_list=[],
         e_swap_state=['X'],
         swap_type=None,
         RO_after_swap=True,
         **kw):

    m = QM.QMemory_repumping(name)
    funcs.prepare(m)

    pts = kw.get('pts', 20)

    m.params['do_optical_pi'] = kw.get('do_optical_pi', False)
    m.params['initial_MW_pulse'] = kw.get('initial_MW_pulse', 'pi2')

    m.params['reps_per_ROsequence'] = Repetitions
    m.params['carbon_list'] = carbon_list  ### Carbons to be used

    #######################################
    ### Carbon Initialization settings ####
    #######################################
    m.params['carbon_init_list'] = carbon_init_list
    m.params['init_method_list'] = carbon_init_methods * len(carbon_init_list)
    m.params['init_state_list'] = carbon_init_states * len(carbon_init_list)
    m.params['Nr_C13_init'] = len(carbon_init_thresholds)
    m.params['el_after_init'] = '0'

    ################################
    ### elec to carbon  swap settings ####
    ################################
    if swap_type == None:
        m.params['C13_MBI_threshold_list'] = carbon_init_thresholds * len(
            carbon_init_list)
    else:
        m.params['C13_MBI_threshold_list'] = carbon_init_thresholds
    print 'c_init_th' + str(m.params['C13_MBI_threshold_list'])

    m.params['carbon_swap_list'] = carbon_swap_list
    m.params['elec_init_state'] = e_swap_state
    m.params[
        'SWAP_type'] = swap_type  #used in carbon_swap_gate to determine swap w carbon init or w/o carbon init
    m.params['Nr_C13_SWAP'] = len(carbon_swap_list)
    m.params['RO_after_swap'] = RO_after_swap

    ####################
    ### MBE settings ###
    ####################

    m.params['Nr_MBE'] = number_of_MBE_steps
    m.params['MBE_bases'] = mbe_bases
    m.params['MBE_threshold'] = MBE_threshold
    m.params['2qb_logical_state'] = logic_state
    m.params['2C_RO_trigger_duration'] = 150e-6

    ###################################
    ### Parity measurement settings ###
    ###################################

    m.params['Nr_parity_msmts'] = 0
    m.params['Parity_threshold'] = 1

    ##########################################
    ##### Detuning for sweep of LDE phase ####
    ##########################################

    m.params['Carbon_LDE_init_phase_correction_list'] = np.array([0.0] +
                                                                 [0.0] * 10)

    m.params['fast_repump_repetitions'] = np.array([1] * pts)

    #############################
    ##### Sweep Params ##########
    #############################
    print 'min Reps: ', minReps, ' Max reps: ', maxReps
    print 'carbons ', carbon_list, ' couplings: ', abs(
        abs(coupling_difference) - m.params['C1_freq_0'])

    f_larmor = m.params['C1_freq_0']
    tau_larmor = round(1 / f_larmor, 9)
    # tau_larmor = 2.1e-6
    print 'Calculated tau_larmor', tau_larmor

    m.params['repump_wait'] = pts * [
        tau_larmor
    ]  #tau_larmor] #pts*[2e-6] # time between pi pulse and beginning of the repumper
    m.params['fast_repump_power'] = kw.get('repump_power', 20e-9)
    m.params['fast_repump_duration'] = pts * [
        kw.get('fast_repump_duration', 1.5e-6)
    ]  #how long the beam is irradiated
    m.params['average_repump_time'] = pts * [
        kw.get('average_repump_time', 110e-9)
    ]  #this parameter has to be estimated from calibration curves, goes into phase calculation

    m.params['do_pi'] = True  ### does a regular pi pulse
    m.params[
        'do_BB1'] = False  # ### does a BB1 pi pulse NOTE: both bools should not be true at the same time.

    ps.X_pulse(m)  #this updates fast_pi_amp
    m.params['pi_amps'] = pts * [m.params['fast_pi_amp']]

    ### RO params
    m.params['electron_readout_orientation'] = el_RO
    m.params['Tomo_bases'] = np.linspace(-60., 400., pts)

    ### For the Autoanalysis
    m.params['pts'] = pts
    m.params['sweep_name'] = 'Carbon RO phase'
    m.params['sweep_pts'] = m.params['Tomo_bases']

    funcs.finish(m, upload=True, debug=debug)
예제 #24
0
def calibrate_pi_RO_N(name, multiplicity, debug=False, **kw):

    m = PiCalibrationWithDESRreadout(name)

    if qt.current_setup == 'lt3':
        ### formatting is pulse amp, pulse duration, frequency shift
        N_peak_dict = {
            '0': [0.000, 7e-6, 0],
            '1': [0.0017, 7e-6, +876e3 / 2. + 0.002194e9],
            '2': [0.0017, 7e-6, -876e3 / 2. + 0.002194e9],
            '3': [0.0017, 7e-6, +876e3 / 2.],
            '4': [0.0017, 7e-6, -876e3 / 2.],
            '5': [0.0017, 7e-6, +876e3 / 2. - 0.002194e9],
            '6': [0.0017, 7e-6, -876e3 / 2. - 0.002194e9],
        }

    espin_funcs.prepare(m)
    m.params['wait_for_AWG_done'] = 1
    m.params['AWG_controlled_readout'] = 0
    m.params['delay_reps'] = 0

    ### kws
    calibrate_N_RO = kw.pop('calibrate_N_RO', False)

    #### some pulse changes such that we don't interfere with msmt.params.
    f_msp1_cntr = m.params['ms+1_cntr_frq']
    mw_mod_frequency = 43e6
    m.params['mw_mod_freq'] = mw_mod_frequency
    m.params['mw_frq'] = f_msp1_cntr - mw_mod_frequency

    ### initialize a bunch of useful values
    [
        m.params['N_RO_pulse_amp'], m.params['N_RO_pulse_duration'],
        m.params['N_RO_frequency_shift']
    ] = N_peak_dict[str(1)]
    m.MW_pi = pulse.cp(ps.X_pulse(m), phase=0)

    ### first calibrate all average state populations this is used for ROC purposes
    first = True
    if calibrate_N_RO:
        m.params['repetitions'] = 12000
        m.params['add_RO_pulse'] = True
        pts = 6
        m.params['pts'] = pts
        m.params['general_sweep_pts'] = []
        m.params['general_sweep_name'] = 'N_RO_frequency_shift'
        m.params['multiplicity'] = np.ones(pts) * 0
        for i in range(1, pts + 1, 1):
            m.params['general_sweep_pts'].append(N_peak_dict[str(i)][2])

        m.params['sweep_name'] = 'N/13C dip'
        m.params['sweep_pts'] = np.array(range(1, pts + 1, 1))
        m.autoconfig()
        m.generate_sequence(upload=True, pulse_pi=m.MW_pi)
        if not debug:
            m.run(autoconfig=False)
            m.save(name='n_ro_calibration', first=first)
            first = False

    m.params['add_RO_pulse'] = kw.pop('add_RO_pulse', False)

    ###### here is the actual sweep!

    m.params['Hermite_pi_length'] = m.params['Hermite_pi_length'] + 10e-9

    pts = 15
    m.params['pts'] = pts

    m.params['repetitions'] = 5000 if multiplicity == 1 else 1000
    rng = 0.15 if multiplicity == 1 else 0.06
    # ps.X_pulse(m) ### update pulse params

    m.params['general_sweep_name'] = 'fast_pi_amp'
    m.params['general_sweep_pts'] = np.linspace(
        0.0, 0.95, pts)  #m.params['fast_pi_amp'] + np.linspace(-rng, rng, pts)
    m.params['multiplicity'] = np.ones(pts) * multiplicity

    # for the autoanalysis
    m.params['sweep_name'] = 'MW amplitude (V)'
    m.params['sweep_pts'] = m.params['general_sweep_pts']

    #### get thte correct N_RO_params
    breakst = False
    m.autoconfig()
    for i in range(0, 6 + 1, 1):
        breakst = show_stopper()
        if breakst:
            break

        [
            m.params['N_RO_pulse_amp'], m.params['N_RO_pulse_duration'],
            m.params['N_RO_frequency_shift']
        ] = N_peak_dict[str(i)]

        m.generate_sequence(upload=True, pulse_pi=m.MW_pi)
        if not debug:
            m.run(autoconfig=False)
            m.save(name='ro_n_dip_' + str(i), first=first)
            first = False

    m.finish()
예제 #25
0
def run(name, **kw):
    m = pulsar_mbi_espin.ElectronRamsey_Dephasing(name)
    funcs.prepare(m)
    max_duration = kw.get('max_duration', 3e-6)
    pts = 50  # even number
    m.params['pts'] = pts
    m.params['reps_per_ROsequence'] = 200
    m.params['detuning'] = 0e6  #artificial detuning

    # MW pulses
    ## First pulse
    # m.params['MW_pulse_durations'] = np.ones(pts) * m.params['fast_pi_duration']
    # m.params['MW_pulse_amps'] = np.ones(pts) * m.params['fast_pi_amp']
    # m.params['MW_pulse_mod_frqs'] = np.ones(pts) * m.params['AWG_MBI_MW_pulse_mod_frq']
    # m.params['MW_pulse_1_phases'] = np.ones(pts) * 0

    m.params['init_with_second_source'] = init_with_second_source
    m.params['readout_with_second_source'] = readout_with_second_source
    m.params['init_in_zero'] = init_in_zero

    ## this needs to be cleaner
    MW1_pi = ps.X_pulse(m)
    m.params['fast_pi_amp'] = MW1_pi.amplitude

    ## initialization microwave pulse
    if init_with_second_source:
        m.params['MW_pulse_durations'] = np.ones(
            pts) * m.params['mw2_fast_pi_duration']
        m.params['MW_pulse_amps'] = np.ones(pts) * m.params['mw2_fast_pi_amp']
    else:
        m.params['MW_pulse_durations'] = np.ones(
            pts) * m.params['fast_pi_duration']
        m.params['MW_pulse_amps'] = np.ones(pts) * m.params['fast_pi_amp']
        m.params['MW_pulse_mod_frqs'] = np.ones(
            pts) * m.params['AWG_MBI_MW_pulse_mod_frq']
        m.params['MW_pulse_1_phases'] = np.ones(pts) * 0

    ## Readout microwave pulse
    if do_pm1_readout:
        if readout_with_second_source:
            m.params['MW_pulse_2_durations'] = np.ones(
                pts) * m.params['mw2_fast_pi_duration']
            m.params['MW_pulse_2_amps'] = np.ones(
                pts) * m.params['mw2_fast_pi_amp']
        else:
            m.params['MW_pulse_2_durations'] = np.ones(
                pts) * m.params['fast_pi_duration']
            m.params['MW_pulse_2_amps'] = np.ones(
                pts) * m.params['fast_pi_amp']
            m.params['MW_pulse_mod_frqs'] = np.ones(
                pts) * m.params['AWG_MBI_MW_pulse_mod_frq']
            m.params['MW_pulse_2_phases'] = np.ones(pts) * 0
    else:
        m.params['MW_pulse_2_durations'] = np.ones(pts) * 0
        m.params['MW_pulse_2_amps'] = np.ones(pts) * 0
        m.params['MW_pulse_2_phases'] = np.ones(pts) * 0

    m.params['pump_using_repumper'] = pump_using_repumper
    m.params['pump_using_newfocus'] = pump_using_newfocus
    m.params['pump_using_MW2'] = pump_using_MW2

    if pump_using_MW2:
        m.params['pump_MW2_durations'] = np.linspace(0.0e-6, max_duration, pts)
        m.params['pump_MW2_delay'] = np.ones(pts) * pump_MW2_delay
        m.params['pump_MW2_falltime'] = np.ones(pts) * pump_MW2_falltime

    # laser beam; called dephasing, but does repump
    m.params['dephasing_AOM'] = 'NewfocusAOM'
    #m.params['dephasing_AOM'] = 'RepumperAOM'
    m.params['laser_dephasing_amplitude'] = kw.get('newfocus_power', 20e-9)
    m.params['repumper_amplitude'] = kw.get('repumper_power', 20e-9)
    m.params['repumping_time'] = np.linspace(
        0.0e-6, max_duration, pts
    )  # np.r_[np.linspace(0.0e-6,0.2e-6,pts/2), np.linspace(1.2e-6,5e-6,pts/2)]
    #m.params['repumping_time'] = np.r_[np.linspace(0.03e-6,0.5e-6,pts/4.), np.linspace(0.2e-6,5e-6,3.*pts/4.)]

    m.params['MW_repump_delay1'] = np.ones(pts) * 500e-9
    m.params['MW_repump_delay2'] = np.ones(pts) * 2500e-9
    m.params['Repump_multiplicity'] = np.ones(pts) * 1

    # for the autoanalysis
    m.params['sweep_name'] = 'Repump duration (us)'
    m.params['sweep_pts'] = m.params['repumping_time'] / (1e-6)

    funcs.finish(m, debug=kw.get('debug', False))
예제 #26
0
def QMem(name,
         carbon_list=[5],
         carbon_init_list=[5],
         carbon_init_states=['up'],
         carbon_init_methods=['MBI'],
         carbon_init_thresholds=[1],
         number_of_MBE_steps=0,
         mbe_bases=['Y', 'Y'],
         MBE_threshold=1,
         logic_state='X',
         el_RO='positive',
         debug=True,
         tomo_list=['X'],
         Repetitions=300,
         carbon_swap_list=[],
         e_swap_state=['X'],
         swap_type=None,
         RO_after_swap=True,
         **kw):

    m = QM.QMemory_repumping(name)
    funcs.prepare(m)

    m.params['do_optical_pi'] = kw.get('do_optical_pi', False)
    m.params['initial_MW_pulse'] = kw.get('initial_MW_pulse', 'pi2')

    m.params['reps_per_ROsequence'] = Repetitions
    m.params['carbon_list'] = carbon_list  ### Carbons to be used

    #######################################
    ### Carbon Initialization settings ####
    #######################################
    m.params['carbon_init_list'] = carbon_init_list
    m.params['init_method_list'] = carbon_init_methods * len(carbon_init_list)
    m.params['init_state_list'] = carbon_init_states * len(carbon_init_list)
    m.params['Nr_C13_init'] = len(carbon_init_thresholds)
    m.params['el_after_init'] = '0'

    ################################
    ### elec to carbon  swap settings ####
    ################################
    if swap_type == None:
        m.params['C13_MBI_threshold_list'] = carbon_init_thresholds * len(
            carbon_init_list)
    else:
        m.params['C13_MBI_threshold_list'] = carbon_init_thresholds
    print 'c_init_th' + str(m.params['C13_MBI_threshold_list'])

    m.params['carbon_swap_list'] = carbon_swap_list
    m.params['elec_init_state'] = e_swap_state
    m.params[
        'SWAP_type'] = swap_type  #used in carbon_swap_gate to determine swap w carbon init or w/o carbon init
    m.params['Nr_C13_SWAP'] = len(carbon_swap_list)
    m.params['RO_after_swap'] = RO_after_swap

    ####################
    ### MBE settings ###
    ####################

    m.params['Nr_MBE'] = number_of_MBE_steps
    m.params['MBE_bases'] = mbe_bases
    m.params['MBE_threshold'] = MBE_threshold
    m.params['2qb_logical_state'] = logic_state
    m.params['2C_RO_trigger_duration'] = 150e-6

    ###################################
    ### Parity measurement settings ###
    ###################################

    m.params['Nr_parity_msmts'] = 0
    m.params['Parity_threshold'] = 1

    ###################################
    ###	   LDE element settings		###
    ###################################

    coupling_difference = 0  ## sum up coupling differences in order to get an estimate for maxRepetitions.
    for ii, c in enumerate(carbon_list):
        if ii == 0:
            coupling_difference = m.params['C' + str(c) + '_freq_1_m1']
        else:
            if logic_state == 'X':
                # print 'carbon freqs',m.params['C'+str(c)+'_freq_1_m1'],m.params['C'+str(c)+'_freq_0']
                coupling_difference += (m.params['C' + str(c) + '_freq_1_m1'] -
                                        m.params['C' + str(c) + '_freq_0'])
            else:
                # print 'carbon freqs',m.params['C'+str(c)+'_freq_1_m1'],m.params['C'+str(c)+'_freq_0']
                coupling_difference += -m.params['C' + str(
                    c) + '_freq_1_m1'] - m.params['C' + str(c) + '_freq_0']
            # print c
            # print coupling_difference
    pts = kw.get('pts', None)
    if pts == None:
        if len(carbon_list) != 2:
            if 6 in carbon_list and not 5 in carbon_list:
                pts = 10
            elif 6 in carbon_list and 5 in carbon_list:
                pts = 6
            else:
                pts = 11
        else:
            pts = 11

    minReps = kw.get('minReps', 0)  # minimum number of LDE reps
    maxReps = kw.get(
        'maxReps', 1e3 / abs(abs(coupling_difference) - m.params['C1_freq_0']))

    step = int((maxReps - minReps) / pts)

    m.params['fast_repump_repetitions'] = np.arange(minReps,
                                                    minReps + pts * step, step)

    #############################
    ##### Sweep Params ##########
    #############################
    print 'min Reps: ', minReps, ' Max reps: ', maxReps
    print 'carbons ', carbon_list, ' couplings: ', abs(
        abs(coupling_difference) - m.params['C1_freq_0'])

    f_larmor = m.params['C1_freq_0']
    tau_larmor = round(1 / f_larmor, 9)
    # tau_larmor = 2.1e-6
    print 'Calculated tau_larmor', tau_larmor

    # tau_larmor = 2.298e-6

    m.params['repump_wait'] = pts * [
        tau_larmor
    ]  #tau_larmor] #pts*[2e-6] # time between pi pulse and beginning of the repumper
    m.params['fast_repump_power'] = kw.get('repump_power', 20e-9)
    m.params['fast_repump_duration'] = pts * [
        kw.get('fast_repump_duration', 1.5e-6)
    ]  #how long the beam is irradiated
    m.params['average_repump_time'] = pts * [
        kw.get('average_repump_time', 110e-9)
    ]  #this parameter has to be estimated from calibration curves, goes into phase calculation

    m.params['do_pi'] = True  ### does a regular pi pulse
    m.params[
        'do_BB1'] = False  # ### does a BB1 pi pulse NOTE: both bools should not be true at the same time.

    ps.X_pulse(m)  #this updated fast_pi_amp
    m.params['pi_amps'] = pts * [m.params['fast_pi_amp']]

    ### For the Autoanalysis
    m.params['pts'] = pts
    m.params['sweep_name'] = 'repump repetitions'
    m.params['sweep_pts'] = m.params['fast_repump_repetitions']

    ### RO params
    m.params['electron_readout_orientation'] = el_RO
    m.params['Tomo_bases'] = tomo_list

    funcs.finish(m, upload=True, debug=debug)
예제 #27
0
def QMem(name,
         carbon_list=[5],
         carbon_init_list=[5],
         carbon_init_states=['up'],
         carbon_init_methods=['MBI'],
         carbon_init_thresholds=[1],
         number_of_MBE_steps=0,
         mbe_bases=['Y', 'Y'],
         MBE_threshold=1,
         logic_state='X',
         el_RO='positive',
         debug=True,
         tomo_list=['X'],
         Repetitions=5000,
         **kw):

    m = QM.QMemory_repumping(name)
    funcs.prepare(m)

    ############

    m.params['C13_MBI_threshold_list'] = carbon_init_thresholds * len(
        carbon_init_list)
    ''' set experimental parameters '''
    m.params['reps_per_ROsequence'] = Repetitions

    ### Carbons to be used
    m.params['carbon_list'] = carbon_list

    ### Carbon Initialization settings
    m.params['carbon_init_list'] = carbon_init_list
    m.params['init_method_list'] = carbon_init_methods * len(carbon_init_list)
    m.params['init_state_list'] = carbon_init_states * len(carbon_init_list)
    m.params['Nr_C13_init'] = len(carbon_init_list)

    m.params['el_after_init'] = '0'

    ##################################
    ###         RO bases           ###
    ##################################

    ## not necessary

    ####################
    ### MBE settings ###
    ####################
    """these parameters will be used later on"""

    m.params['Nr_MBE'] = number_of_MBE_steps
    m.params['MBE_bases'] = mbe_bases
    m.params['MBE_threshold'] = MBE_threshold
    m.params['2qb_logical_state'] = logic_state
    m.params['2C_RO_trigger_duration'] = 150e-6

    ###################################
    ### Parity measurement settings ###
    ###################################

    m.params['Nr_parity_msmts'] = 0
    m.params['Parity_threshold'] = 1

    ###################################
    ###	   LDE element settings		###
    ###################################

    ### determine sweep parameters
    pts = 21

    tau_larmor = kw.get('tau_larmor', round(1. / m.params['C4_freq_0'], 9))
    print 'Tau larmor is ', tau_larmor

    m.params['repump_wait'] = pts * [
        tau_larmor
    ]  # time between pi pulse and beginning of the repumper
    m.params['average_repump_time'] = np.linspace(
        -0.5e-6, 1.5e-6, pts
    )  #np.linspace(-0.2e-6,1.5e-6,pts) #this parameter has to be estimated from calibration curves, goes into phase calculation
    m.params['fast_repump_repetitions'] = pts * [kw.get('seq_reps', 250.)]

    m.params['do_pi'] = True  ### does a regular pi pulse
    m.params[
        'do_BB1'] = False  ### does a BB1 pi pulse NOTE: both bools should not be true at the same time.
    m.params['do_optical_pi'] = kw.get('do_optical_pi', False)

    ps.X_pulse(m)
    print 'pi pulse amps', m.params['fast_pi_amp'], m.params['Hermite_pi_amp']
    m.params['pi_amps'] = pts * [m.params['fast_pi_amp']]
    # print 'this is the pi pulse amplitude',ps.X_pulse(m).env_amplitude,ps.X_pulse(m).Sw_risetime
    m.params['fast_repump_duration'] = pts * [
        2.5e-6
    ]  #how long the repump beam is applied.

    m.params['fast_repump_power'] = kw.get('repump_power', 50e-9)

    ### For the Autoanalysis
    m.params['pts'] = pts
    m.params['sweep_name'] = 'average repump time (us)'
    m.params['sweep_pts'] = m.params['average_repump_time'] * 1e6

    ### RO params
    m.params['electron_readout_orientation'] = el_RO
    m.params['Tomo_bases'] = tomo_list

    funcs.finish(m, upload=True, debug=debug)