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.0.1.tar.gz (39.9 kB view details)

Uploaded Source

File details

Details for the file qiskit_qasm2-0.0.1.tar.gz.

File metadata

  • Download URL: qiskit_qasm2-0.0.1.tar.gz
  • Upload date:
  • Size: 39.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for qiskit_qasm2-0.0.1.tar.gz
Algorithm Hash digest
SHA256 bc9a0a7ed66d5a032a5258764d567da7ba5ec03c27bdf641f5dee3b85b3e04fe
MD5 dad9ccc946b7d8948378e9df14e8990a
BLAKE2b-256 3cd065485143f0c24db4bf9da50b7122c03b2ebc4c2f20af3284685d005ef69e

See more details on using hashes here.

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