app.processing.pre.renaming =========================== .. py:module:: app.processing.pre.renaming .. autoapi-nested-parse:: Transformer to rename identifiers in a qasm program to globally unique names. Module Contents --------------- .. py:class:: RenameRegisterTransformer Renames all declarations inside a qasm program to prevent collisions when merging. .. py:method:: new_identifier(old_identifier: openqasm3.ast.Identifier, context: uuid.UUID) -> openqasm3.ast.Identifier Generates a new identifier that will be globally unique even after merging multiple programs. Adds the old identifier to the list of renames. :param old_identifier: The old identifier to be renamed. :param context: The context of the current program. :return: A new globally unique identifier. .. py:method:: visit_Identifier(node: openqasm3.ast.Identifier, _context: uuid.UUID) -> openqasm3.ast.Identifier Renames identifiers using the old declaration names. :param node: Identifier to rename :return: Modified identifier