app.processing.graph ==================== .. py:module:: app.processing.graph .. autoapi-nested-parse:: Basic program graph used withing the :mod:`app.processing`. Module Contents --------------- .. py:class:: ProgramNode(name: str, label: str | None = None, is_ancilla_node: bool = False, id: uuid.UUID | None = None) Represents a node in a visual model of an openqasm3 program. :param name: The id given from the front-end. :param id: Unique ID of this node, used in the renaming. :param label: (Optional) Label given from the front-end. :param is_ancilla_node: This node is ancilla node in the model. .. py:class:: IOConnection Map output-reg from source to target input-reg with specified size. .. py:class:: AncillaConnection Map output qubits from source to target input qubits. The qubits are identified via the id specified in :class:`~app.processing.graph.IOInfo`. .. py:class:: ProgramGraph Internal representation of the program graph. .. py:class:: QubitInfo Store QubitIDs of declarations and the various ancilla types. :param declaration_to_ids: Maps declared names to corresponding qubits ids. :param clean_ids: List of required reusable/fresh/uncomputed qubit ids. :param dirty_ids: List of required (possible) dirty qubits. :param reusable_ids: List of returned reusable qubits. :param uncomputable_ids: List of qubits that are reusable after uncompute. :param entangled_ids: List of qubits that are always returned dirty. .. py:class:: ClassicalIOInstance Single input/output from a snippet of type classical. :param name: Name of the annotated variable. :param type: Type of the annotated variable. .. py:class:: QubitIOInstance Single input/output from a snippet of type qubits. :param name: Name of the annotated variable. :param ids: List of annotated qubit ids. .. py:class:: IOInfo Input/output info for a single snippet. :param inputs: Maps input-index to (Qubit/Classical)IOInstance. :param outputs: Maps output-index to (Qubit/Classical)IOInstance. .. py:class:: ProcessedProgramNode Store a qasm snippet as string and AST. :param raw: The corresponding ProgramNode. :param implementation: The implementation as AST. Might be modified during processing. :param io: Input/output information required for connections. :param qubit: Qubit information required for optimization.