Skip to main content

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

If you also want to run NetQASM applications on an actual simulator, you may install squidasm, with:

pip install squidasm --extra-index-url=https://pypi.netsquid.org

which whill prompt for your NetSquid username and password.

From source

Clone this repository and create an editable install with:

pip install -e .

Additionally you may want to install the dev dependencies in order to run the tests and linter:

pip install -e .[dev]

The squidasm simulator can also be installed, with:

pip install -e .[squidasm] --extra-index-url=https://pypi.netsquid.org

Alternatively, you can use the make install and make install-dev Makefile commands. For also installing squidasm, use make install-squidasm. This requires you to have the NETSQUIDPYPI_USER and NETSQUIDPYPI_PWD environment variables set to your NetSquid username and password respectively.

To verify the installation and run all tests and examples:

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)

Metadata

Release files for netqasm 0.11.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for netqasm 0.11.4
File Size Uploaded Provenance
netqasm-0.11.4.tar.gz 207.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for netqasm 0.11.4
File Interpreter ABI Platform
netqasm-0.11.4-py3-none-any.whl Python 3 none any Details

Total release size: 409.5 kB

Release files / netqasm-0.11.4.tar.gz

Download URL netqasm-0.11.4.tar.gz
Size 207.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c45b5f1fb4919d0c029496a29bcc571de9602c82632a05e5e1fa997584472d9c
BLAKE2b-256 checksum
How to use checksums
24bf68093f6fa3afee1deca039f4d2050ea22477bcd4c33a7d26845d6c428a5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / netqasm-0.11.4-py3-none-any.whl

Download URL netqasm-0.11.4-py3-none-any.whl
Size 201.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
57e50d6b994cc15a3fc7dc712d10b8472acf6cea0df07c696e5b7224681cd8f9
BLAKE2b-256 checksum
How to use checksums
07a574c54bd50fdf116fc6a889308d421ba0541f1ea8d064da0fbd0c856fec6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Security for netqasm 0.11.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.11.4 This release

2 release files No provenance

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