app.openqasm3.rename

Helpers for renaming variables in an abstract syntax tree.

Module Contents

app.openqasm3.rename.simple_rename(node: simple_rename.TNode, renamings: dict[str, str]) simple_rename.TNode

Renames variables in node according to the specified mapping.

Parameters:
  • node (simple_rename.TNode) – The node to rename variables in

  • renamings (dict[str, str]) – The variables to rename

Returns:

The transformed node

Return type:

simple_rename.TNode