qblox_backend#
Compiler backend for Qblox hardware.
Module Contents#
Classes#
Datastructure containing the information needed to compile to the Qblox backend. |
Functions#
|
Generate a dict referring to long square pulses to replace in the schedule. |
|
Replace any square pulses indicated by pulse_idx_map by a long_square_pulse. |
Replace square pulses in the schedule with long square pulses. |
|
|
Generate qblox hardware instructions for executing the schedule. |
- _get_square_pulses_to_replace(schedule: quantify_scheduler.Schedule) Dict[str, List[int]] [source]#
Generate a dict referring to long square pulses to replace in the schedule.
This function generates a mapping (dict) from the keys in the
operations()
dict to a list of indices, which refer to entries in the “pulse_info” list that describe a square pulse.
- _replace_long_square_pulses(schedule: quantify_scheduler.Schedule, pulse_idx_map: Dict[str, List[int]]) quantify_scheduler.Schedule [source]#
Replace any square pulses indicated by pulse_idx_map by a long_square_pulse.
- Parameters:
schedule (Schedule) – A
Schedule
, possibly containing long square pulses.pulse_idx_map (Dict[str, List[int]]) – A mapping from the keys in the
operations()
dict to a list of indices, which refer to entries in the “pulse_info” list that describe a square pulse.
- Returns:
The schedule with square pulses longer than
PULSE_STITCHING_DURATION
replaced bylong_square_pulse()
. If no replacements were done, this is the original unmodified schedule.- Return type:
- compile_long_square_pulses_to_awg_offsets(schedule: quantify_scheduler.Schedule, **_: Any) quantify_scheduler.Schedule [source]#
Replace square pulses in the schedule with long square pulses.
Introspects operations in the schedule to find square pulses with a duration longer than
PULSE_STITCHING_DURATION
. Any of these square pulses are converted tolong_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.
- Parameters:
schedule (Schedule) – A
Schedule
, possibly containing long square pulses.- Returns:
schedule – The schedule with square pulses longer than
PULSE_STITCHING_DURATION
replaced bylong_square_pulse()
. If no replacements were done, this is the original unmodified schedule.- Return type:
- 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 [source]#
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.
- Parameters:
schedule – The schedule to compile. It is assumed the pulse and acquisition info is already added to the operation. Otherwise an exception is raised.
config – Compilation config for
QuantifyCompiler
.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.
- class QbloxHardwareCompilationConfig(**data: Any)[source]#
Bases:
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
HardwareCompilationConfig
, but contains fields for hardware-specific settings.Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.
- backend: Callable[[quantify_scheduler.Schedule, Any], quantify_scheduler.Schedule][source]#
The compilation backend this configuration is intended for.
- hardware_description: Dict[str, quantify_scheduler.backends.types.qblox.QbloxHardwareDescription][source]#
Description of the instruments in the physical setup.
- hardware_options: quantify_scheduler.backends.types.qblox.QbloxHardwareOptions[source]#
Options that are used in compiling the instructions for the hardware, such as
LatencyCorrection
orSequencerOptions
.