qat.experimental.dialect.pulse.transforms.pipeline module

Centralised builder for the default pulse-level IR preprocessing pipeline.

The PulsePipelineManager is the single point of entry for constructing a pulse-level pass pipeline from a hardware view. It accepts a PulseLevelConstraints instance and exposes build_default_pipeline(), which returns a validated OrderedPassPipeline.

The default pipeline runs the following passes, in order:

  1. OrderedCanonicalizePass — fold all constant arithmetic so that subsequent passes only see canonical ConstantOp operands.

  2. ApplyGranularitySanitisation — round constant durations and sampled-waveform widths up to the hardware timing granularity, so later passes only see realisable times.

  3. EvaluateWaveformsAsSamples — convert analytical waveform ops into sampled ConstantOp payloads, using the per-port sample times from constraints.

  4. TimelineNormalization — resolve SynchronizeOp operations into explicit WaitOp chains using symbolic time-expression analysis.

  5. ApplySquashContiguousOptimizations — merge adjacent wait and phase operations.

  6. LowerKernelsToResultsArrays — rewrite each kernel signature from ResultsCollectionType values to ResultsArrayType values and update all call sites to match the expanded signature.

  7. OrderedCanonicalizePass — a final canonicalization pass that folds any constants left behind by the earlier passes and removes the resulting no-ops.

The OrderedPassPipeline validates any declared OrderedPass constraints when it is constructed, so a mis-ordered schedule fails eagerly at build time.

class PulsePipelineManager(constraints)

Bases: object

Builds pulse-level IR pipelines from a hardware constraint view.

Parameters:

constraints (PulseLevelConstraints) – Hardware-derived pulse-level constraints (timing granularity, per- port sample times, native waveform shapes).

build_default_pipeline()

Build the default pulse-level preprocessing pipeline.

Return type:

OrderedPassPipeline

Returns:

An OrderedPassPipeline containing the standard pulse-level passes in conflict-free order, ending with a final constant-propagation cleanup.

Raises:

VerifyException – If the declared ordering constraints are violated (should not occur with the default configuration).

classmethod from_canonical_data(data)

Construct a manager by deriving constraints from canonical system data.

Parameters:

data (CanonicalSystemData) – The canonical hardware description.

Return type:

PulsePipelineManager

Returns:

A new PulsePipelineManager whose constraints are derived from data.