zhinst / laboneq-applications

A read-only mirror of the ZI laboneq-applications repository.
Apache License 2.0
2 stars 0 forks source link

How to generate rabi pulses with SHFQC #2

Open nyuvlab opened 1 day ago

nyuvlab commented 1 day ago

Hi, we are trying to generate a rabi pulse using 04_amplitude.ipynb. It works well when do_emulation=False, but we haven't figured out how to generate a pulse in our real device. looks like it requires some "platform" to get a setup:

my_platform = demo_platform(1)

so we look into the tutorial to get a device set up:

device_setup, qubits = generate_device_setup_qubits(
    number_qubits=number_of_qubits,
    shfqc=[
        {
            "serial": "DEV12513",
            "zsync": 1,
            "number_of_channels": 6,
            "readout_multiplex": 6,
            "options": None,
            "usb": True
        }
    ],
    include_flux_lines=False,
    server_host="localhost",
    setup_name=f"my_{number_of_qubits}_fixed_qubit_setup",
)

using \laboneq\contrib\example_helpers\generate_device_setup.py However, there's a runtime error when exp_workflow.run().

Is there a good way to generate a real pulse using SHFQC in this repo? Thanks

stephlazar commented 1 day ago

Hello @nyuvlab, thanks for trying out the LabOne Q Applications Library and for reaching out!

It's a bit hard to say exactly what is going on without seeing more of the code you are executing, but let me try to suggest a few things.

Can you successfully connect to the LabOne Q Session? This is done by executing:

session = Session(device_setup)
session.connect(do_emulation=False)

If this works fine, then LabOne Q was able to successfully connect to your SHFQC instrument. I suspect then that the issue lies with the qubits. Are you using the qubits you are showing above, returned by generate_device_setup_qubits?

If yes, those qubit objects don't work with the Applications Library yet. The qubits returned by generate_device_setup_qubits are of type Transmon but the experiments in the Applications Library expect TunableTransmonQubits and their corresponding TunableTransmonQubitOperations at the moment.

Have you seen the tutorial on Defining Your Experimental Setup? This tutorial teaches you how to define the qubits, qpu, and quantum operations expected by the experiments in the LabOne Q Applications Library.

Let me know if this has worked. If the error persists after following the steps in the tutorial above, could you send us the error traceback you get when calling exp_workflow.run() ?

Best Stefania