qat.experimental.dialect.pulse.utils module
Structural utilities for the Pulse dialect.
- pulse_entry_block(module)
Return the block that carries the Pulse instruction stream.
Current repository producers use two concrete module shapes:
Frontend importers build a single
func.func @mainand place Pulse ops in its body block.Some transforms and unit tests build a flat module with Pulse ops at top-level.
TODO(COMPILER-1380): remove this dual-shape logic once the canonical module shape is settled.
- Parameters:
module¶ (
ModuleOp) – The Pulse module to inspect.- Return type:
Block- Returns:
The entry block containing the Pulse instruction sequence.
- Raises:
PassFailedException – If the module contains more than one function, or mixes a function with other top-level operations.