app.processing.pre.inlining
Transformer to inline declarations.
Module Contents
- class app.processing.pre.inlining.InliningTransformer
Inlines all integer
openqasm3.ast.ConstantDeclaration
in a qasm ast.- visit_ConstantDeclaration(node: openqasm3.ast.ConstantDeclaration) openqasm3.ast.ConstantDeclaration | None
Removes integer constants from the ast and saves them in a lookup table.
- Parameters:
- Return type:
- visit_Identifier(node: openqasm3.ast.Identifier) openqasm3.ast.Identifier | openqasm3.ast.Expression
Rewrites an identifier to use the inlined aliases.
- Parameters:
node (openqasm3.ast.Identifier) – The identifier to process
- Returns:
The inlined value or unchanged node
- Return type: