quantify_scheduler.compilation

Compiler for the quantify_scheduler.

Module Contents

Functions

determine_absolute_timing(...)

Determines the absolute timing of a schedule based on the timing constraints.

validate_config(→ bool)

Validate a configuration using a schema.

Attributes

logger

logger[source]
determine_absolute_timing(schedule: quantify_scheduler.schedules.schedule.Schedule, time_unit: Literal[physical, ideal, None] = 'physical', config: Optional[quantify_scheduler.backends.graph_compilation.CompilationConfig] = None) quantify_scheduler.schedules.schedule.Schedule[source]

Determines the absolute timing of a schedule based on the timing constraints.

This function determines absolute timings for every operation in the schedulables. It does this by:

  1. iterating over all and elements in the schedulables.

  2. determining the absolute time of the reference operation.

  3. determining the start of the operation based on the rel_time and duration of operations.

Parameters
  • schedule – The schedule for which to determine timings.

  • config – Compilation config for QuantifyCompiler, which is currently not used in this compilation step.

  • time_unit – Whether to use physical units to determine the absolute time or ideal time. When time_unit == "physical" the duration attribute is used. When time_unit == "ideal" the duration attribute is ignored and treated as if it is 1. When time_unit == None it will revert to "physical".

Returns

a new schedule object where the absolute time for each operation has been determined.

validate_config(config: dict, scheme_fn: str) bool[source]

Validate a configuration using a schema.

Parameters
  • config – The configuration to validate

  • scheme_fn – The name of a json schema in the quantify_scheduler.schemas folder.

Returns

True if valid