qat.experimental.dialect.pulse.ir.traits module
Contains traits that are used to describe properties of operations in the pulse dialect, and to apply canonicalization patterns to operations in the pulse dialect.
- class AdvancesTimeTrait
Bases:
OpTraitA trait that signifies an operation advances time on the frame(s) it acts on.
The time does not need to be known at compile time, and in that sense, can be runtime dynamic.
- class CallKernelOpUserOpInterface
Bases:
SymbolUserOpInterfaceSymbol-user trait for call operations that target kernels.
Inheriting
SymbolUserOpInterfaceregisters the operation as a symbol user. This trait also verifies that the resolved callee is aKernelOpand that call operand/result signatures match the referenced kernel function type.- verify(op)
Verify symbol resolution and signature compatibility for a kernel call.
- class FrameCanonicalizationPatternsTrait
Bases:
HasCanonicalizationPatternsTraitApplies canonicalization to operations that act on frames.
Including:
Phase shifts that are modulo 2pi equal to zero.
Waits that are equal to zero.
- classmethod get_canonicalization_patterns()
- Return type:
tuple[RewritePattern,...]