Reference magnitude does not get passed to pulse info of long square pulses

@djweigand This is the issue brought up in yesterday's meeting.

Description

Execute a long square pulse with a nonzero reference_magnitude on the ComponentBackend Qblox .

What I Did

I've added a minimal example below

Click to show minimal example
from quantify_scheduler.operations import pulse_library
from quantify_scheduler.schedules.schedule import Schedule
from quantify_scheduler.backends.graph_compilation import SerialCompiler
from quantify_scheduler.device_under_test.quantum_device import QuantumDevice
from quantify_scheduler.device_under_test.transmon_element import BasicTransmonElement

quantum_device = QuantumDevice("dummy")
q0 = BasicTransmonElement("q0")
quantum_device.add_element(q0)
cfg = {
    "backend": "quantify_scheduler.backends.qblox_backend.hardware_compile",
    "cluster0": {
        "sequence_to_file": False,
        "ref": "internal",
        "instrument_type": "Cluster",
        "cluster0_module6": {
            "instrument_type": "QCM_RF",
            "complex_output_0": {
                "line_gain_db": 0,
                "portclock_configs": [
                    {"port": "q0:mw", "clock": "q0.01", "interm_freq": -1e8}
                ],
            },
        },
    },
}
quantum_device.hardware_config(cfg)

### Schedule
q0.clock_freqs.f01(4e9)
sched = Schedule("dummy schedule")
sched.add(pulse_library.SquarePulse(
    amp=0.1,
    duration=10e-6,
    port="q0:mw",
    clock="q0.01",
    reference_magnitude=-20
))

compiler = SerialCompiler("dummy", quantum_device)

compiled_sched = compiler.compile(sched)
compiled_sched.operations

What Was Expected

I expected the StitchedPulse operation to have a reference_magnitude entry in the pulse_info dict.

What Actually Happened

This entry was not present.

Note that running

from quantify_scheduler.backends.qblox import constants
constants.PULSE_STITCHING_DURATION = 20e-6

compiler = SerialCompiler("dummy", quantum_device)
compiled_sched = compiler.compile(sched)

compiled_sched.operations

is a temporary fix for this issue, but does not benefit from the stitched pulse benefits.


You can also find us on Slack. For reference, the issues workflow is described in the contribution guidelines.