š£š§© PyQASM
PyQASM is a Python toolkit providing an OpenQASM 3 semantic analyzer and utilities for program analysis and compilation.
OpenQASMĀ is a powerful language for expressing hybrid quantum-classical programs, but it lacks a comprehensive tool supporting the full capabilities of the language. PyQASM addresses this by using the official ANTLR grammar as a reference for OpenQASM 3ās language structure and by leveraging the openqasm3.parser
to interact with the official AST. On top of this foundation, it adds high-level utilities such as program validation and unrolling.
In PyQASM, āunrollingā (also known as program flatteningĀ orĀ inlining) refers to the process of simplifying a quantum program by expanding custom gate definitions, and flattening complex language constructs such as subroutines, loops, and conditional statements into a linear sequence of basic operations. By converting the program into this simplified format, it becomes easier to perform subsequent transpilation or compilation steps before executing the program on a quantum device.
Resources:
Open bounties:
- $150 | [FEATURE] Update the depth calculation to include branching operations with classical registers
- $100 | [FEATURE] Add support for while statements
- $100 | [FEATURE] Add support for explicit casting