Skip to main content

A parser for the Quipper ASCII quantum circuit output format.

Project description

Quippy is a parser for quantum circuit descriptions produces by Quipper. Specifically, Quipper can output an ASCII description of the circuit, which can then be parsed by Quippy.

Quippy provides a default parser in quippy.parser that will parse given text as:

import quippy
parsed:quippy.Start = quippy.parser().parse(text)

The parsed format uses an quippy.Start object to represent the Quipper circuit by default. This is a nice Object representation of the circuit the Abstract Syntax Tree is directly transformed to by quippy.transformer.QuipperTransformer. The resulting parsed object will have as type a Start object which will make the structure of the parse tree much clearer. If you do no wish to use the included transformer but would rather have a general AST then pass:

quippy.parser(transformer=None)

We use the optional static typing provided in PEP 484 to provide types for the returned objects, this was included in Python 3.5 or higher. Python 3.6 or higher is recommended.

Project details


Download files

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

Files for quippy, version 0.3.3
Filename, size File type Python version Upload date Hashes
Filename, size quippy-0.3.3-py2-none-any.whl (22.7 kB) File type Wheel Python version py2 Upload date Hashes View hashes
Filename, size quippy-0.3.3-py3-none-any.whl (22.7 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size quippy-0.3.3.tar.gz (24.8 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page