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.
[!WARNING] This project is "pre-alpha", and is not yet stable or fully realized. Use with caution, as the API and functionality are subject to significant changes.
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
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
pyqasm
tag. - 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
File details
Details for the file pyqasm-0.1.0a0.tar.gz
.
File metadata
- Download URL: pyqasm-0.1.0a0.tar.gz
- Upload date:
- Size: 286.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9683708a2e862f56f39ccf4674507b709b2024369e2c35a1b3f644f6484f3fd6 |
|
MD5 | 5b05b9cf4d742299b2cdf012a1daec85 |
|
BLAKE2b-256 | fd495488df79d3cec34f9998ccb0fc2b0baf7b02a98bff089a2cb8490060ec21 |
File details
Details for the file pyqasm-0.1.0a0-cp313-cp313-win_amd64.whl
.
File metadata
- Download URL: pyqasm-0.1.0a0-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 160.2 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a41bc6c1c52100cf0b7c2e023990069cf763b2ab64fbe28e03e6153275cb4eb |
|
MD5 | 60ad574762a077a5dd311093bb69c3e2 |
|
BLAKE2b-256 | ba13b123af4aa2a1a246fff3ed94e92e1ca8d18f3d72a22f7d1c9ffe0aa33e03 |
File details
Details for the file pyqasm-0.1.0a0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pyqasm-0.1.0a0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 678.4 kB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98d7cefba3d5dc56944b9749cb45e3215893b9599d4cf8f3e1ec6afc2689c200 |
|
MD5 | 0c5e71e5838f445383e71d15d6915fa2 |
|
BLAKE2b-256 | 6902c23c268374498b8365aa5688639984acca0a35cf390ca3e1857243362964 |
File details
Details for the file pyqasm-0.1.0a0-cp313-cp313-macosx_11_0_arm64.whl
.
File metadata
- Download URL: pyqasm-0.1.0a0-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 164.2 kB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d2d44fa9f7231461f2df0a10c5abb36855efce3761697cb367fb35b86379b43 |
|
MD5 | 511968dfeb0ab605c5d40643e0c26dd5 |
|
BLAKE2b-256 | 962acdee2c129ee69223987316b40c8bf647e998dab38689f4f3bb2622bff812 |
File details
Details for the file pyqasm-0.1.0a0-cp313-cp313-macosx_10_13_x86_64.whl
.
File metadata
- Download URL: pyqasm-0.1.0a0-cp313-cp313-macosx_10_13_x86_64.whl
- Upload date:
- Size: 171.1 kB
- Tags: CPython 3.13, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57e73f6a9db5b9ce943809d5afca4aafd6a92a03b345f14e6076a50f9af9015a |
|
MD5 | 25d5a2bd8b5d0a11f5a81c200d4da1cf |
|
BLAKE2b-256 | 26d7958aeaf43efe6bf1372d7f9ad26023b0bb51eec333c91e2437395c1155cf |
File details
Details for the file pyqasm-0.1.0a0-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: pyqasm-0.1.0a0-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 160.7 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f88cfe8eb5d4b47d781a1b13fc666e3caafcde547fcb9a9db95c7f45e2c7e91 |
|
MD5 | 43433d1145c4ecb58bdcfece3c643a33 |
|
BLAKE2b-256 | c68fc30e721e3ead85059e8d61dc420e3bfa1de9f0da522c141aad3d401537eb |
File details
Details for the file pyqasm-0.1.0a0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pyqasm-0.1.0a0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 689.5 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21efa579385502691e616431dc37f659e715cdc8a8d3534877c8752f659ee82c |
|
MD5 | ea445a04f25f0190461ee3bdcdd72642 |
|
BLAKE2b-256 | b5c7865da5859783f53448660bd65918e8c4263d247292d3e9cf06b5f8b54be6 |
File details
Details for the file pyqasm-0.1.0a0-cp312-cp312-macosx_11_0_arm64.whl
.
File metadata
- Download URL: pyqasm-0.1.0a0-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 165.5 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ff08808b1728703c2cbaacef6fb2d2e0e0c618ea3effe28b8078b9d7ce3edbd |
|
MD5 | 520b1b9b23a0abe7970d069904829e26 |
|
BLAKE2b-256 | 6653a5996e4b56e2c4fe9c8aa1e92ea4fcc238a623783b9058523fb4314aa2a6 |
File details
Details for the file pyqasm-0.1.0a0-cp312-cp312-macosx_10_13_x86_64.whl
.
File metadata
- Download URL: pyqasm-0.1.0a0-cp312-cp312-macosx_10_13_x86_64.whl
- Upload date:
- Size: 172.4 kB
- Tags: CPython 3.12, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9602f1e02b4dac69ba033454d459edac54fc46427760b64e8b8062d18690a7f6 |
|
MD5 | 93e93a99fcb65dcd28ca1a8148cd3553 |
|
BLAKE2b-256 | 21cb78a6fb7e66802cd93d1cf3a710259fc24e29946d6f61a27ab8ac8d392a15 |
File details
Details for the file pyqasm-0.1.0a0-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: pyqasm-0.1.0a0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 160.4 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ffe4726f6c35dc134ecbcefaf8a8600e0d1d8ab79efd3070e319d95ad40ed98 |
|
MD5 | 23b307d92b336532eead906eb9b304cc |
|
BLAKE2b-256 | 4298b74bba1fca35861d17ea7ec1f016d9c7f6276c2aa87554d7ccca77da183e |
File details
Details for the file pyqasm-0.1.0a0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pyqasm-0.1.0a0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 689.6 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 311f0c6faa6f47e96c5f00bd6bfa388b3b36bd32c09b7407482b0e589e79a746 |
|
MD5 | f1584672990b7e63c649d8f4258df8dd |
|
BLAKE2b-256 | 9f62aaeebe9abecb70991b0dde72968fdcf73d32785653a362f8070844663e10 |
File details
Details for the file pyqasm-0.1.0a0-cp311-cp311-macosx_11_0_arm64.whl
.
File metadata
- Download URL: pyqasm-0.1.0a0-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 164.3 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78a1e7c201d8ba174b3a995c0845166ef81ba332011eb616c11260f282764d95 |
|
MD5 | 6f1358011d4f550144db2c83b90adcf2 |
|
BLAKE2b-256 | 1cdb4926586c7f5af613957f443df33ae282dbe32475ae878a9e1ef376b05cdb |
File details
Details for the file pyqasm-0.1.0a0-cp311-cp311-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: pyqasm-0.1.0a0-cp311-cp311-macosx_10_9_x86_64.whl
- Upload date:
- Size: 171.5 kB
- Tags: CPython 3.11, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aab204937afb0ec382179ac5c4a96ae1411d5804ab79637893f4f5f84233853f |
|
MD5 | 5c7b12cbe31d95bc8f54eefe2377b167 |
|
BLAKE2b-256 | e8d578c552456ee0fb7592262f4e1d49af4f50b51222a5a25791439e871e1249 |
File details
Details for the file pyqasm-0.1.0a0-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: pyqasm-0.1.0a0-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 160.1 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d101a3d339a41508539a40fd8ff025f4f76e281c0e5a9be8135df24d370bbfd4 |
|
MD5 | c8798ccc0d0030ba7ddb5655105e26b9 |
|
BLAKE2b-256 | 8556aad19224e596cbdb78e823e11029a3c8b2353d96cc751c6b5a0d628a1e49 |
File details
Details for the file pyqasm-0.1.0a0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pyqasm-0.1.0a0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 648.2 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8662e3a996645d0d22af8c9f2634c055eca73adc6d5aee036672d21c4a9afde0 |
|
MD5 | 209dea40b1bc03157437d65848b8f1f2 |
|
BLAKE2b-256 | 17ef0e926150ea881d1d4e6e1522a012caf5f83aca0e2112800fc1443931dbc2 |
File details
Details for the file pyqasm-0.1.0a0-cp310-cp310-macosx_11_0_arm64.whl
.
File metadata
- Download URL: pyqasm-0.1.0a0-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 164.4 kB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bbd62e5ad336663b00802540dd9e5801e8274664100e2819900128c19066014 |
|
MD5 | 6e5c470b63046bb02ee656105fabbd46 |
|
BLAKE2b-256 | 169a0e04e4094baa6b0f970c06dce67650c55547fa72d8a89978cb933f0ae554 |
File details
Details for the file pyqasm-0.1.0a0-cp310-cp310-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: pyqasm-0.1.0a0-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 171.1 kB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7789473654398e2a48ca0e3b6e1c34c0de60db44f9269a3b4f704a0c48bb61ba |
|
MD5 | f0459277f149e5144ab3bb2628cd5758 |
|
BLAKE2b-256 | d6b10d81b1a7636671e9932917eaa164f6b98e2c6f8471acda29822d827faa9a |