qblox_backend ============= .. py:module:: quantify_scheduler.backends.qblox_backend .. autoapi-nested-parse:: Compiler backend for Qblox hardware. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: quantify_scheduler.backends.qblox_backend.QbloxHardwareCompilationConfig Functions ~~~~~~~~~ .. autoapisummary:: quantify_scheduler.backends.qblox_backend._get_square_pulses_to_replace quantify_scheduler.backends.qblox_backend._replace_long_square_pulses quantify_scheduler.backends.qblox_backend.compile_long_square_pulses_to_awg_offsets quantify_scheduler.backends.qblox_backend.hardware_compile .. py:function:: _get_square_pulses_to_replace(schedule: quantify_scheduler.Schedule) -> Dict[str, List[int]] Generate a dict referring to long square pulses to replace in the schedule. This function generates a mapping (dict) from the keys in the :meth:`~quantify_scheduler.schedules.schedule.ScheduleBase.operations` dict to a list of indices, which refer to entries in the `"pulse_info"` list that describe a square pulse. :param schedule: A :class:`~quantify_scheduler.schedules.schedule.Schedule`, possibly containing long square pulses. :type schedule: Schedule :returns: **square_pulse_idx_map** -- The mapping from ``operation_repr`` to ``"pulse_info"`` indices to be replaced. :rtype: Dict[str, List[int]] .. py:function:: _replace_long_square_pulses(schedule: quantify_scheduler.Schedule, pulse_idx_map: Dict[str, List[int]]) -> quantify_scheduler.Schedule Replace any square pulses indicated by pulse_idx_map by a `long_square_pulse`. :param schedule: A :class:`~quantify_scheduler.schedules.schedule.Schedule`, possibly containing long square pulses. :type schedule: Schedule :param pulse_idx_map: A mapping from the keys in the :meth:`~quantify_scheduler.schedules.schedule.ScheduleBase.operations` dict to a list of indices, which refer to entries in the `"pulse_info"` list that describe a square pulse. :type pulse_idx_map: Dict[str, List[int]] :returns: The schedule with square pulses longer than :class:`~quantify_scheduler.backends.qblox.constants.PULSE_STITCHING_DURATION` replaced by :func:`~quantify_scheduler.operations.pulse_factories.long_square_pulse`. If no replacements were done, this is the original unmodified schedule. :rtype: Schedule .. py:function:: compile_long_square_pulses_to_awg_offsets(schedule: quantify_scheduler.Schedule, **_: Any) -> quantify_scheduler.Schedule Replace square pulses in the schedule with long square pulses. Introspects operations in the schedule to find square pulses with a duration longer than :class:`~quantify_scheduler.backends.qblox.constants.PULSE_STITCHING_DURATION`. Any of these square pulses are converted to :func:`~quantify_scheduler.operations.pulse_factories.long_square_pulse`, which consist of AWG voltage offsets. If any operations are to be replaced, a deepcopy will be made of the schedule, which is returned by this function. Otherwise the original unmodified schedule will be returned. :param schedule: A :class:`~quantify_scheduler.schedules.schedule.Schedule`, possibly containing long square pulses. :type schedule: Schedule :returns: **schedule** -- The schedule with square pulses longer than :class:`~quantify_scheduler.backends.qblox.constants.PULSE_STITCHING_DURATION` replaced by :func:`~quantify_scheduler.operations.pulse_factories.long_square_pulse`. If no replacements were done, this is the original unmodified schedule. :rtype: Schedule .. py:function:: hardware_compile(schedule: quantify_scheduler.Schedule, config: quantify_scheduler.backends.graph_compilation.CompilationConfig | Dict[str, Any] | None = None, *, hardware_cfg: Optional[Dict[str, Any]] = None) -> quantify_scheduler.CompiledSchedule Generate qblox hardware instructions for executing the schedule. The principle behind the overall compilation is as follows: For every instrument in the hardware configuration, we instantiate a compiler object. Then we assign all the pulses/acquisitions that need to be played by that instrument to the compiler, which then compiles for each instrument individually. This function then returns all the compiled programs bundled together in a dictionary with the QCoDeS name of the instrument as key. :param schedule: The schedule to compile. It is assumed the pulse and acquisition info is already added to the operation. Otherwise an exception is raised. :param config: Compilation config for :class:`~quantify_scheduler.backends.graph_compilation.QuantifyCompiler`. :param hardware_cfg: (deprecated) The hardware configuration of the setup. Pass a full compilation config instead using `config` argument. :returns: The compiled schedule. :raises ValueError: When both `config` and `hardware_cfg` are supplied. .. py:class:: QbloxHardwareCompilationConfig Bases: :py:obj:`quantify_scheduler.backends.types.common.HardwareCompilationConfig` Datastructure containing the information needed to compile to the Qblox backend. This information is structured in the same way as in the generic :class:`~quantify_scheduler.backends.types.common.HardwareCompilationConfig`, but contains fields for hardware-specific settings. .. py:attribute:: backend :type: Callable[[quantify_scheduler.Schedule, Any], quantify_scheduler.Schedule] The compilation backend this configuration is intended for. .. py:attribute:: hardware_description :type: Dict[str, quantify_scheduler.backends.types.qblox.QbloxHardwareDescription] Description of the instruments in the physical setup. .. py:attribute:: hardware_options :type: Optional[quantify_scheduler.backends.types.qblox.QbloxHardwareOptions] Options that are used in compiling the instructions for the hardware, such as :class:`~quantify_scheduler.backends.types.common.LatencyCorrection` or :class:`~quantify_scheduler.backends.types.qblox.SequencerOptions`.