Usage of the backend

Configuring the backend is done by specifying a python dictionary (or loading it from a JSON file) that describes your experimental setup. An example of such a config:

{
    "backend": "quantify_scheduler.backends.qblox_backend.hardware_compile",
    "latency_corrections": {
        "q4:mw-q4.01": 8e-09,
        "q5:mw-q5.01": 4e-09
    },
    "distortion_corrections": {
        "q0:fl-cl0.baseband": {
            "filter_func": "scipy.signal.lfilter",
            "input_var_name": "x",
            "kwargs": {
                "b": [
                    0,
                    0.25,
                    0.5
                ],
                "a": [
                    1
                ]
            },
            "clipping_values": [
                -2.5,
                2.5
            ]
        }
    },
    "cluster0": {
        "ref": "internal",
        "instrument_type": "Cluster",
        "cluster0_module1": {
            "instrument_type": "QCM",
            "complex_output_0": {
                "lo_name": "lo0",
                "portclock_configs": [
                    {
                        "port": "q4:mw",
                        "clock": "q4.01",
                        "interm_freq": 200000000.0,
                        "mixer_amp_ratio": 0.9999,
                        "mixer_phase_error_deg": -4.2
                    }
                ]
            }
        },
        "cluster0_module2": {
            "instrument_type": "QCM_RF",
            "complex_output_0": {
                "portclock_configs": [
                    {
                        "port": "q5:mw",
                        "clock": "q5.01",
                        "interm_freq": 50000000.0
                    }
                ]
            }
        },
        "cluster0_module3": {
            "instrument_type": "QRM",
            "complex_output_0": {
                "lo_name": "lo1",
                "dc_mixer_offset_I": -0.054,
                "dc_mixer_offset_Q": -0.034,
                "portclock_configs": [
                    {
                        "mixer_amp_ratio": 0.9997,
                        "mixer_phase_error_deg": -4.0,
                        "port": "q4:res",
                        "clock": "q4.ro",
                        "interm_freq": null
                    }
                ]
            }
        },
        "cluster0_module4": {
            "instrument_type": "QRM_RF",
            "complex_output_0": {
                "portclock_configs": [
                    {
                        "port": "q5:res",
                        "clock": "q5.ro",
                        "interm_freq": 50000000.0
                    }
                ]
            }
        }
    },
    "qcm0": {
        "instrument_type": "Pulsar_QCM",
        "ref": "internal",
        "complex_output_0": {
            "lo_name": "lo0",
            "dc_mixer_offset_I": 0.1234,
            "dc_mixer_offset_Q": -1.337,
            "portclock_configs": [
                {
                    "port": "q0:mw",
                    "clock": "q0.01",
                    "interm_freq": 50000000.0,
                    "mixer_amp_ratio": 0.9998,
                    "mixer_phase_error_deg": -4.1
                }
            ]
        },
        "complex_output_1": {
            "lo_name": "lo1",
            "portclock_configs": [
                {
                    "port": "q1:mw",
                    "clock": "q1.01",
                    "interm_freq": null
                }
            ]
        }
    },
    "qrm0": {
        "instrument_type": "Pulsar_QRM",
        "ref": "external",
        "complex_output_0": {
            "lo_name": "lo1",
            "dc_mixer_offset_I": -0.054,
            "dc_mixer_offset_Q": -0.034,
            "portclock_configs": [
                {
                    "mixer_amp_ratio": 0.9997,
                    "mixer_phase_error_deg": -4.0,
                    "port": "q0:res",
                    "clock": "q0.ro",
                    "interm_freq": null
                },
                {
                    "mixer_amp_ratio": 0.9997,
                    "mixer_phase_error_deg": -4.0,
                    "port": "q0:res",
                    "clock": "q0.multiplex",
                    "interm_freq": null
                }
            ]
        }
    },
    "qrm1": {
        "instrument_type": "Pulsar_QRM",
        "ref": "external",
        "complex_output_0": {
            "portclock_configs": [
                {
                    "port": "q1:res",
                    "clock": "q1.ro"
                }
            ]
        }
    },
    "qcm_rf0": {
        "instrument_type": "Pulsar_QCM_RF",
        "ref": "internal",
        "complex_output_0": {
            "dc_mixer_offset_I": -0.045,
            "dc_mixer_offset_Q": -0.035,
            "portclock_configs": [
                {
                    "mixer_amp_ratio": 0.9996,
                    "mixer_phase_error_deg": -3.9,
                    "port": "q2:mw",
                    "clock": "q2.01",
                    "interm_freq": 50000000.0
                }
            ]
        },
        "complex_output_1": {
            "lo_freq": 5000000000.0,
            "portclock_configs": [
                {
                    "port": "q3:mw",
                    "clock": "q3.01",
                    "interm_freq": null
                }
            ]
        }
    },
    "qrm_rf0": {
        "instrument_type": "Pulsar_QRM_RF",
        "ref": "external",
        "complex_output_0": {
            "lo_freq": 7200000000.0,
            "dc_mixer_offset_I": -0.046,
            "dc_mixer_offset_Q": -0.036,
            "portclock_configs": [
                {
                    "mixer_amp_ratio": 0.9999,
                    "mixer_phase_error_deg": -3.8,
                    "port": "q2:res",
                    "clock": "q2.ro",
                    "interm_freq": null
                }
            ]
        }
    },
    "qrm_rf1": {
        "instrument_type": "Pulsar_QRM_RF",
        "ref": "external",
        "complex_output_0": {
            "portclock_configs": [
                {
                    "port": "q3:res",
                    "clock": "q3.ro",
                    "interm_freq": 100000000.0
                }
            ]
        }
    },
    "lo0": {
        "instrument_type": "LocalOscillator",
        "frequency": null,
        "power": 1
    },
    "lo1": {
        "instrument_type": "LocalOscillator",
        "frequency": 7200000000.0,
        "power": 1
    }
}

Here the entry "backend": "quantify_scheduler.backends.qblox_backend.hardware_compile" specifies to the scheduler that we are using the Qblox backend (specifically the hardware_compile() function).

Apart from the "backend", each entry in the dictionary corresponds to a device connected to the setup. In the other sections we will look at the specific instrument configurations in more detail.