Skip to main content

Tool for parsing, encoding, decoding and executing NetQASM applications

Project description

NetQASM

Documentation

Utilities for writing, compiling, and running quantum network applications.

Intro

NetQASM is an instruction set architecture that allows one to interface with quantum network controllers and run applications on a quantum network. Applications may be written directly in the NetQASM language, which resembles assembly code. However, this package also provides an SDK which allows writing application code in Python. For the paper introducing NetQASM, see here.

Applications written with this SDK may be run on a simulator backend, like SquidASM or SimulaQron. In the future, these same applications may be run on a hardware backend consisting of real implementations of quantum network controllers.

This NetQASM Python library is used by the QNE ADK, which allows interaction with the Quantum Network Explorer. When developing applications specifically for the QNE platform, it is recommended to use the QNE ADK. For more generic application development, this NetQASM package can be used directly.

Prerequisites

This package has only been tested on Linux, specifically Ubuntu. On Windows, WSL may be used.

Installation

From PyPI

NetQASM is available as a package on PyPI and can be installed with

pip install netqasm

From source

Clone this repository run the install script:

git clone https://github.com/QuTech-Delft/netqasm
cd netqasm
make install

To verify the installation:

make verify

Documentation

The documentation is hosted on Read the Docs.

The documentation source lives in the docs directory. See the docs README for information about building and rendering docs.

Examples

Example applications can be found in netqasm/examples.

Applications can be run in two ways:

  • From the command line, using netqasm simulate. This requires the application code to be organized in a directory with a specific format (see the Application file structure page in the docs).
  • By running a Python script that contains code to start the application.

Examples of applications organized in a directory can be found in netqasm/examples/apps and netqasm/examples/qne_apps. They can be run on a simulator using

netqasm simulate --app-dir netqasm/examples/<app>

Examples of Python scripts that can run applications can be found in netqasm/examples/sdk_scripts. These files can be run directly using python <filename>.

netqasm/examples/sdk_compilation contains SDK scripts that use a debug backend. Running these files does not involve an actual simulation of the application code but can be used to see the NetQASM subroutines that are compiled from the Python application code.

For more information, check the documentation.

CLI

Once installed, netqasm can be used as a command-line interface (CLI) to perform various operations.

See netqasm --help and netqasm <command> --help for the options.

For example, you can use the --simulator=<simulator> to specify which simulator to use. Currently there is support for:

We note that SquidASM is the recommended (and also default) simulator since it is generally faster than SimulaQron and can also simulate noise much more accurately.

License and patent

A patent application (NL 2029673) has been filed which covers parts of the software in this repository. We allow for non-commercial and academic use but if you want to explore a commercial market, please contact us for a license agreement.

Development

For code formatting, black and isort are used. Type hints should be added as much as possible. Types are checked using mypy.

Before code is pushed, make sure that the make lint command succeeds, which runs black, isort, flake8 and mypy.

Contributors

In alphabetical order:

  • Axel Dahlberg
  • Carlo Delle Donne
  • Wojciech Kozlowski
  • Martijn Papendrecht
  • Ingmar te Raa
  • Bart van der Vecht (b.vandervecht[at]tudelft.nl)

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

netqasm-0.11.0a1.tar.gz (206.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

netqasm-0.11.0a1-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file netqasm-0.11.0a1.tar.gz.

File metadata

  • Download URL: netqasm-0.11.0a1.tar.gz
  • Upload date:
  • Size: 206.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for netqasm-0.11.0a1.tar.gz
Algorithm Hash digest
SHA256 a1a964e94d2a3dc03ee65bd406e4a0751cf7763b1ac61572484255f403371a8f
MD5 bce7cb7db3cbec4a16339e038abdb96b
BLAKE2b-256 5cf3515ee3e619e5205c2989b2483c141543051dbd127e514b55b49d8bdebcc8

See more details on using hashes here.

File details

Details for the file netqasm-0.11.0a1-py3-none-any.whl.

File metadata

  • Download URL: netqasm-0.11.0a1-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for netqasm-0.11.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 9480acb337a2a6dc4cf46830f424b6e5cded1531a5f8a8ffd9571955a973cc30
MD5 f7b1db9092392895d8b61395041a0c60
BLAKE2b-256 cb67bc3c2d5044573487355320188d509fd19209745d75c95156e0db0f8732f3

See more details on using hashes here.

Supported by

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