예제 #1
0
파일: M4iTest.py 프로젝트: sqdlab/sqdtoolz
awg_wfm_q2 = WaveformAWG("Waveform 2", [(instr_Agi2, 'ch1'),
                                        (instr_Agi2, 'ch2')], 1.25e9)
awg_wfm_q2.add_waveform_segment(WFS_Gaussian("init", None, 512e-9, 0.5))
awg_wfm_q2.add_waveform_segment(
    WFS_Constant("zero1", mod_freq_qubit, 512e-9, 0.25))
awg_wfm_q2.add_waveform_segment(
    WFS_Gaussian("init2", mod_freq_qubit, 512e-9, 0.5))
awg_wfm_q2.add_waveform_segment(WFS_Constant("zero2", None, 512e-9, 0.0))
awg_wfm_q2.get_output_channel(0).marker(0).set_markers_to_segments(
    ["init", "init2"])
awg_wfm_q2.program_AWG()

#CONNECTED CHANNEL 1 of Agi1 to Input 0 of digitizer and MARKER 2 of Agi1 to Input Trg0 of digitizer

acq_module = ACQ(new_lab._station.load_M4iDigitizer())
acq_module.NumSamples = 256
acq_module.NumSegments = 1
acq_module.SampleRate = 500e6
acq_module.TriggerEdge = 1
acq_module.set_trigger_source(awg_wfm_q.get_output_channel(0).marker(1))

# awg.set_trigger_source(ddg_module.get_trigger_source('A'))

expConfig = ExperimentConfiguration(10e-6, [ddg_module],
                                    [awg_wfm_q, awg_wfm_q2], acq_module,
                                    [freq_module])
# lePlot = expConfig.plot().show()
# input('press <ENTER> to continue')

leData = expConfig.get_data()
예제 #2
0
new_lab.add_instrument(instr_awg)
instr_fsrc = DummyGENmwSrc('freq_src_instr')
new_lab.add_instrument(instr_fsrc)

ddg_module = DDG(instr_ddg)
awg_wfm_q = WaveformAWG("Waveform 2 CH", [(instr_awg, 'CH3'),
                                          (instr_awg, 'CH4')], 1e9)
acq_module = ACQ(instr_acq)
freq_src_module = GENmwSource(instr_fsrc.get_output('CH1'))

param_cav_freq = new_lab.add_variable_property('Cavity Frequency',
                                               freq_src_module, 'Frequency')

#Setup the trigger and instrument relations
ddg_module.set_trigger_output_params('A', 0.0, 50e-9)
acq_module.set_trigger_source(awg_wfm_q.get_output_channel(0).marker(0))
awg_wfm_q.set_trigger_source_all(ddg_module.get_trigger_output('A'))
acq_module.SampleRate = 1e9
acq_module.NumSamples = 100
#Cement the parameters into the experiment configuration
exp_config = ExperimentConfiguration(100e-9, [ddg_module], [awg_wfm_q],
                                     acq_module, [freq_src_module])

# exp_config.plot().show()
# input('press <ENTER> to continue')

new_exp = ExperimentCavitySpectroscopy("cav_exp", exp_config, param_cav_freq,
                                       awg_wfm_q)
new_exp.set_freq_vals(np.linspace(100e9, 500e9, 5))
leData = new_lab.run_single(new_exp)
예제 #3
0
inst_tabor.AWG._get_channel_output('CH1').marker1_output(True)
inst_tabor.AWG._get_channel_output('CH1').marker2_output(True)

# my_param1 = VariableInstrument("len1", awg_wfm2, 'IQFrequency')
# my_param2 = VariableInstrument("len2", awg_wfm2, 'IQPhase')

# tc = TimingConfiguration(1.2e-6, [ddg_module], [awg_wfm2], None)
# lePlot = tc.plot().show()
# leData = new_exp.run(tc, [(my_param1, np.linspace(20e6,35e6,10)),(my_param2, np.linspace(0,3,3))])

inst_tabor.ACQ.TriggerInputEdge = 1
acq_module = ACQ(inst_tabor.ACQ)
# acq_module.NumSamples = 2400
# acq_module.NumSegments = 2
# acq_module.NumRepetitions = 2
acq_module.NumSamples = 16848
acq_module.NumSegments = 1
acq_module.NumRepetitions = 1
leData = inst_tabor.ACQ.get_data()
import matplotlib.pyplot as plt
for r in range(acq_module.NumRepetitions):
    for s in range(acq_module.NumSegments):
        plt.plot(leData[0][r][s])
