Skip to main content

Importer for parsing OpenQASM 2 strings into Qiskit circuits

Project description

Importer from OpenQASM 2 to Qiskit

LicenseReleaseDownloads

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qiskit_qasm2-0.1.0.tar.gz (39.7 kB view hashes)

Uploaded Source

Built Distributions

qiskit_qasm2-0.1.0-cp311-cp311-win_amd64.whl (243.1 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

qiskit_qasm2-0.1.0-cp311-cp311-win32.whl (230.2 kB view hashes)

Uploaded CPython 3.11 Windows x86

qiskit_qasm2-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (682.0 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

qiskit_qasm2-0.1.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (710.9 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

qiskit_qasm2-0.1.0-cp311-cp311-macosx_10_9_x86_64.whl (347.4 kB view hashes)

Uploaded CPython 3.11 macOS 10.9+ x86-64

qiskit_qasm2-0.1.0-cp310-cp310-win_amd64.whl (243.1 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

qiskit_qasm2-0.1.0-cp310-cp310-win32.whl (230.2 kB view hashes)

Uploaded CPython 3.10 Windows x86

qiskit_qasm2-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (682.0 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

qiskit_qasm2-0.1.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (710.9 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

qiskit_qasm2-0.1.0-cp310-cp310-macosx_10_9_x86_64.whl (347.4 kB view hashes)

Uploaded CPython 3.10 macOS 10.9+ x86-64

qiskit_qasm2-0.1.0-cp39-cp39-win_amd64.whl (243.3 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

qiskit_qasm2-0.1.0-cp39-cp39-win32.whl (230.5 kB view hashes)

Uploaded CPython 3.9 Windows x86

qiskit_qasm2-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (682.4 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

qiskit_qasm2-0.1.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (711.3 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

qiskit_qasm2-0.1.0-cp39-cp39-macosx_10_9_x86_64.whl (347.8 kB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

qiskit_qasm2-0.1.0-cp38-cp38-win_amd64.whl (243.7 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

qiskit_qasm2-0.1.0-cp38-cp38-win32.whl (230.8 kB view hashes)

Uploaded CPython 3.8 Windows x86

qiskit_qasm2-0.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (682.6 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

qiskit_qasm2-0.1.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (711.6 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

qiskit_qasm2-0.1.0-cp38-cp38-macosx_10_9_x86_64.whl (348.0 kB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page