qat.pipelines.legacy.base package

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

Bases: UpdateablePipeline

A pipeline that compiles programs using the legacy backend.

Warning

This pipeline is for compilation purposes only and does not execute programs. Please select an appropriate execution pipeline if you wish to run the compiled programs.

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[None, QuantumHardwareModel, PhysicalHardwareModel]) – 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 LegacyExecutePipeline(config, model=None, loader=None, target_data=None, engine=None)

Bases: UpdateablePipeline

A pipeline that executes programs using the legacy backend.

Warning

This pipeline is for execution purposes only and does not compile programs. Please select an appropriate compilation pipeline if you wish to compile programs before execution.

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[None, QuantumHardwareModel, PhysicalHardwareModel]) – 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 LegacyPipeline(config, model=None, loader=None, target_data=None, engine=None)

Bases: UpdateablePipeline

A pipeline that compiles programs using the legacy backend and executes them using the LegacyRuntime.

The piepline uses the engine provided by the legacy model, and cannot be provided to the factory.

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[None, QuantumHardwareModel, PhysicalHardwareModel]) – 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 LegacyPipelineConfig(**data)

Bases: PipelineConfig

Configuration for the LegacyPipeline, extending PipelineConfig with configurable connection modes.

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.

connection_mode: ConnectionMode
model_config: ClassVar[ConfigDict] = {}

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

name: str
class PipelineConfig(**data)

Bases: BaseModel

Base class for configuring updateable pipelines. Subclasses of UpdateablePipeline should be paried with their own configuration class which specifies custom configuration parameters, and/or sets custom defaults.

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
middleend_pipeline(model, target_data)
Return type:

PassManager

results_pipeline(model)
Return type:

PassManager

Submodules