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: list[openqasm3.ast.Statement | openqasm3.ast.Pragma]) app.enricher.ParsedImplementationNode
Creates an
ImplementationNode
from partial syntax tree.- Parameters:
node (app.model.CompileRequest.Node) – Node that should be enriched
statements (list[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) openqasm3.ast.QubitDeclaration
Creates a qubit input declaration.
- Parameters:
- Return type:
- app.enricher.utils.leqo_output(name: str, index: int, value: openqasm3.ast.Concatenation | openqasm3.ast.Identifier) openqasm3.ast.AliasStatement
Creates an output declaration.
- Parameters:
name (str) – Identifier of the output declaration
index (int) – Index of the output
value (openqasm3.ast.Concatenation | openqasm3.ast.Identifier) – Openqasm3 construct that should be the output
- Return type: