示例#1
0
def calibrate(name):
    m = CORPSECalibration(name)
    #m = CORPSE_Imod_Calibration(name)
    funcs.prepare(m)

    pts = 21
    CORPSE_frq = 10e6
    m.params['CORPSE_rabi_frequency'] = CORPSE_frq

    m.params['Ex_SP_amplitude'] = 0
    m.params['frq_mod'] = 0e6
    m.params['mw_frq'] = m.params['ms-1_cntr_frq'] - m.params['frq_mod']

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

    # sweep params
    m.params['CORPSE_pi_amp'] = 0.5
    m.params['CORPSE_pi_sweep_amps'] = np.linspace(
        0.50, 0.8, pts)  #0.872982*np.ones(pts)#
    m.params['CORPSE_pulse_delay'] = 0e-9
    m.params['CORPSE_pulse_delays'] = 0. * np.ones(
        pts)  #np.linspace(0,10e-9,pts)
    m.params['CORPSE_eff_rotation_angle'] = 180
    m.params['multiplicity'] = 11
    m.params['delay_reps'] = 1
    m.params['cur_MW_channel'] = 'MW_1'

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

    funcs.finish(m, debug=False)
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)
def repelectronramsey(name):
    m = pulsar.RepElectronRamseys(name)
    funcs.prepare(m)
    m.params['wait_after_pulse_duration']=2
    m.params['wait_after_RO_pulse_duration']=2

    pts = 1
    m.params['pts'] = pts
    m.params['repetitions'] = 50000

    m.params['evolution_times'] = np.ones(pts)*(0.25/m.params['N_HF_frq'])

    # MW pulses
    m.params['detuning']  = 0.0e6
    m.params['CORPSE_pi2_mod_frq'] = m.params['CORPSE_pi2_mod_frq']
    m.params['CORPSE_pi2_amps'] = np.ones(pts)*m.params['CORPSE_pi2_amp']*0
    m.params['CORPSE_pi2_phases1'] = np.ones(pts) * 0
    m.params['CORPSE_pi2_phases2'] = np.ones(pts) * 90 #360 * m.params['evolution_times'] * 2e6

    # for the autoanalysis
    m.params['sweep_name'] = 'evolution time (ns)'
    m.params['sweep_pts'] = m.params['evolution_times']/1e-9

    funcs.finish(m)
    print m.adwin_var('completed_reps')
def dark_esr(name, Imod_channel=True, pulse_type='Square', debug=False):
    '''
    dark ESR on the 0 <-> -1 transition. 
    '''

    m = pulsar_msmt.GeneralDarkESR(name)
    funcs.prepare(m)
    pulse_pi, pulse_pi2_not_used = pulse_defs(m, True, pulse_type,
                                              Imod_channel)

    m.params['pulse_type'] = pulse_type
    m.params['IQmod'] = True
    m.params['Imod_channel'] = Imod_channel

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

    m.params['range'] = 4e6
    m.params['pts'] = 131

    m.params['MW_pi_duration'] = 2.e-6
    m.params['pulse_pi_amp'] = 0.03

    m.params['ssbmod_frq_start'] = m.params[
        'MW_pulse_mod_frequency'] - m.params['range']
    m.params['ssbmod_frq_stop'] = m.params[
        'MW_pulse_mod_frequency'] + m.params['range']

    funcs.finish(m, upload=True, debug=False, pulse_pi=pulse_pi)
def sweep_pm_risetime(name, debug=False, mw2=False, **kw):
    m = pulsar_msmt.Sweep_pm_risetime(name)
    espin_funcs.prepare(m)

    pulse_shape = 'Square'
    m.params['pulse_shape'] = pulse_shape
    m.params['pulse_type'] = pulse_shape

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

    min_risetime = 0e-9
    max_risetime = 20e-9

    m.params['PM_risetime_sweep'] = np.linspace(min_risetime, max_risetime,
                                                pts)

    # for the autoanalysis
    m.params['sweep_name'] = 'PM risetime (ns)'

    m.params['sweep_pts'] = m.params['PM_risetime_sweep'] * 1e9
    m.params['wait_for_AWG_done'] = 1

    espin_funcs.finish(m, debug=debug, mw2=mw2)
def test_lde_sequence(name, IQmod=False, pulse_type='Hermite', debug=False):
    m = TestLDESequence(name)
    funcs.prepare(m)
    pulse_pi, pulse_pi2 = pulse_defs(m, IQmod, pulse_type)

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

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

    pts = 1

    m.params['number_pulses'] = 2  # the 1st pi pulse is added

    m.params['pts'] = pts

    m.params['free_precession_offsets'] = np.ones(pts) * 0.0e-9
    m.params['echo_offsets'] = np.linspace(-10, 10, pts) * 1e-9

    # for the autoanalysis
    m.params['sweep_name'] = 'echo offset (ns)'  #'MW_1_separation (ns)'
    m.params['sweep_pts'] = m.params['echo_offsets']
    #XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX(for hannes)
    #m.autoconfig()
    #return m.generate_sequence(upload=False, pulse_pi=pulse_pi, pulse_pi2=pulse_pi2)
    funcs.finish(m,
                 upload=True,
                 debug=debug,
                 pulse_pi=pulse_pi,
                 pulse_pi2=pulse_pi2)
def calibrate_pi2_pulse(name,
                        IQmod=True,
                        Imod_channel=True,
                        pulse_type='CORPSE',
                        debug=False):

    m = pulsar_msmt.GeneralPi2Calibration(name)

    funcs.prepare(m)
    pulse_pi, pulse_pi2 = pulse_defs(m, IQmod, pulse_type, Imod_channel)

    m.params['pulse_type'] = pulse_type
    m.params['IQmod'] = IQmod
    m.params['Imod_channel'] = Imod_channel

    pts = 11
    m.params['pts_awg'] = pts
    m.params['repetitions'] = 3000

    # 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['wait_for_AWG_done'] = 1

    sweep_axis = m.params['pulse_pi_amp'] + np.linspace(-0.15, 0.15, 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))

    funcs.finish(m, debug=debug, pulse_pi=pulse_pi, pulse_pi2=pulse_pi2)
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)
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)
示例#10
0
def electronramseyCORPSE(name):
    m = pulsar_msmt.ElectronRamseyCORPSE(name)
    funcs.prepare(m)
    m.params.from_dict(qt.exp_params['protocols']['Hans_sil4']['Magnetometry'])

    pts = 101
    m.params['pts'] = pts
    m.params['repetitions'] = 1000
    print 1 / m.params['N_HF_frq']

    #m.params['evolution_times'] = np.linspace(0,(pts-1)*1/m.params['N_HF_frq'],pts)
    m.params['evolution_times'] = np.linspace(0, 10000e-9, pts)
    #m.params['evolution_times'] = 5*np.ones (pts)*1e-9

    print 'corspe frq', m.params['CORPSE_frq']
    # MW pulses
    m.params['detuning'] = 0e3
    m.params['CORPSE_pi2_mod_frq'] = m.params[
        'MW_modulation_frequency'] - m.params['detuning']
    m.params['CORPSE_pi2_amps'] = np.ones(pts) * m.params['CORPSE_pi2_amp']
    m.params['CORPSE_pi2_phases1'] = np.ones(pts) * 0
    m.params['CORPSE_pi2_phases2'] = 0 * np.ones(pts) * (
        90. + 15)  ##np.linspace(0,360,pts) #np.ones(pts) * 0#

    # for the autoanalysis
    m.params['sweep_name'] = 'evolution time (ns)'
    m.params['sweep_pts'] = m.params['evolution_times'] / 1e-9
    #m.params['sweep_name'] = 'phase second pi2'
    #m.params['sweep_pts'] = m.params['CORPSE_pi2_phases2']

    funcs.finish(m)
示例#11
0
def sweep_amplitude(name):
    m = CORPSEPiCalibration(name)
    funcs.prepare(m)
    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'][SAMPLE_CFG]['Magnetometry'])

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

    # sweep params

    m.params['CORPSE_pi_sweep_amps'] = np.ones(
        pts) * m.params['CORPSE_pi2_amp']
    m.params['multiplicity'] = 1
    m.params['delay_reps'] = 15

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

    funcs.finish(m, debug=False)
示例#12
0
def dark_esr(name, Imod_channel=True, pulse_type='Square', debug=False):
    '''
    dark ESR on the 0 <-> -1 transition. 
    This class uses IQ modulation, so set the amplitude for the IQ pi pulse and the length.
    '''

    m = pulsar_msmt.GeneralDarkESR(name)
    funcs.prepare(m)
    pulse_pi, pulse_pi2_not_used = pulse_defs(m, True, pulse_type,
                                              Imod_channel)

    m.params['pulse_type'] = pulse_type
    m.params['IQmod'] = True
    m.params['Imod_channel'] = Imod_channel

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

    m.params['range'] = 6e6
    m.params['pts'] = 131

    # Be careful, this class uses IQ modulation, so set the amplitude for the IQ pi pulse.

    m.params['ssbmod_frq_start'] = m.params[
        'MW_pulse_mod_frequency'] - m.params['range']
    m.params['ssbmod_frq_stop'] = m.params[
        'MW_pulse_mod_frequency'] + m.params['range']

    funcs.finish(m, upload=True, debug=False, pulse_pi=pulse_pi)
示例#13
0
def sweep_eff_rot_angle(name):
    m = CORPSECalibration(name)
    funcs.prepare(m)
    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'][SAMPLE_CFG]['Magnetometry'])

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

    # sweep params
    m.params['CORPSE_sweep_amps'] = np.ones(pts) * 0.811
    m.params['CORPSE_pi_sweep_amps'] = m.params['CORPSE_sweep_amps']
    m.params['CORPSE_effective_rotation_angles'] = np.linspace(0, 360, pts)
    m.params['CORPSE_mod_frq'] = m.params['ms-1_cntr_frq'] - m.params['mw_frq']
    m.params['CORPSE_rabi_frequency'] = m.params['CORPSE_frq']
    m.params['multiplicity'] = 1
    m.params['delay_reps'] = 15

    # for the autoanalysis
    m.params['sweep_name'] = 'CORPSE Desired rotation angle (degrees)'
    m.params['sweep_pts'] = m.params['CORPSE_effective_rotation_angles']

    funcs.finish(m, debug=False)
def _setup_params(msmt, setup):
    msmt.params['setup']=setup
    espin_funcs.prepare(msmt)

    
    if not(hasattr(msmt,'joint_params')):
        msmt.joint_params = {}
    import joint_params
    reload(joint_params)
    for k in joint_params.joint_params:
        msmt.joint_params[k] = joint_params.joint_params[k]

    if setup == 'lt4' :
        import params_lt4
        reload(params_lt4)
        msmt.AWG_RO_AOM = qt.instruments['PulseAOM']
        for k in params_lt4.params_lt4:
            msmt.params[k] = params_lt4.params_lt4[k]
    elif setup == 'lt3' :
        import params_lt3
        reload(params_lt3)
        msmt.AWG_RO_AOM = qt.instruments['PulseAOM']
        for k in params_lt3.params_lt3:
            msmt.params[k] = params_lt3.params_lt3[k]
    else:
        print 'Sweep_bell: invalid setup:', setup

    msmt.params['send_AWG_start'] = 1
    msmt.params['sync_during_LDE'] = 1
    msmt.params['wait_for_AWG_done'] = 1
    msmt.params['do_general_sweep']= 1
    msmt.params['trigger_wait'] = 1
def cal_CORPSE_pi2(name):
    """
    Do a pi/2 with and without a pi pulse afterward, sweeping the amplitude of the pi/2.
    """

    m = CORPSEPi2Calibration(name)
    funcs.prepare(m)

    pts = 21
    m.params['pts_awg'] = pts

    # 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['repetitions'] = 1000
    m.params['wait_for_AWG_done'] = 1
    m.params['Ex_SP_amplitude'] = 0

    m.params['CORPSE_mod_frq'] = m.params['CORPSE_pi_mod_frq']
    sweep_axis = linspace(0.15, 0.3, pts)
    m.params['CORPSE_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))

    funcs.finish(m, upload=UPLOAD, debug=DEBUG)
示例#16
0
def calibrate_msm1_pi(name):
    m = CORPSEPiCalibration(name)
    funcs.prepare(m)

    pts = 11
    CORPSE_frq = 6.5e6
    m.params['CORPSE_rabi_frequency'] = CORPSE_frq
    m.params['CORPSE_pi_amp'] = 0.5  #m.params['msm1_CORPSE_pi_amp']
    m.params['CORPSE_pi_60_duration'] = 1. / CORPSE_frq / 6.
    m.params['CORPSE_pi_m300_duration'] = 5. / CORPSE_frq / 6.
    m.params['CORPSE_pi_420_duration'] = 7. / CORPSE_frq / 6.
    m.params[
        'CORPSE_pi_mod_frq'] = m.params['ms-1_cntr_frq'] - m.params['mw_frq']

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

    # sweep params
    m.params['CORPSE_pi_sweep_amps'] = np.linspace(0.7, 0.9, pts)
    m.params['multiplicity'] = 1
    m.params['delay_reps'] = 15

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

    funcs.finish(m, debug=True)
示例#17
0
def repelectronramseyCORPSE_loop(label='',
                                 delay_time=1,
                                 repump_E=0,
                                 repump_A=0,
                                 nr_of_hyperfine_periods=3,
                                 phase=90,
                                 reps=2,
                                 upload=True):
    name = 'SIL4_' + str(nr_of_hyperfine_periods) + '_hf' + label
    n = name + "_" + str(delay_time) + "us" + "A" + str(repump_A) + "E" + str(
        repump_E)

    m = pulsar_msmt.RepElectronRamseysCORPSE(n)
    funcs.prepare(m)
    m.params.from_dict(qt.exp_params['protocols']['AdwinSSRO+MBI'])
    m.params.from_dict(qt.exp_params['protocols']['Hans_sil4']['Magnetometry'])

    m.params['repump_E'] = repump_E
    m.params['repump_A'] = repump_A
    m.params['wait_time_between_msmnts'] = delay_time

    pts = 1
    m.params['pts'] = pts
    m.params['repetitions'] = 5000

    m.params['evolution_times'] = np.ones(
        1) * nr_of_hyperfine_periods / m.params['N_HF_frq']

    # MW pulses
    m.params['CORPSE_pi2_mod_frq'] = m.params['MW_modulation_frequency']
    m.params['CORPSE_pi2_amps'] = np.ones(pts) * m.params['CORPSE_pi2_amp']
    m.params['CORPSE_pi2_phases1'] = np.ones(pts) * 0
    m.params['CORPSE_pi2_phases2'] = np.ones(pts) * (
        phase + 15)  #360 * m.params['evolution_times'] * 2e6

    # for the autoanalysis
    m.params['sweep_name'] = 'evolution time (ns)'
    m.params['sweep_pts'] = m.params['evolution_times'] / 1e-9

    #m.autoconfig()
    #return_e=m.generate_sequence()
    #funcs.finish(m,upload=upload)
    #print m.adwin_var('completed_reps')

    m.autoconfig()
    m.generate_sequence(upload=upload)

    for i in np.arange(reps):
        if (msvcrt.kbhit() and (msvcrt.getch() == 'q')):
            m.finish()
            raise Exception('User abort')
        print '#######################################'
        print '####    Rep nr ', str(i), ' /  ', str(reps), '   ##########'
        print '#######################################'
        m.run(autoconfig=False)
        m.save('rep_' + str(i))
    m.finish()
def dd_calibrate_T2(name):
    m = dd_msmt.DynamicalDecoupling('calibrate_T2')
    funcs.prepare(m)

    m.params_lt3 = m.params
    m.params_lt3['pi2_pulse_phase'] = 0  #Y
    m.params_lt3['DD_pi_phases'] = [90, 0,
                                    90]  ## THIS DEFINES THE XYX SEQUENCE
    m.params_lt3['CORPSE_pi2_wait_length'] = 1300e-9
    m.params_lt3[
        'first_C_revival'] = 106.579e-6 / 2.  #C revival after CORPSE_pi2_wait_length
    m.params_lt3['dd_extra_t_between_pi_pulses'] = -0.111e-6  #0.470e-6
    m.params_lt3['dd_spin_echo_time'] = -83.5e-9
    m.params['dd_use_delay_reps'] = False
    m.params['EOM_trigger_length'] = 100e-9
    m.params['PLU_gate_duration'] = 100e-9
    m.params['Ex_SP_amplitude'] = 0
    m.update_definitions()

    m.params['dd_use_delay_reps'] = True

    pts_per_revival = 2
    revivals = 16
    pts = pts_per_revival * (revivals - 1)
    m.params['pts'] = pts
    m.params['repetitions'] = 750
    m.params_lt3['wait_for_AWG_done'] = 1

    # sweep params
    #free evolutiona time is half the total evolution time!!! from centre to centre of pulses

    sweep_array = m.params_lt3['first_C_revival'] + np.linspace(
        -1e-6, 1e-6, pts_per_revival)
    for r in range(2, revivals):
        sweep_array=np.append(sweep_array, \
            r * (m.params_lt3['first_C_revival'] \
            + m.params_lt3['CORPSE_pi2_wait_length'] \
            + m.params_lt3['dd_extra_t_between_pi_pulses'])
            + np.linspace(-1e-6, 1e-6, pts_per_revival))
    print sweep_array
    m.params_lt3['free_evolution_times'] = sweep_array

    m.params_lt3['DD_pi_phases'] = [0]
    m.dd_sweep_free_ev_time_msmt()

    # for the autoanalysis
    m.params_lt3['sweep_name'] = 'total free evolution time (us)'
    m.params_lt3['sweep_pts'] = 2 * m.params_lt3['free_evolution_times'] / 1e-6

    funcs.finish(m, upload=UPLOAD, debug=False)
示例#19
0
def rabi(name,
         IQmod=True,
         Imod_channel=True,
         pulse_type='Square',
         debug=False):

    m = pulsar_msmt.GeneralElectronRabi(name)
    funcs.prepare(m)
    pulse, pulse_pi2_not_used = pulse_defs(m, IQmod, pulse_type, Imod_channel)

    m.params['pulse_type'] = pulse_type
    m.params['IQmod'] = IQmod
    m.params['Imod_channel'] = Imod_channel

    m.params['pts'] = 21
    pts = m.params['pts']
    m.params['repetitions'] = 2000

    m.params['Ex_SP_amplitude'] = 0

    sweep_duration = False
    if sweep_duration:
        m.params['pulse_sweep_durations'] = np.linspace(0, 50, pts) * 1e-9
        m.params['pulse_sweep_amps'] = np.ones(pts) * 0.9

        # for autoanalysis
        m.params['sweep_name'] = 'Pulse durations (ns)'
        m.params['sweep_pts'] = m.params['pulse_sweep_durations'] * 1e9
    else:

        m.params['pulse_sweep_durations'] = np.ones(
            pts) * 4000e-9  #np.linspace(0, 10, pts) * 1e-6
        m.params['pulse_sweep_amps'] = np.linspace(0., 0.04,
                                                   pts)  #0.55*np.ones(pts)

        # for autoanalysis
        m.params['sweep_name'] = 'MW_pulse_amplitudes (V)'
        m.params['sweep_pts'] = m.params['pulse_sweep_amps']

    print m.params['sweep_pts']

    print Imod_channel
    funcs.finish(m,
                 upload=True,
                 debug=debug,
                 pulse_pi=pulse,
                 Imod_channel=Imod_channel)

    print "\nAnalysis suggestion : execfile(r'D:\measuring\\analysis\scripts\espin\electron_rabi_analysis.py')"
示例#20
0
def sweep_amplitude(name):
    m = CORPSEPiCalibration(name)
    funcs.prepare(m)

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

    # sweep params
    m.params['CORPSE_pi_sweep_amps'] = np.linspace(0.6, 0.8, pts)
    m.params['multiplicity'] = 11
    m.params['delay_reps'] = 15

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

    funcs.finish(m, debug=True)
示例#21
0
def calibrate_pi_pulse_NoIQSource(name, multiplicity=1, debug=False):
    m = pulsar_msmt.General_mw2_PiCalibrationSingleElement(name)
    espin_funcs.prepare(m)

    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
    rng = 8e-9 if multiplicity == 1 else 4e-9

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

    # For square pulses
    m.params['MW2_duration'] = m.params['mw2_fast_pi_duration'] + np.linspace(
        -rng, rng, pts)
    m.params['MW2_pulse_amplitudes'] = m.params[
        'mw2_fast_pi_amp']  #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 duration (ns)'

    m.params['sweep_pts'] = m.params['MW2_duration'] * 1e9
    m.params['wait_for_AWG_done'] = 1

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

    print 'amplitude ', m.params['MW2_pulse_amplitudes']
    print 'duration ', m.params['MW2_duration'][0]
    espin_funcs.finish(m, debug=debug, pulse_pi=m.MW_pi)
示例#22
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)
示例#23
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)
示例#24
0
def calibrate_comp_pi2_pi_pi2_pulse(name, multiplicity=1, debug=False):
    m = pulsar_msmt.CompositePiCalibrationSingleElement(name)
    espin_funcs.prepare(m)

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

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

    rng = 0.1 if multiplicity == 1 else 0.05

    m.params['wait_for_AWG_done'] = 1
    ### Pulse settings
    # m.params['multiplicity'] = np.ones(pts)*multiplicity
    m.params['multiplicity'] = multiplicity
    m.params['Hermite_pi_amp'] = 0.93
    m.params['Hermite_pi2_amp'] = 0.75
    m.params['interpulse_delay'] = 4e-9
    m.params['X_phase'] = 90.05
    m.params['Y_phase'] = -0.028
    #sweep generation
    # m.params['general_sweep_pts'] = m.params['Hermite_pi_amp'] + np.linspace(-rng,rng,pts)
    # m.params['general_sweep_name'] = 'Hermite_pi_amp'

    m.params['general_sweep_pts'] = np.arange(1, 1 + 4 * pts, 4)
    m.params['general_sweep_name'] = 'multiplicity'

    # m.params['general_sweep_pts'] = np.linspace(m.params['Y_phase']-2,m.params['Y_phase']+2,pts)
    # m.params['general_sweep_name'] = 'Y_phase'
    # m.params['general_sweep_pts'] = np.round(np.linspace(0,100e-9,pts),9)
    # m.params['general_sweep_name'] = 'interpulse_delay'

    # for the autoanalysis
    m.params['sweep_name'] = m.params['general_sweep_name']
    m.params['sweep_pts'] = m.params['general_sweep_pts']

    # Create pi pulse
    m.comp_pi = pulse.cp(ps.comp_pi2_pi_pi2_pulse(m), phase=0)

    espin_funcs.finish(m, debug=debug, pulse_pi=m.comp_pi)
