Пример #1
0
def create_2D_scan(pulse_lib, gate1, sweep1_mv, gate2, sweep2_mv, n_steps, t_measure,
                   bias_T_corr=False):


    seg = pulse_lib.mk_segment()
    p1 = seg[gate1]
    p2 = seg[gate2]

    t_sweep = n_steps*t_measure*1000

    for i in range(n_steps):
        p1.add_ramp_ss(0, t_sweep, -sweep1_mv, sweep1_mv)
        p1.reset_time()

    v_steps = np.linspace(-sweep2_mv, sweep2_mv, n_steps)
    if bias_T_corr:
        v2 = np.zeros((n_steps))
        mid = (n_steps+1)//2
        v2[::2] = v_steps[:mid]
        v2[1::2] = v_steps[mid:][::-1]
    else:
        v2 = v_steps

    for v_step in v2:
        p2.add_block(0, t_sweep, v_step)
        p2.reset_time()

    # generate the sequence from segments
    my_seq = pulse_lib.mk_sequence([seg])
    my_seq.set_hw_schedule(HardwareScheduleMock())
    my_seq.n_rep = 1
    # 2 points per voltage step
    my_seq.sample_rate = 2 / (t_measure * 1e-6)

    return my_seq
def create_seq(pulse_lib):

    seg1 = pulse_lib.mk_segment(name='init')
    s = seg1
    s.P1.add_ramp_ss(0, 1000, -120, 150)
    s['P2'].add_block(0, 500, 50)
    s.vP3.add_block(600, 800, 100)

    seg2 = pulse_lib.mk_segment('manip')
    s = seg2
    s.vP4.add_ramp_ss(0, 100, 50, 100)
    s.vP4.add_ramp_ss(100, 200, 100, 50)


    seg3 = pulse_lib.mk_segment('measure')
    s = seg3
    s.P1.add_block(0, 1e5, -90)
    s.P2.add_block(0, 1e5, 120)
    s.vP4.add_ramp_ss(1e4, 3e4, 0, 50)
    s.vP4.add_block(3e4, 7e4, 50)
    s.vP4.add_ramp_ss(7e4, 9e4, 50, 0)
    s.SE1.acquire(4e4, t_measure=2e4)

    # generate the sequence and upload it.
    my_seq = pulse_lib.mk_sequence([seg1, seg2, seg3])
    my_seq.set_hw_schedule(HardwareScheduleMock())
    my_seq.n_rep = 1
    my_seq.sample_rate = 1e9

    return my_seq
def create_seq(pulse_lib):

    seg1 = pulse_lib.mk_segment(name='init', sample_rate=1e8)
    s = seg1
    s.P1.add_ramp_ss(0, 1000, -120, 150)
    s.P2.add_block(0, 500, 50)
    s.vP3.add_block(600, 800, 100)

    s.M1.add_marker(800, 900)

    # no sample rate specified: it uses default sample rate. In this example 2e8 Sa/s (see below).
    seg2 = pulse_lib.mk_segment('manip')
    s = seg2
    s.vP4.add_ramp_ss(0, 100, 50, 100)
    s.vP4.add_ramp_ss(100, 200, 100, 50)

    #    s.MW_qubit_2.add_MW_pulse(50, 150, 50, 200e6, AM=tukey)

    s.MW_qubit_1.add_MW_pulse(0, 300, 20, 35e6)
    s.MW_qubit_1.add_phase_shift(300, np.pi / 2)

    #    s.MW_qubit_3.add_MW_pulse(250, 300, 60, 50e6)

    seg2b = pulse_lib.mk_segment('manip2')
    s = seg2b
    s.vP4.add_ramp_ss(0, 100, 50, 100)
    s.vP4.add_ramp_ss(100, 200, 100, 50)

    #    s.MW_qubit_2.add_MW_pulse(50, 150, 50, 200e6, AM=tukey)

    s.MW_qubit_1.add_MW_pulse(0, 300, 20, 35e6)

    #    s.MW_qubit_3.add_MW_pulse(250, 300, 20, 20e6)

    seg3 = pulse_lib.mk_segment('measure', 1e8)
    s = seg3
    s.P1.add_block(0, 1e5, 100)
    s.P2.add_block(0, 1e5, 120)
    s.vP4.add_block(1e4, 2e4, 120)
    s.reset_time()
    s.add_HVI_marker('ping', 99)

    # segment without data. Will be used for DC compensation with low sample rate
    seg4 = pulse_lib.mk_segment('dc compensation', 1e7)
    # wait 10 ns (i.e. 1 sample at 1e8 MSa/s)
    seg4.P1.wait(100)

    # generate the sequence and upload it.
    my_seq = pulse_lib.mk_sequence([seg1, seg2, seg2b, seg3, seg4])
    my_seq.set_hw_schedule(HardwareScheduleMock())
    my_seq.n_rep = 1
    #    my_seq.sample_rate = 2e8

    return my_seq
Пример #4
0
v_param = lp.linspace(0, 200, 5, axis=0, unit = "mV", name = "vPulse")
t_wait = lp.linspace(20, 100, 3, axis=1, unit = "mV", name = "t_wait")


seg1 = p.mk_segment()
seg2 = p.mk_segment()

seg1.P1.add_ramp_ss(0, 100, 0, v_param)
seg1.P1.add_block(100, 200, v_param)

seg2.P2.add_block(0, 100, 200)
seg2.P2.wait(t_wait)
seg2.reset_time()
seg2.add_HVI_marker('dig_trigger_1', t_off=50)
seg2.P1.add_block(0, 100, v_param)

# create sequence
seq = p.mk_sequence([seg1,seg2])
seq.set_hw_schedule(HardwareScheduleMock())

for t in seq.t_wait.values:
    for v_pulse in seq.vPulse.values:
        seq.t_wait(t)
        seq.vPulse(v_pulse)
        seq.upload()
        seq.play()

        plot_awgs(awgs)
        pt.title('AWG upload {t} - {v_pulse}')