qat.experimental.middleend.middleend module

Experimental pulse-level middleend for the Qblox pipeline.

TODO(COMPILER-1421): Update as part of the implementation of the experimental pulse-level middleend.

Wraps PulsePipelineManager — the pulse-level pass pipeline already implemented in qat.experimental — as a BaseMiddleend so it can be slotted into a CompilePipeline.

Warning

Experimental. This only covers the pulse-level passes described in COMPILER-1421’s acceptance criteria (passes that run before Q1 lowering); Q1 lowering and code generation are handled by the backend (COMPILER-1422), which is not yet implemented.

class PulseLevelMiddleend(model)

Bases: BaseMiddleend

Runs the default pulse-level pass pipeline ahead of Q1 lowering.

Parameters:
  • model (CanonicalSystemData) – The canonical system data used to derive pulse-level constraints (timing granularity, per-port sample times, native waveform shapes).

  • model – The hardware model that holds calibrated information on the qubits on the QPU.

emit(ir, res_mgr=None, met_mgr=None, compiler_config=None, context=None, **kwargs)

Apply the pulse-level pass pipeline to ir in place.

Parameters:
  • res_mgr (Optional[ResultManager]) – Collection of analysis results with caching and aggregation capabilities, defaults to None.

  • met_mgr (Optional[MetricsManager]) – Stores useful intermediary metrics that are generated during compilation, defaults to None.

  • compiler_config (Optional[CompilerConfig]) – Compiler settings, defaults to None.

  • context (Optional[Context]) – xdsl context used to aid pass pipelines.

  • ir (ModuleOp) – The pulse-level IR emitted by the frontend.

Return type:

ModuleOp

Returns:

The same ModuleOp, mutated by the pass pipeline.