app.enricher.utils
Utils for generating implementations for a Node in an EnricherStrategy.
Module Contents
- app.enricher.utils.implementation(node: app.model.CompileRequest.Node, statements: collections.abc.Sequence[openqasm3.ast.Statement | openqasm3.ast.Pragma]) app.enricher.ParsedImplementationNode
Creates an
ImplementationNodefrom partial syntax tree.- Parameters:
node (app.model.CompileRequest.Node) – Node that should be enriched
statements (collections.abc.Sequence[openqasm3.ast.Statement | openqasm3.ast.Pragma]) – Implementation as list of
openqasm3.ast.Statement
- Return type:
- app.enricher.utils.leqo_input(name: str, index: int, size: int | None, *, twos_complement: bool = False) openqasm3.ast.QubitDeclaration
Creates a qubit input declaration.
- Parameters:
- Return type:
- app.enricher.utils.leqo_output(name: str, index: int, value: AliasableExpression) openqasm3.ast.AliasStatement
Creates an output declaration.
- Parameters:
- Return type: