Skip to main content

OpenQasmInterpreter (oqi)

This package interprets a .qasm 2.0 file and then outputs the results to the console. All of the executions are made using the qasm simulator. Moreover you can specify different options to run your circuit.

To just run your .qasm file you'll have to run:

oqi filename

Additionally if you want to see and run your circuit you can execute:

oqi filename d

Finally if you want to run your circuit n number of times you can specify the repetitions:

oqi filename d n

or

oqi filename n

In any case the output will include something of the form:

The results are: {'bits': numberOfMeasurements, ...}

Installation

Install it with the pip package manager:

pip install oqi

Features

Custom errors:

image

Draw and run your circuits:

image

Acknowledgements

The token analyser and many other things needed in order to run the interpreter came from the qiskit repo. My contribution was to create the pip package and some wrapping in order to run their interpreter.

v1.0.0

* oqi now has the functionality to draw and run circuits especified in a .qasm file

v1.0.1

* Removed unused imports

v1.0.2

* Added config to run from command line

v1.0.3

* Added qiskit requirement due to compatibility problems

v1.0.4

* Removed qiskit requirement due to compatibility problems

Download files

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

Source Distribution

oqi-1.0.4.tar.gz (2.6 kB view details)

Uploaded Source

File details

Details for the file oqi-1.0.4.tar.gz.

File metadata

  • Download URL: oqi-1.0.4.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.10

File hashes

Hashes for oqi-1.0.4.tar.gz
Algorithm Hash digest
SHA256 d53658e295aa6e401f024ac5437a4f3a9271c98b1810a7c4c31cd18e600fb23f
MD5 f5cdcbe88df19d4ce6e847e484f98563
BLAKE2b-256 69be269f2a89e3b633d5eb793627ccae382fe8963f8c837fb644ca357a31fe2a

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.5

1 file

This release

1.0.4 This release

1 file

1.0.3

2 files

1.0.2

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page