示例#25
0
def repelectronramsey(name):
    m = pulsar_msmt.RepElectronRamseys(name)
    funcs.prepare(m)
    m.params.from_dict(qt.exp_params['protocols']['AdwinSSRO+MBI'])
    m.params['SP_duration'] = 10
    m.params['A_SP_amplitude'] = 50e-9
    m.params['SSRO_duration'] = 10

    pts = 1

    m.params['pi2_amps'] = np.ones(pts) * 1
    m.params['pi2_phases1'] = np.ones(pts) * 1
    m.params['pi2_phases2'] = np.ones(pts) * 1
    m.params['pi2_lengths'] = np.ones(pts) * 1

    m.params['MW_pulse_frequency'] = 100e6
    m.params['wait_after_pulse_duration'] = 2
    m.params['wait_after_RO_pulse_duration'] = 2

    pts = 1
    m.params['pts'] = pts
    m.params['repetitions'] = 5000

    m.params['evolution_times'] = np.linspace(0, 1 * (pts - 1) * 1 / 2.165e6,
                                              pts)

    # MW pulses
    m.params['detuning'] = 0.0e6
    m.params['CORPSE_pi2_mod_frq'] = m.params[
        'MW_modulation_frequency'] + m.params['detuning'] - 50e3
    m.params['CORPSE_pi2_amps'] = np.ones(pts) * m.params['CORPSE_pi2_amp']
    m.params['CORPSE_pi2_phases1'] = np.ones(pts) * 0
    m.params['CORPSE_pi2_phases2'] = np.ones(
        pts) * 90  #360 * m.params['evolution_times'] * 2e6

    # for the autoanalysis
    m.params['sweep_name'] = 'evolution time (ns)'
    m.params['sweep_pts'] = m.params['evolution_times'] / 1e-9

    funcs.finish(m, upload=True)
    print m.adwin_var('completed_reps')
