Skip to content

Interpreter for OpenQasm programming language

License

Notifications You must be signed in to change notification settings

mentesniker/OpenQasmInterpreter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Interpreter for OpenQasm programming language

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages