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 hardware configuration is shown below.

Two variants of the same hardware configuration are shown:

Hide code cell outputs
{
    "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
            ],
            "sampling_rate": 1000000000.0
        }
    },
    "cluster0": {
        "ref": "internal",
        "instrument_type": "Cluster",
        "sequence_to_file": false,
        "cluster0_module1": {
            "instrument_type": "QCM",
            "sequence_to_file": false,
            "complex_output_0": {
                "lo_name": "lo0",
                "dc_mixer_offset_I": 0.0,
                "dc_mixer_offset_Q": 0.0,
                "downconverter_freq": null,
                "marker_debug_mode_enable": true,
                "mix_lo": true,
                "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",
            "sequence_to_file": false,
            "complex_output_0": {
                "lo_freq": null,
                "output_att": 4,
                "portclock_configs": [
                    {
                        "port": "q0:mw",
                        "clock": "q0.01",
                        "interm_freq": 50000000.0
                    },
                    {
                        "port": "q5:mw",
                        "clock": "q5.01",
                        "interm_freq": 50000000.0
                    }
                ]
            },
            "complex_output_1": {
                "lo_freq": 5000000000.0,
                "output_att": 6,
                "portclock_configs": [
                    {
                        "port": "q6:mw",
                        "clock": "q6.01",
                        "interm_freq": null
                    }
                ]
            },
            "digital_output_0": {
                "portclock_configs": [
                    {
                        "port": "q0:switch",
                        "clock": "digital"
                    }
                ]
            }
        },
        "cluster0_module3": {
            "instrument_type": "QRM",
            "sequence_to_file": false,
            "complex_output_0": {
                "lo_name": "lo1",
                "dc_mixer_offset_I": -0.054,
                "dc_mixer_offset_Q": -0.034,
                "input_gain_I": 2,
                "input_gain_Q": 3,
                "portclock_configs": [
                    {
                        "mixer_amp_ratio": 0.9997,
                        "mixer_phase_error_deg": -4.0,
                        "port": "q4:res",
                        "clock": "q4.ro",
                        "interm_freq": null
                    }
                ]
            },
            "complex_input_0": {
                "portclock_configs": [
                    {
                        "port": "qe0:optical_readout",
                        "clock": "qe0.ge0",
                        "ttl_acq_threshold": 0.5,
                        "init_gain_awg_path_I": 1.0,
                        "init_gain_awg_path_Q": 1.0,
                        "init_offset_awg_path_I": 0.0,
                        "init_offset_awg_path_Q": 0.0,
                        "qasm_hook_func": null
                    }
                ]
            }
        },
        "cluster0_module4": {
            "instrument_type": "QRM_RF",
            "sequence_to_file": false,
            "complex_input_0": {
                "lo_freq": null,
                "input_att": 10,
                "portclock_configs": [
                    {
                        "port": "q5:res",
                        "clock": "q5.ro",
                        "interm_freq": 50000000.0
                    }
                ]
            },
            "complex_output_0": {
                "lo_freq": 7800000000.0,
                "output_att": 12,
                "input_att": 4,
                "portclock_configs": [
                    {
                        "port": "q0:res",
                        "clock": "q0.ro",
                        "interm_freq": null
                    }
                ]
            }
        },
        "cluster0_module7": {
            "instrument_type": "QCM",
            "sequence_to_file": false,
            "real_output_0": {
                "lo_name": "lo_real",
                "portclock_configs": [
                    {
                        "port": "q7:mw",
                        "clock": "q7.01",
                        "interm_freq": null
                    }
                ]
            }
        },
        "cluster0_module10": {
            "instrument_type": "QCM",
            "sequence_to_file": false,
            "real_output_0": {
                "portclock_configs": [
                    {
                        "port": "q0:fl",
                        "clock": "cl0.baseband"
                    }
                ]
            },
            "real_output_1": {
                "portclock_configs": [
                    {
                        "port": "q1:fl",
                        "clock": "cl0.baseband"
                    }
                ]
            },
            "real_output_2": {
                "portclock_configs": [
                    {
                        "port": "q2:fl",
                        "clock": "cl0.baseband"
                    }
                ]
            },
            "real_output_3": {
                "portclock_configs": [
                    {
                        "port": "q3:fl",
                        "clock": "cl0.baseband"
                    }
                ]
            }
        },
        "cluster0_module12": {
            "instrument_type": "QCM",
            "sequence_to_file": false,
            "real_output_0": {
                "portclock_configs": [
                    {
                        "port": "q4:fl",
                        "clock": "cl0.baseband"
                    }
                ]
            }
        }
    },
    "lo0": {
        "instrument_type": "LocalOscillator",
        "frequency": null,
        "power": 1
    },
    "lo1": {
        "instrument_type": "LocalOscillator",
        "frequency": 7200000000.0,
        "power": 1
    },
    "lo_real": {
        "instrument_type": "LocalOscillator",
        "frequency": 5000000000.0,
        "power": 1
    }
}
Hide code cell outputs
{
    "config_type": "quantify_scheduler.backends.qblox_backend.QbloxHardwareCompilationConfig",
    "hardware_description": {
        "cluster0": {
            "instrument_type": "Cluster",
            "ref": "internal",
            "modules": {
                "1": {
                    "instrument_type": "QCM",
                    "complex_output_0": {
                        "marker_debug_mode_enable": true
                    }
                },
                "2": {
                    "instrument_type": "QCM_RF",
                    "digital_output_0": {}
                },
                "3": {
                    "instrument_type": "QRM"
                },
                "4": {
                    "instrument_type": "QRM_RF"
                },
                "7": {
                    "instrument_type": "QCM"
                },
                "10": {
                    "instrument_type": "QCM"
                },
                "12": {
                    "instrument_type": "QCM"
                }
            }
        },
        "lo0": {
            "instrument_type": "LocalOscillator",
            "power": 1
        },
        "lo1": {
            "instrument_type": "LocalOscillator",
            "power": 1
        },
        "lo_real": {
            "instrument_type": "LocalOscillator",
            "power": 1
        },
        "iq_mixer_lo0": {
            "instrument_type": "IQMixer"
        },
        "iq_mixer_lo1": {
            "instrument_type": "IQMixer"
        },
        "iq_mixer_lo_real": {
            "instrument_type": "IQMixer"
        }
    },
    "hardware_options": {
        "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
                ]
            }
        },
        "modulation_frequencies": {
            "q0:res-q0.ro": {
                "interm_freq": null,
                "lo_freq": 7800000000.0
            },
            "q0:mw-q0.01": {
                "interm_freq": 50000000.0,
                "lo_freq": null
            },
            "q4:mw-q4.01": {
                "interm_freq": 200000000.0,
                "lo_freq": null
            },
            "q4:res-q4.ro": {
                "interm_freq": null,
                "lo_freq": 7200000000.0
            },
            "q5:mw-q5.01": {
                "interm_freq": 50000000.0,
                "lo_freq": null
            },
            "q5:res-q5.ro": {
                "interm_freq": 50000000.0
            },
            "q6:mw-q6.01": {
                "lo_freq": 5000000000.0
            },
            "q7:mw-q7.01": {
                "lo_freq": 5000000000.0
            }
        },
        "mixer_corrections": {
            "q4:mw-q4.01": {
                "amp_ratio": 0.9999,
                "phase_error": -4.2
            },
            "q4:res-q4.ro": {
                "dc_offset_i": -0.054,
                "dc_offset_q": -0.034,
                "amp_ratio": 0.9997,
                "phase_error": -4.0
            }
        },
        "output_att": {
            "q0:mw-q0.01": 4,
            "q0:res-q0.ro": 12,
            "q5:mw-q5.01": 4,
            "q6:mw-q6.01": 6
        },
        "input_gain": {
            "q4:res-q4.ro": {
                "gain_I": 2,
                "gain_Q": 3
            }
        },
        "input_att": {
            "q0:res-q0.ro": 4,
            "q5:res-q5.ro": 10
        },
        "sequencer_options": {
            "qe0:optical_readout-qe0.ge0": {
                "ttl_acq_threshold": 0.5
            }
        }
    },
    "connectivity": {
        "graph": [
            [
                "cluster0.module1.complex_output_0",
                "iq_mixer_lo0.if"
            ],
            [
                "lo0.output",
                "iq_mixer_lo0.lo"
            ],
            [
                "iq_mixer_lo0.rf",
                "q4:mw"
            ],
            [
                "cluster0.module2.complex_output_0",
                [
                    "q0:mw",
                    "q5:mw"
                ]
            ],
            [
                "cluster0.module2.complex_output_1",
                "q6:mw"
            ],
            [
                "cluster0.module2.digital_output_0",
                "q0:switch"
            ],
            [
                "cluster0.module3.complex_output_0",
                "iq_mixer_lo1.if"
            ],
            [
                "lo1.output",
                "iq_mixer_lo1.lo"
            ],
            [
                "iq_mixer_lo1.rf",
                "q4:res"
            ],
            [
                "cluster0.module3.complex_input_0",
                "qe0:optical_readout"
            ],
            [
                "cluster0.module4.complex_input_0",
                "q5:res"
            ],
            [
                "cluster0.module4.complex_output_0",
                "q0:res"
            ],
            [
                "cluster0.module7.real_output_0",
                "iq_mixer_lo_real.if"
            ],
            [
                "lo_real.output",
                "iq_mixer_lo_real.lo"
            ],
            [
                "iq_mixer_lo_real.rf",
                "q7:mw"
            ],
            [
                "cluster0.module10.real_output_0",
                "q0:fl"
            ],
            [
                "cluster0.module10.real_output_1",
                "q1:fl"
            ],
            [
                "cluster0.module10.real_output_2",
                "q2:fl"
            ],
            [
                "cluster0.module10.real_output_3",
                "q3:fl"
            ],
            [
                "cluster0.module12.real_output_0",
                "q4:fl"
            ]
        ]
    }
}