compilation =========== .. py:module:: quantify_scheduler.compilation .. autoapi-nested-parse:: Compiler for the quantify_scheduler. Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: quantify_scheduler.compilation._determine_absolute_timing quantify_scheduler.compilation._determine_absolute_timing_schedule quantify_scheduler.compilation._get_start_time quantify_scheduler.compilation.validate_config Attributes ~~~~~~~~~~ .. autoapisummary:: quantify_scheduler.compilation.logger .. py:data:: logger .. py:function:: _determine_absolute_timing(schedule: quantify_scheduler.schedules.schedule.Schedule, time_unit: Literal['physical', 'ideal', None] = 'physical', config: quantify_scheduler.backends.graph_compilation.CompilationConfig | None = None) -> quantify_scheduler.schedules.schedule.Schedule _determine_absolute_timing(schedule: quantify_scheduler.operations.operation.Operation, time_unit: Literal['physical', 'ideal', None] = 'physical', config: quantify_scheduler.backends.graph_compilation.CompilationConfig | None = None) -> quantify_scheduler.operations.operation.Operation | quantify_scheduler.schedules.schedule.Schedule Determine the absolute timing of a schedule based on the timing constraints. This function determines absolute timings for every operation in the :attr:`~.ScheduleBase.schedulables`. It does this by: 1. iterating over all and elements in the :attr:`~.ScheduleBase.schedulables`. 2. determining the absolute time of the reference operation - reference point :code:`"ref_pt"` of the reference operation defaults to :code:`"end"` in case it is not set (i.e., is :code:`None`). 3. determining the start of the operation based on the :code:`rel_time` and :code:`duration` of operations - reference point :code:`"ref_pt_new"` of the added operation defaults to :code:`"start"` in case it is not set. :param schedule: The schedule for which to determine timings. :param config: Compilation config for :class:`~quantify_scheduler.backends.graph_compilation.QuantifyCompiler`. :param time_unit: Whether to use physical units to determine the absolute time or ideal time. When :code:`time_unit == "physical"` the duration attribute is used. When :code:`time_unit == "ideal"` the duration attribute is ignored and treated as if it is :code:`1`. When :code:`time_unit == None` it will revert to :code:`"physical"`. :returns: The modified ``schedule`` where the absolute time for each operation has been determined. :raises NotImplementedError: If the scheduling strategy is not "asap" .. py:function:: _determine_absolute_timing_schedule(schedule: quantify_scheduler.schedules.schedule.Schedule, time_unit: Literal['physical', 'ideal', None], config: quantify_scheduler.backends.graph_compilation.CompilationConfig | None) -> quantify_scheduler.schedules.schedule.Schedule .. py:function:: _get_start_time(schedule: quantify_scheduler.schedules.schedule.Schedule, t_constr: dict[str, str | float], curr_op: quantify_scheduler.operations.operation.Operation | quantify_scheduler.schedules.schedule.Schedule, time_unit: Literal['physical', 'ideal', None]) -> float .. py:function:: validate_config(config: dict, scheme_fn: str) -> bool Validate a configuration using a schema. :param config: The configuration to validate :param scheme_fn: The name of a json schema in the quantify_scheduler.schemas folder. :returns: True if valid