qat.experimental.dialect.pulse.transforms.frame_no_op_elimination module

Implements canonicalization patterns that remove operations that act as a no-op.

This includes: - Phase shifts that are modulo 2pi equal to zero. - Waits that are equal to zero.

class FoldZeroPhaseShiftOp

Bases: RewritePattern

Finds PhaseShiftOp with a constant operand that is modulo 2pi equal to zero and removes the operation.

match_and_rewrite(op: Operation, rewriter: PatternRewriter) None

Match an operation, and optionally perform a rewrite using the rewriter.

Return type:

None

class FoldZeroWaitOp

Bases: RewritePattern

Finds WaitOp with a constant operand that is equal to zero and removes the operation.

match_and_rewrite(op: Operation, rewriter: PatternRewriter) None

Match an operation, and optionally perform a rewrite using the rewriter.

Return type:

None