Skip to main content

pytket-cutensornet

Slack Stack Exchange

Pytket is a python module for interfacing with tket, a quantum computing toolkit and optimising compiler developed by Quantinuum.

cuTensorNet is a high-performance library for tensor network computations, developed by NVIDIA. It is part of the cuQuantum SDK - a high-performance library aimed at quantum circuit simulations on the NVIDIA GPUs.

pytket-cutensornet is an extension to pytket that allows pytket circuits and expectation values to be simulated using cuTensorNet via an interface to cuQuantum Python.

Some useful links:

Getting started

pytket-cutensornet is available for Python 3.10, 3.11 and 3.12 on Linux. In order to use it, you need access to a Linux machine (or WSL) with an NVIDIA GPU of Compute Capability +7.0 (check it here). You will need to install cuda-toolkit and cuquantum-python before pytket-cutensornet; for instance, in Ubuntu 24.04:

sudo apt install cuda-toolkit
pip install cuquantum-python
pip install pytket-cutensornet

Alternatively, you may install cuQuantum Python following their instructions using conda-forge. This will include the necessary dependencies from CUDA toolkit. Then, you may install pytket-cutensornet using pip.

Bugs, support and feature requests

Please file bugs and feature requests on the Github issue tracker.

Development

To install an extension in editable mode, from its root folder run:

pip install -e .

Contributing

Pull requests are welcome. To make a PR, first fork the repo, make your proposed changes on the main branch, and open a PR from your fork. If it passes tests and is accepted after review, it will be merged in.

Code style

Docstrings

We use the Google style docstrings, please see this page for reference.

Type annotation

On the CI, mypy is used as a static type checker and all submissions must pass its checks. You should therefore run mypy locally on any changed files before submitting a PR. Because of the way extension modules embed themselves into the pytket namespace this is a little complicated, but it should be sufficient to run the script mypy-check and passing as a single argument the root directory of the module to test. The directory path should end with a /. For example, to run mypy on all Python files in this repository, when in the root folder, run:

./mypy-check ./

The script requires mypy 0.800 or above.

Linting

We use pylint on the CI to check compliance with a set of style requirements (listed in .pylintrc). You should run pylint over any changed files before submitting a PR, to catch any issues.

Tests

To run the tests for a module:

pip install -r tests/test-requirements.txt
pytest tests/

When adding a new feature, please add a test for it. When fixing a bug, please add a test that demonstrates the fix.

Metadata

Release files for pytket-cutensornet 0.12.1

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

Built distribution (wheel)

Table of built distributions (wheels) for pytket-cutensornet 0.12.1
File Interpreter ABI Platform
pytket_cutensornet-0.12.1-py3-none-any.whl Python 3 none any Details

Release files / pytket_cutensornet-0.12.1-py3-none-any.whl

Download URL pytket_cutensornet-0.12.1-py3-none-any.whl
Size 90.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3376c0b737f8713f9e34d4b9e461aeff4c8e46a47b6214c63f9d0e62a277cbbb
BLAKE2b-256 checksum
How to use checksums
d6fd2159cd0f1aa74854926b381a512928bd2af79d430f989f4e781e24edd367
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.12.1 This release

1 release file

0.12.0

1 release file

0.11.1

1 release file

0.11.0

1 release file

0.10.2

1 release file

0.10.1

1 release file

0.10.0

1 release file

0.9.0

1 release file

0.8.0

1 release file

0.7.1

1 release file

0.7.0

1 release file

0.6.1

1 release file

0.6.0

1 release file

0.5.4

1 release file

0.5.3

1 release file

0.5.2

1 release file

0.4.0

1 release file

0.3.0

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.0

1 release file

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