plt.show(
)  #!!!REMEMBER TO CLOSE THE PLOT WINDOW BEFORE CLOSING PYTHON KERNEL OR TABOR LOCKS UP (PC restart won't cut it - needs to be a chassis restart)!!!
input('press <ENTER> to continue')

awg_wfm_A = WaveformAWG("Waveform CH1", [(inst_tabor.AWG, 'CH1')], 1e9)
awg_wfm_A.add_waveform_segment(WFS_Gaussian("init", None, 512e-9, 0.5))
awg_wfm_A.add_waveform_segment(WFS_Constant("zero1", None, 512e-9, 0.25))
awg_wfm_A.add_waveform_segment(WFS_Gaussian("init2", None, 512e-9, 0.5))
예제 #4
0
# # instr._set_cmd(':DSP:DEC:IQP:INP', 'IQ')
# instr._set_cmd(':DSP:DEC:IQP:INP', 'AMPH')
# instr._chk_err("")

# instr._set_cmd(':DSP:DEC:FRAM', 240)
# instr._chk_err("")
# instr._set_cmd(':DSP:DEC:IQP:OUTP', 'THR')
# instr._chk_err("")

# #Try some MATH operations
# instr._set_cmd(':DSP:MATH:OPERation', 'I1, -2, 10')   #Scale Offset
# instr._set_cmd(':DSP:MATH:OPERation', 'Q1, 1, 0')
# instr._chk_err("")

acq_module = ACQ("TabourACQ", new_lab, ['TaborAWG', 'ACQ'])
acq_module.NumSamples = 480
acq_module.NumSegments = 2
acq_module.NumRepetitions = 2

myProc = ProcessorCPU("DDC", new_lab)
myProc.add_stage(CPU_DDC([100e6] * 2))
myProc.add_stage(
    CPU_FIR([{
        'Type': 'low',
        'Taps': 40,
        'fc': 10e6,
        'Win': 'hamming'
    }] * 4))
# acq_module.set_data_processor(myProc)

leData = acq_module.get_data()
예제 #5
0
파일: M4iTest2.py 프로젝트: sqdlab/sqdtoolz
#     awg_wfm_q2.add_waveform_segment(WFS_Gaussian(f"init{m}", None, 512e-9, 0.5-0.1*m))
#     awg_wfm_q2.add_waveform_segment(WFS_Constant(f"zero1{m}", None, 512e-9, 0.1*m))
#     awg_wfm_q2.add_waveform_segment(WFS_Gaussian(f"init2{m}", None, 512e-9, 0.5-0.1*m))
#     awg_wfm_q2.add_waveform_segment(WFS_Constant(f"zero2{m}", None, 512e-9, 0.0))
#     read_segs += [f"init{m}"]

awg_wfm_q.prepare_initial()
# awg_wfm_q2.prepare_initial()
awg_wfm_q.prepare_final()
# awg_wfm_q2.prepare_final()
awg_wfm_q.get_output_channel(0).Output = True

#CONNECTED CHANNEL 1 of Agi1 to Input 0 of digitizer and MARKER 2 of Agi1 to Input Trg0 of digitizer
instr_digi = new_lab._station.load_M4iDigitizer()
acq_module = ACQ(instr_digi)
acq_module.NumSamples = 512
acq_module.NumSegments = 4
acq_module.NumRepetitions = 5
acq_module.SampleRate = 500e6
acq_module.TriggerEdge = 1
# acq_module.set_trigger_source(awg_wfm_q.get_output_channel(0).marker(1))

#expConfig = ExperimentConfiguration(10e-6, [ddg_module], [awg_wfm_q], acq_module, [freq_module])
expConfig = ExperimentConfiguration(10e-6, [ddg_module], [], acq_module,
                                    [freq_module])
# lePlot = expConfig.plot().show()
# input('press <ENTER> to continue')

leData = expConfig.get_data()
# leData2 = expConfig.get_data()
for r in range(5):  #acq_module.NumRepetitions):