Python toolkit providing an OpenQASM 3 semantic analyzer and utilities for program analysis and compilation.
Project description
pyqasm
Python toolkit providing an OpenQASM 3 semantic analyzer and utilities for program analysis and compilation.
Motivation
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 aims to fill this gap by building upon the openqasm3.parser, and providing support for semantic analysis and utilities for program compilation.
Installation
PyQASM requires Python 3.10 or greater, and can be installed with pip as follows:
pip install pyqasm
Optional Dependencies
PyQASM provides an optional extra called pyqasm[pulse] that adds pulse/calibration features.
pip install pyqasm[pulse]
PyQASM also offers optional extras for command-line interface (CLI) functionality and for program visualization.
To install the CLI tools:
pip install pyqasm[cli]
To install the visualization tools:
pip install pyqasm[visualization]
Install from source
You can also install from source by cloning this repository and running a pip install command in the root directory of the repository:
git clone https://github.com/qBraid/pyqasm.git
cd pyqasm
pip install .
Check version
You can view the version of pyqasm you have installed within a Python shell as follows:
>>> import pyqasm
>>> pyqasm.__version__
Resources
- API Reference: Developer documentation.
- Usage Examples: Scripts and Markdown examples demonstrating core functionality.
- Supported Operations: OpenQASM language features supported, in progress, and planned for future support.
Contributing
- Interested in contributing code, or making a PR? See CONTRIBUTING.md
- For feature requests and bug reports: Submit an issue
- For discussions, and specific questions about pyqasm, or other topics, join our discord community
- For questions that are more suited for a forum, post to
QCSE
with the
pyqasmtag. - By participating, you are expected to uphold our code of conduct.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyqasm-0.4.0.tar.gz.
File metadata
- Download URL: pyqasm-0.4.0.tar.gz
- Upload date:
- Size: 72.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a22d139f70b4a73ee95d4263fce99bf58059e754a791ac4049b7e8bb8dcf24d
|
|
| MD5 |
11baa0ff8afbe1f971f331674ad6b3a1
|
|
| BLAKE2b-256 |
ec24b306d23a020458cb7efcdedf08a909fc0ec1ae254444917fd1316452a05b
|
File details
Details for the file pyqasm-0.4.0-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: pyqasm-0.4.0-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 167.2 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ee20cdbe774f2b2edd003908855e30e9a64353640a00bce891a1b8632bc38a9
|
|
| MD5 |
553d83bb4a2c510c9598aa00c368a046
|
|
| BLAKE2b-256 |
d28e52a6f5d2b1a03af60edb761bbcf1ce08bffc0cff1d37429d79ef99ad53bb
|
File details
Details for the file pyqasm-0.4.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.
File metadata
- Download URL: pyqasm-0.4.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
- Upload date:
- Size: 687.6 kB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a31f22bc96a3bbfdad59ff175890821e362d779739628731577f991c71495825
|
|
| MD5 |
d77e8831095f7e4c5ca07ab0edd74a0c
|
|
| BLAKE2b-256 |
8332e43325a4023560927b6316cbe1028b8db276bc8c323c1cebd6668a79ee6b
|
File details
Details for the file pyqasm-0.4.0-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: pyqasm-0.4.0-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 172.5 kB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7bbb8786734cd9992b97efaa2c983ac1e092b4660a6471639ccb3b92a613e90a
|
|
| MD5 |
71260ab75c75fab93b71ad76b278a23e
|
|
| BLAKE2b-256 |
32287b2daab58ac8af9cbd3e105e67f5d617ccdde962bdb8dcc68b4871267850
|
File details
Details for the file pyqasm-0.4.0-cp313-cp313-macosx_10_13_x86_64.whl.
File metadata
- Download URL: pyqasm-0.4.0-cp313-cp313-macosx_10_13_x86_64.whl
- Upload date:
- Size: 179.5 kB
- Tags: CPython 3.13, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f30be48416ca26e669dcaa77b04c256f1329883c6d43657aceb99d62a86730b5
|
|
| MD5 |
89c234eb49cc07b67658222a7c762ab8
|
|
| BLAKE2b-256 |
bf52558114873df09b014c0119216fa883e118d6b02be7cf80adecf006a093d2
|
File details
Details for the file pyqasm-0.4.0-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: pyqasm-0.4.0-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 167.5 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7a4e5ff3ccacd28419c03a0a1ee33f37eb71fb39af515917bd84bc48e07442a
|
|
| MD5 |
7140acf0c2a29416a534212ace5e9f69
|
|
| BLAKE2b-256 |
fc520882000632a279442e61d6848a6ea0470e472863c5243ac405a88dd46771
|
File details
Details for the file pyqasm-0.4.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.
File metadata
- Download URL: pyqasm-0.4.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
- Upload date:
- Size: 690.7 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
484b3368c4bf6939374a976386075a100d6a20f790e0ac58f23aa4e9e8c82964
|
|
| MD5 |
963dfbd4a561dcec29616d743c0f38fe
|
|
| BLAKE2b-256 |
7a1444f4c541d614c9d5759ab7b659b1232579741228486e99330374e33aa3c6
|
File details
Details for the file pyqasm-0.4.0-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: pyqasm-0.4.0-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 173.4 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa229a2319cf5517b8d5da6d4cea8c1dd4ae54ef328e53d08f81c6586293e807
|
|
| MD5 |
cc780eebdbd4173e54a51d17a1c35df9
|
|
| BLAKE2b-256 |
4a338063f2e89877d23a1bc90fbc80d1dab1b0098afad181d30d60c8f6839e37
|
File details
Details for the file pyqasm-0.4.0-cp312-cp312-macosx_10_13_x86_64.whl.
File metadata
- Download URL: pyqasm-0.4.0-cp312-cp312-macosx_10_13_x86_64.whl
- Upload date:
- Size: 180.6 kB
- Tags: CPython 3.12, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5eb2af0eadcf06c1852a22e73a2244359037a9f9965c0c93bb4fc563588bbe96
|
|
| MD5 |
8863b539fdb9e8943db51ddf9f1a720e
|
|
| BLAKE2b-256 |
e06e29ab8ecf6ab17b3a3e4473341648f7690cf4a9220685bd6889e64bb2172d
|
File details
Details for the file pyqasm-0.4.0-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: pyqasm-0.4.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 167.2 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f602cd65630d9836848d0259537af3f2e093481ff40bf261be47728b495f8fa6
|
|
| MD5 |
e1b8515922a9f79667b95f1312291925
|
|
| BLAKE2b-256 |
f543a23920cc4e0cdc948386360b0f1d5a20b4e57b1e9fb063560fa82d777e39
|
File details
Details for the file pyqasm-0.4.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.
File metadata
- Download URL: pyqasm-0.4.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
- Upload date:
- Size: 711.4 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ca723e5f8fd614d6f7337dbf963063b248d61d53707e9bacece6457183f4bb1
|
|
| MD5 |
1a27618d363dd9945953e07225289609
|
|
| BLAKE2b-256 |
75525d9cee7460a9de5182c44c25ecd021e50d4625acb10e2885f42a84ddcc8e
|
File details
Details for the file pyqasm-0.4.0-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: pyqasm-0.4.0-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 173.4 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ceecb7864983e833bef0efee809410a8032daebe56d281735ed80b5d89c773a6
|
|
| MD5 |
43a35236cf1dcb82cfdd5ee076cea46b
|
|
| BLAKE2b-256 |
49ed9ca52659c4a2c185bdb90d8d9d0844d0413636d50312a9b30acb88880e1d
|
File details
Details for the file pyqasm-0.4.0-cp311-cp311-macosx_10_9_x86_64.whl.
File metadata
- Download URL: pyqasm-0.4.0-cp311-cp311-macosx_10_9_x86_64.whl
- Upload date:
- Size: 180.7 kB
- Tags: CPython 3.11, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d4244c4889056cf5269ccab4c69c15cc51fcace9778ddfea608e69e30a02559
|
|
| MD5 |
03fde7a5ec71b428358c97a09805e3cb
|
|
| BLAKE2b-256 |
a551c3624acf51abec3a7bcdf8677597960443ba6371c4703ca6593654ae9030
|
File details
Details for the file pyqasm-0.4.0-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: pyqasm-0.4.0-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 167.2 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40b650cad889413d9c7f819ff7ab9ae37a5b811382f75cb9abb1316da496e6cc
|
|
| MD5 |
3c0a81b6104c66c1182d2b6b01b95d1e
|
|
| BLAKE2b-256 |
f491479d6cf8bdd07d0656ab5bbf73b166fd4cc3e1ce34efa3823a29afb760ce
|
File details
Details for the file pyqasm-0.4.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.
File metadata
- Download URL: pyqasm-0.4.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
- Upload date:
- Size: 669.0 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28258b08b58ddaa14a904795c5ab9c0b4e4535c47f5e81073fa65a3a08c91be0
|
|
| MD5 |
26c64e08880918237e4b6fd6ec9e4adb
|
|
| BLAKE2b-256 |
b2bee480ca4c4bef3412f7d5fee40a790db0b620caaa162c4aa967e49c4fc4f3
|
File details
Details for the file pyqasm-0.4.0-cp310-cp310-macosx_11_0_arm64.whl.
File metadata
- Download URL: pyqasm-0.4.0-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 173.8 kB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
054acf06ed475c0bdef37f8791c589f98c6e6fd69d734a336c48f09858261ca4
|
|
| MD5 |
96b9b90e5c26d478c81675ae01c69e19
|
|
| BLAKE2b-256 |
d899e3560523dbb3845a192ad902c3a669bda54802666b722bf2d1184b3d4f78
|
File details
Details for the file pyqasm-0.4.0-cp310-cp310-macosx_10_9_x86_64.whl.
File metadata
- Download URL: pyqasm-0.4.0-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 181.1 kB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb6c059859c6f9c62f8d4200b69b6cce6742577f36c997ee299adcf186e2cebf
|
|
| MD5 |
8d620cab494d461ea648e045df7855f1
|
|
| BLAKE2b-256 |
b9e4c2e18d90a167536d2db0fcbc855fd448c0f074dfb8fc028164c05991e98b
|