qat.experimental.pipelines.compile module

Experimental Qblox compile pipeline.

Note

Related work (TODOs)

  • COMPILER-1421: Experimental pulse-level middleend.

  • COMPILER-1422: Experimental QBlox backend.

Wires together the experimental frontend, middleend, and backend for the experimental Qblox target, using a CanonicalSystemData instance rather than the legacy QuantumHardwareModel/PhysicalHardwareModel used by production pipelines such as QbloxCompilePipeline1.

There is no BaseModelLoader that produces CanonicalSystemData (it can be materialised from a supported source payload through materialise()), so this pipeline cannot be wired up through a qatconfig HARDWARE/hardware_loader entry. Instantiate it directly instead:

from qat.experimental.pipelines.compile import (
    ExperimentalQbloxCompilePipeline,
    ExperimentalQbloxCompilePipelineConfig,
)

pipeline = ExperimentalQbloxCompilePipeline(
    config=ExperimentalQbloxCompilePipelineConfig(),
    model=canonical_system_data,
)

Warning

Experimental. compile() will raise NotImplementedError at the backend stage until COMPILER-1422 (QBlox code generation from the new IR stack) is implemented. The frontend and middleend (COMPILER-1421 pulse-level passes) already run against real components. The program passed to compile must be a QuantumInstructionBuilder (PuRR IR) — the experimental frontend only exposes the PuRR importer.

class ExperimentalQbloxCompilePipeline(config, model=None, loader=None, target_data=None, engine=None)

Bases: UpdateablePipeline

Compiles programs for the experimental Qblox target using the frontend, middleend, and backend stack.

Warning

This pipeline is for compilation purposes only and does not execute programs. Backend code generation is not yet implemented (COMPILER-1422); compilation will raise NotImplementedError once it reaches that stage.

Parameters:
  • config (PipelineConfig) – The pipeline configuration with the name of the pipeline, and any additional parameters that can be configured in the pipeline.

  • model (Union[QuantumHardwareModel, PhysicalHardwareModel, None]) – The hardware model to feed into the pipeline. Defaults to None.

  • loader (Optional[BaseModelLoader]) – The hardware loader used to load the hardware model which can be used to later refresh the hardware model. Defaults to None.

  • target_data (Optional[TargetData]) – The data concerning the target device, defaults to None

  • engine (Optional[NativeEngine]) – The engine to use for the pipeline, defaults to None.

Raises:

ValueError – If neither model nor loader is provided.

class ExperimentalQbloxCompilePipelineConfig(**data)

Bases: PipelineConfig

Configuration for ExperimentalQbloxCompilePipeline.

Parameters:

name – The name of the pipeline, defaults to “experimental_qblox”.

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.

self is explicitly positional-only to allow self as a field name.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str