compiler_container#
Contains the compiler container class.
Module Contents#
Classes#
Container class that holds all the compiler objects for the individual instruments. |
- class CompilerContainer(schedule: quantify_scheduler.Schedule)[source]#
Container class that holds all the compiler objects for the individual instruments.
This class serves to allow all the possible compilation steps that involve multiple devices at the same time, such as calculating the modulation frequency for a device with a separate local oscillator from a clock that is defined at the schedule level.
It is recommended to construct this object using the
from_hardware_cfg
factory method.- Parameters:
schedule – The schedule to be compiled.
- total_play_time[source]#
The total duration of the schedule in absolute time this class will be compiling.
- resources[source]#
The resources attribute of the schedule. Used for getting the information from the clocks.
- instrument_compilers: Dict[str, quantify_scheduler.backends.qblox.compiler_abc.InstrumentCompiler][source]#
The compilers for the individual instruments.
- prepare()[source]#
Prepares all the instrument compilers contained in the class, by running their respective
prepare
methods.
- compile(debug_mode: bool, repetitions: int) Dict[str, Any] [source]#
Performs the compilation for all the individual instruments.
- Parameters:
debug_mode – Debug mode can modify the compilation process, so that debugging of the compilation process is easier.
repetitions – Amount of times to perform execution of the schedule.
- Returns:
Dictionary containing all the compiled programs for each instrument. The key refers to the name of the instrument that the program belongs to.
- add_instrument_compiler(name: str, instrument_type: str | type, instrument_cfg: Dict[str, Any], latency_corrections: Dict[str, float] | None = None) None [source]#
Adds an instrument compiler to the container.
- Parameters:
name – Name of the instrument.
instrument_type – A reference to the compiler class. Can either be passed as string or a direct reference.
instrument_cfg – The hardware config dict for this specific instrument.
latency_corrections – Dict containing the delays for each port-clock combination. This is specified in the top layer of hardware config.
- classmethod from_hardware_cfg(schedule: quantify_scheduler.Schedule, hardware_cfg: dict) CompilerContainer [source]#
Factory method for the CompilerContainer. This is the preferred way to use the CompilerContainer class.
- Parameters:
schedule – The schedule to pass to the constructor.
hardware_cfg – The hardware config.