Importer for parsing OpenQASM 2 strings into Qiskit circuits
Project description
Importer from OpenQASM 2 to Qiskit
This repository provides the Python package qiskit_qasm2
, which provides a
fast parser of OpenQASM 2 into Qiskit's QuantumCircuit
.
This package was mostly an excuse for me to learn a bit more about how lexers are written at a low level. This is why the Rust crate doesn't use any lexer-generation libraries.
Installation
Install the latest release of the qiskit_qasm2
package from pip:
pip install qiskit_qasm2
Developing
If you're looking to contribute to this project, please first read our contributing guidelines.
Set up your development environment by installing the development requirements with pip:
pip install -r requirements-dev.txt tox
This installs a few more packages than the dependencies of the package at
runtime, because there are some tools we use for testing also included, such as
tox
and pytest
.
After the development requirements are installed, you can install an editable version of the package with
pip install -e .
After this, any changes you make to the library code will immediately be present when you open a new Python interpreter session.
Building documentation
After the development requirements have been installed, the command
tox -e docs
will build the HTML documentation, and place it in docs/_build/html
. The
documentation state of the main
branch of this repository is published to
https://jakelishman.github.io/qiskit-qasm2.
Code style and linting
The Python components of this repository are formatted using black
. You can
run this on the required files by running
tox -e black
The full lint suite can be run with
tox -e lint
License
This project is licensed under version 2.0 of the Apache 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
Hashes for qiskit_qasm2-0.1.0-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8506cd7bdaa8e0e04cce3c2b3894283342def92cba64177296306b0966eab718 |
|
MD5 | 7e2b2f0a880011d6c98649887c9386c5 |
|
BLAKE2b-256 | 9b2ab98eb005b969009221d98ef8ffa96502dc3a3306b7c0a9a1886dfe7f248a |
Hashes for qiskit_qasm2-0.1.0-cp311-cp311-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c082e58889ba36888722957d646dd5a13a92ca78691f4f0082f28ed1625e6b0 |
|
MD5 | 9bf216e2fc850c646b5bf465c7ff6e74 |
|
BLAKE2b-256 | 768d668600706a3dc8a953b3bad908e8c6509904b16d8952cf0fb8d2471b99c3 |
Hashes for qiskit_qasm2-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04914ee21fb6eda283d0498db5f2b7a0cb95ab6a475bfbdb57ce0752941529d3 |
|
MD5 | 221872f055babfe05296bd02baece647 |
|
BLAKE2b-256 | e5565ad934b3fb40c2c8eea309e40555388c1317f2c0836baa122755ec3c34e3 |
Hashes for qiskit_qasm2-0.1.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 311d2b069ecbc3f3db581fa8caa055f305c44cf3582461790c9c1a98740ea1e3 |
|
MD5 | 86649f4cee646b94a005af677e2cbcf5 |
|
BLAKE2b-256 | 0775e174b724a6ad5de737c0a5fcefdb124857123f8581ad4a16d389e42015d5 |
Hashes for qiskit_qasm2-0.1.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33ba70dbc5998c800a01fdd25e1b249ab7f337c39c69392e506a62996e740929 |
|
MD5 | 1a9cef1e3134561e46bd316beac63a86 |
|
BLAKE2b-256 | bb8bc82cc04a178067d41969df49beba99506f7c271a351a8b2358c2c3fdba48 |
Hashes for qiskit_qasm2-0.1.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e34729694954cbdb28e4dc87c981d0fe05c4d1f11767c9c236653830e1a5d72a |
|
MD5 | f3f9e7333523efd0cc4c5857b4f3fbd5 |
|
BLAKE2b-256 | 09a0a85f93e0ac15561366f76bd1e14649b96334e555c5d2ddf8d3bd04253537 |
Hashes for qiskit_qasm2-0.1.0-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b2fcfbe76f1e1dccc25d20349d1ebf361c8df366a84238ef91facba45ef21b8 |
|
MD5 | 53c2205398cf5e4d5e11c5ac2095a99e |
|
BLAKE2b-256 | 4b6a267d18925efde93c9722a4cc16d6157357e451ccf1f47e9ab8786a0f3dcd |
Hashes for qiskit_qasm2-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35d2ede11d250ef5fc1fb64e1c4e04ac5cb42a226318400c3ffac3fcdb36088d |
|
MD5 | 418bd58df7697d3a94a3b00bcd9308aa |
|
BLAKE2b-256 | 7e7ebe4781a297aa86bab1847de50b7b8578bb730f7466e7ba001315cfe7e7dc |
Hashes for qiskit_qasm2-0.1.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb22bd4114f937ca9e12607d639657fb402b1bef493faa3584a839242f05b53d |
|
MD5 | 0815b4d9012ae9d758f904d1f90fa591 |
|
BLAKE2b-256 | 75f02969860212f7f975ce789fea3e9f515e48480cb0ed722263ec828857c413 |
Hashes for qiskit_qasm2-0.1.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14ca09161d9f9837bc93a12dfd967a3f23224ebc740993ed2c3f8b86d7190f95 |
|
MD5 | 6d4f64aa18891390c24d74e9f3ff64f8 |
|
BLAKE2b-256 | 9d9e153f56b530e761bb0a48d0166f1f8f4412c49563849feb8bf99b1b1ff82f |
Hashes for qiskit_qasm2-0.1.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f409c3d62a08ea26f4bff96065eff6f6479d8436a7bab43225d78510db1beef9 |
|
MD5 | f4276fb30d403087f3e4a0ef6e0e96c3 |
|
BLAKE2b-256 | ef24dd2de3a7926d570d1bac0989a9269d6ce728640de34c48c9afded262b67a |
Hashes for qiskit_qasm2-0.1.0-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 509fd1e09fe6fb8be0abf9a6c6bc9a7c2cc7698d82f82d343ae629ce3d2c0dd7 |
|
MD5 | 8cb998177072268c3e0af29355cb340c |
|
BLAKE2b-256 | cd83aa078d23c1b6e80046593db15a28194f38a44de416326f4600b8791ab6d5 |
Hashes for qiskit_qasm2-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c46c55d1e836ca6f0df146af3f481fde81ab81b1ed023ad3664ae472f6982f1c |
|
MD5 | 6d349ac88bedc0b4e0e2b87506511254 |
|
BLAKE2b-256 | a1ad71181901bb440a2ffc35dc2eab98f17b9ef4d91ae39f75673a669a5b04f3 |
Hashes for qiskit_qasm2-0.1.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1e41a1054eeb78720bf0b96cfae61489203da0ea27c9f335b6899a970bba4b8 |
|
MD5 | 9a5118c47eaee625827b312b6f220937 |
|
BLAKE2b-256 | bea377ccc81eb9dc22b7cf415d31fd5ee8b9bb5a058a7099da09febfb4f0d4dd |
Hashes for qiskit_qasm2-0.1.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b6a474e7fe7e0f9aa046ed56644006af86c33d5067e072f85ec7c6f185c4072 |
|
MD5 | e08b7f301b3749f2bd62c16f12f8713f |
|
BLAKE2b-256 | dca128b6ec0e18ca561148ec4e5a3122b08a9b7ba0e9b444d095ffeeccbd3177 |
Hashes for qiskit_qasm2-0.1.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdee728aef6d184651e2f0fd15c7bc95692628b21e615a3a0ab9a9197a26df22 |
|
MD5 | 465922c3512bc4dcae32d7382aeb8f84 |
|
BLAKE2b-256 | b121548dad919aacf21f6cf8e2c17f0faddd6d1c30f5bd99d20a2df0cd2a9f5c |
Hashes for qiskit_qasm2-0.1.0-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2561c4344e02c59b0e9381a1d09d851e3db77299be998a656e0b8d352a73d2f |
|
MD5 | 8fc7831b39241928938d8732a263bd55 |
|
BLAKE2b-256 | 1a9fd82ffebb046cf06fc41c32cdf987744b49f02c81a61ae797538f6d0daeae |
Hashes for qiskit_qasm2-0.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28e30d9706d9f54cc5b277919f7ab2412a481ef3ade606ba172bffb236c03c90 |
|
MD5 | d63e737ef06cbc2c0b1201c85aa2a67a |
|
BLAKE2b-256 | 1da158c18e45da28f12b7c8faed8dd62ac72f3f20b2e6832680be14ca8845245 |
Hashes for qiskit_qasm2-0.1.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a970548ba607c5cfb4d9084f4a1d9710c3d10fe144f5d280ac0faac0ebd6e7d2 |
|
MD5 | 3fec2d5f4809385f1dee0f9bda736b21 |
|
BLAKE2b-256 | 74a28702ae7cca4d50b8ece730d06fa0afd9c08b68e47eba2752df3c15128641 |
Hashes for qiskit_qasm2-0.1.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7834b0f31214bcf9ec0b8754898c896f5636550a39186eb5bee7ab9133014ffd |
|
MD5 | fa9ce3144147083e0945ed6b14f769da |
|
BLAKE2b-256 | 09eafd34d36d07cd2d02ac2e47999e72e2e9c2a2af96cf9c82acc40d362e0ca6 |