示例#1
0
def get_qua_program(element: QuantumElement):
    with program() as qua_program:
        with infinite_loop_():
            play("CW", element.name)  # TODO remove hard coding
    return qua_program
示例#2
0
        },
    },
    "mixers": {
        "mixer_qubit": [
            {
                "intermediate_frequency": int(-50e6),
                "lo_frequency": int(5e9),
                "correction": (1.0, 0.0, 0.0, 1.0),
            },
        ],
    },
}

qmm = QuantumMachinesManager()

with program() as test1:
    play("drag1" * amp(0.0, 0.0, 0.0, 0.046), "qubit")

with program() as test2:
    play("drag2", "qubit")

sim_config = SimulationConfig(duration=250, include_analog_waveforms=True)

job1 = qmm.simulate(config, test1, sim_config)
samples1 = job1.get_simulated_samples()
i_samples1, q_samples1 = samples1.con1.analog["1"], samples1.con1.analog["2"]

job2 = qmm.simulate(config, test2, sim_config)
samples2 = job2.get_simulated_samples()
i_samples2, q_samples2 = samples2.con1.analog["1"], samples2.con1.analog["2"]
示例#3
0
    program,
    save,
    stream_processing,
)
from qm.QuantumMachinesManager import QuantumMachinesManager

from qcrew.experiments.coax_test.measurements.unfinished.bad_amp_sweep.configuration import config

# sweep range settings for a, our sweep variable
start = -0.1
stop = 0.1
step = 0.02  # NOTE use step = 0.02 to reproduce the inconsistency in sweep points!

a_guess = np.arange(start, stop, step)  # what I believe the amp sweep points to be

with program() as bad_amp_sweep:

    n = declare(int)  # averaging loop variable
    a = declare(fixed)  # sweep variable
    a_st = declare_stream()  # to save the actual amps swept by the OPX

    with for_(a, start, a < stop, a + step):
        play("CW" * amp(a), "qubit")
        save(a, a_st)

    with stream_processing():
        a_st.save_all("a")  # to obtain raw values - what the OPX actually sweeps

qmm = QuantumMachinesManager()
qm = qmm.open_qm(config)
job = qm.execute(bad_amp_sweep)
示例#4
0
    print(f"Results for '{rr.name}':")
    print(f"I: {rr.mixer.i_offset}")
    print(f"Q: {rr.mixer.q_offset}")
    print(f"G: {rr.mixer.gain_offset}")
    print(f"P: {rr.mixer.phase_offset}")

    print("\n" * 3)

    print("Please copy paste these results in the QM config!")
    print("\n" * 20)
    sa.disconnect()
    ########################################################

    sa = Sa124(name="sa", serial_number=20234154)
    with program() as cw:
        with infinite_loop_():
            play("CW", "rr")

    job = qm.execute(cw)
    freqs, amps = sa.sweep(center=rr.lo_freq, span=400e6, ref_power=0)
    plt.plot(freqs, amps)
    plt.show()
    job.halt()
    sa.disconnect()

    with program() as cw:
        with infinite_loop_():
            play("CW", "qubit")
    job = qm.execute(cw)
    sa = Sa124(name="sa", serial_number=20234154)