app.processing.pre ================== .. py:module:: app.processing.pre .. autoapi-nested-parse:: Each single qasm snippet attached to a node will first pass through the preprocessing pipeline. This happens without the global graph view. The steps are: - parse implementation if it is a string - convert to OpenQASM 3 if in OpenQASM 2 - rename the identifiers by prefixing with node id - inline constants - parse annotation info - upcast inputs if they are too small for the required spec Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/app/processing/pre/converter/index /autoapi/app/processing/pre/inlining/index /autoapi/app/processing/pre/io_parser/index /autoapi/app/processing/pre/renaming/index /autoapi/app/processing/pre/size_casting/index /autoapi/app/processing/pre/utils/index Package Contents ---------------- .. py:function:: preprocess(node: app.processing.graph.ProgramNode, implementation: str | openqasm3.ast.Program, requested_inputs: dict[int, app.model.data_types.LeqoSupportedType] | None = None) -> app.processing.graph.ProcessedProgramNode Run an openqasm3 snippet through the preprocessing pipeline. :param node: The node to preprocess. :param implementation: A valid OpenQASM 2/3 implementation for that node. :param requested_inputs: Optional inputs specification for size_casting :return: The preprocessed program.