def cal_ssro_teleportation(name, A_SP_duration=250):
    m = ssro.AdwinSSRO('SSROCalibration_' + name)
    m.params.from_dict(qt.cfgman['protocols']['AdwinSSRO'])
    funcs.prepare(m)
    m.params['SSRO_repetitions'] = 5000
    m.params['SSRO_duration'] = 50
    m.params[
        'SP_duration'] = A_SP_duration  # we want to calibrate the RO, not the SP

    # ms = 1 calibration
    m.params['Ex_SP_amplitude'] = 0
    m.run()
    m.save('ms0')

    # ms = 1 calibration
    m.params['A_SP_amplitude'] = 0.
    m.params['SP_duration'] = 250
    m.params['Ex_SP_amplitude'] = 10e-9

    m.run()
    m.save('ms1')
    m.finish()
示例#27
0
def repelectronramseyCORPSE(name,
                            delay_time=1,
                            repump_E=0,
                            repump_A=0,
                            nr_of_hyperfine_periods=3,
                            phase=90,
                            upload=False):
    m = pulsar_msmt.RepElectronRamseysCORPSE(name)
    funcs.prepare(m)
    m.params.from_dict(qt.exp_params['protocols']['AdwinSSRO+MBI'])
    m.params.from_dict(qt.exp_params['protocols']['Hans_sil4']['Magnetometry'])

    m.params['repump_E'] = repump_E
    m.params['repump_A'] = repump_A
    m.params['wait_time_between_msmnts'] = delay_time

    pts = 1
    m.params['pts'] = pts
    m.params['repetitions'] = 5000

    m.params['evolution_times'] = np.ones(
        1) * nr_of_hyperfine_periods / m.params['N_HF_frq']

    # MW pulses
    m.params['CORPSE_pi2_mod_frq'] = m.params['MW_modulation_frequency']
    m.params['CORPSE_pi2_amps'] = np.ones(
        pts) * 1  # np.ones(pts)*m.params['CORPSE_pi2_amp']
    m.params['CORPSE_pi2_phases1'] = np.ones(pts) * 0
    m.params['CORPSE_pi2_phases2'] = np.ones(
        pts) * phase  #360 * m.params['evolution_times'] * 2e6

    # for the autoanalysis
    m.params['sweep_name'] = 'evolution time (ns)'
    m.params['sweep_pts'] = m.params['evolution_times'] / 1e-9

    #m.autoconfig()
    #return_e=m.generate_sequence()
    funcs.finish(m, upload=upload)
    print m.adwin_var('completed_reps')
def ramsey(name,
           IQmod=False,
           Imod_channel=True,
           pulse_type='Square',
           debug=False):

    m = pulsar_msmt.GeneralElectronRamsey(name)
    funcs.prepare(m)
    pulse_pi_not_used, pulse_pi2 = pulse_defs(m, IQmod, pulse_type,
                                              Imod_channel)

    m.params['pulse_type'] = pulse_type
    m.params['IQmod'] = IQmod
    m.params['Imod_channel'] = Imod_channel

    pts = 250
    m.params['pts'] = pts
    m.params['repetitions'] = 1000
    m.params['Ex_SP_amplitude'] = 0

    m.params['detuning'] = 0.e6
    m.params['mw_frq'] -= m.params['detuning']

    #m.params['evolution_times'] = np.linspace(0,(pts-1)*1/m.params['N_HF_frq'],pts)
    m.params['evolution_times'] = np.linspace(0, 10000e-9, pts)
    #m.params['evolution_times'] = 5*np.ones (pts)*1e-9

    # MW pulses
    m.params['pulse_sweep_pi2_phases1'] = np.ones(pts) * 0
    m.params['pulse_sweep_pi2_phases2'] = 0 * np.ones(
        pts)  #* (90.+15) ##np.linspace(0,360,pts) #np.ones(pts) * 0#

    # for the autoanalysis
    m.params['sweep_name'] = 'evolution time (ns)'
    m.params['sweep_pts'] = m.params['evolution_times'] / 1e-9
    #m.params['sweep_name'] = 'phase second pi2'
    #m.params['sweep_pts'] = m.params['CORPSE_pi2_phases2']

    funcs.finish(m, debug=debug, pulse_pi2=pulse_pi2)
示例#29
0
def electronramsey(name):
    m = pulsar.ElectronRamsey(name)
    funcs.prepare(m)

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

    m.params['evolution_times'] = np.linspace(0,450e-9,pts)

    # MW pulses
    m.params['detuning']  = 0.0e6
    m.params['CORPSE_pi2_mod_frq'] = m.params['CORPSE_pi2_mod_frq'] + m.params['detuning']
    m.params['CORPSE_pi2_amps'] = np.ones(pts)*m.params['CORPSE_pi2_amp']
    m.params['CORPSE_pi2_phases1'] = np.ones(pts) * 0
    m.params['CORPSE_pi2_phases2'] = np.ones(pts) * 0#360 * m.params['evolution_times'] * 2e6

    # for the autoanalysis
    m.params['sweep_name'] = 'evolution time (ns)' 
    m.params['sweep_pts'] = m.params['evolution_times']/1e-9

    funcs.finish(m)
def cal_CORPSE_pi(name, multiplicity=1):
    m = CORPSE_calibration.CORPSEPiCalibration(name +
                                               'M={}'.format(multiplicity))
    funcs.prepare(m)

    pts = 11
    m.params['pts'] = pts
    m.params['repetitions'] = 1000
    m.params['wait_for_AWG_done'] = 1
    m.params['Ex_SP_amplitude'] = 0

    # sweep params
    m.params['CORPSE_mod_frq'] = m.params['CORPSE_pi_mod_frq']
    m.params['CORPSE_pi_sweep_amps'] = np.linspace(0.15, 0.25, pts)
    m.params['multiplicity'] = multiplicity
    name + 'M={}'.format(m.params['multiplicity'])
    m.params['delay_reps'] = 15

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

    funcs.finish(m, upload=UPLOAD, debug=False)
def calibrate_pi4_pulse(name, IQmod=True, pulse_type='CORPSE', debug=False):

    #m = GeneralPi4Calibration(name)
    m = pulsar_msmt.GeneralPi4Calibration_2(name)

    funcs.prepare(m)
    pulse_pi, pulse_pi2 = calib.pulse_defs(m, IQmod, pulse_type)

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

    pts = 11
    m.params['pts_awg'] = pts
    m.params['repetitions'] = 5000

    # 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['wait_for_AWG_done'] = 1

    sweep_axis = np.linspace(0.25, 0.5, pts)
    m.params['pulse_pi4_sweep_amps'] = sweep_axis

    m.params['pulse_pi4_sweep_durations'] = np.ones(
        pts) * m.params['Hermite_pi4_length']
    m.params['pulse_pi4_sweep_phases'] = np.zeros(pts)
    m.params['evolution_times'] = np.ones(pts) * 500e-9
    m.params['extra_wait_final_pi4'] = np.ones(pts) * 0.

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

    funcs.finish(m, debug=debug, pulse_pi=pulse_pi, pulse_pi2=pulse_pi2)
def dd_calibrate_C13_revival(name):
    m = dd_msmt.DynamicalDecoupling('calibrate_first_revival')
    funcs.prepare(m)

    m.params_lt3 = m.params
    m.params_lt3['pi2_pulse_phase'] = 0  #Y
    m.params_lt3['DD_pi_phases'] = [90, 0,
                                    90]  ## THIS DEFINES THE XYX SEQUENCE
    m.params_lt3['CORPSE_pi2_wait_length'] = 1300e-9
    m.params_lt3[
        'first_C_revival'] = 106.579e-6 / 2.  #C revival after CORPSE_pi2_wait_length
    m.params_lt3['dd_extra_t_between_pi_pulses'] = -0.111e-6  #0.470e-6
    m.params_lt3['dd_spin_echo_time'] = -83.5e-9
    m.params['dd_use_delay_reps'] = False
    m.params['EOM_trigger_length'] = 100e-9
    m.params['PLU_gate_duration'] = 100e-9
    m.params['Ex_SP_amplitude'] = 0
    m.update_definitions()

    pts = 11
    m.params['pts'] = pts
    m.params['repetitions'] = 2000
    m.params_lt3['wait_for_AWG_done'] = 1

    # sweep params
    #free evolutiona time is half the total evolution time!!! from centre to centre of pulses
    m.params_lt3['free_evolution_times'] = 52.4e-6 + np.linspace(
        -5e-6, 5e-6, pts)  #m.params_lt3['first_C_revival'] #

    m.params_lt3['DD_pi_phases'] = [0]
    m.dd_sweep_free_ev_time_msmt()

    # for the autoanalysis
    m.params_lt3['sweep_name'] = 'total free evolution time (us)'
    m.params_lt3['sweep_pts'] = 2 * m.params_lt3['free_evolution_times'] / 1e-6

    funcs.finish(m, upload=UPLOAD, debug=False)