pytket-cutensornet


Namepytket-cutensornet JSON
Version 0.9.0 PyPI version JSON
download
home_pageNone
SummaryExtension for pytket, providing access to the cuTensorNet Python API.
upload_time2024-10-04 08:18:28
maintainerNone
docs_urlNone
authorTKET development team
requires_python>=3.10
licenseApache 2
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pytket-cutensornet

[![Slack](https://img.shields.io/badge/Slack-4A154B?style=for-the-badge&logo=slack&logoColor=white)](https://tketusers.slack.com/join/shared_invite/zt-18qmsamj9-UqQFVdkRzxnXCcKtcarLRA#)
[![Stack Exchange](https://img.shields.io/badge/StackExchange-%23ffffff.svg?style=for-the-badge&logo=StackExchange)](https://quantumcomputing.stackexchange.com/tags/pytket)

[Pytket](https://tket.quantinuum.com/api-docs/index.html) is a python module for interfacing
with tket, a quantum computing toolkit and optimising compiler developed by Quantinuum.

[cuTensorNet](https://docs.nvidia.com/cuda/cuquantum/latest/cutensornet/index.html) is a
high-performance library for tensor network computations, developed by NVIDIA.
It is part of the [cuQuantum](https://docs.nvidia.com/cuda/cuquantum/latest/index.html) SDK -
a high-performance library aimed at quantum circuit simulations on the NVIDIA GPU chips,
consisting of two major components:
 - `cuStateVec`: a high-performance library for state vector computations.
 - `cuTensorNet`: a high-performance library for tensor network computations.

Both components have both C and Python API.

`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](https://docs.nvidia.com/cuda/cuquantum/latest/cutensornet/index.html).

Currently, only single-GPU calculations are supported, but a multi-GPU execution will be
implemented in the due course using `mpi4py` library.

Some useful links:
- [API Documentation](https://tket.quantinuum.com/extensions/pytket-cutensornet/)

## 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 with an NVIDIA GPU of
Compute Capability +7.0 (check it [here](https://developer.nvidia.com/cuda-gpus)) and first
install `cuQuantum Python` following their installation
[instructions](https://docs.nvidia.com/cuda/cuquantum/latest/getting-started/index.html).
This will include the necessary dependencies such as CUDA toolkit. Then, to install
`pytket-cutensornet`, run:

```shell
pip install pytket-cutensornet
```

## Bugs, support and feature requests

Please file bugs and feature requests on the Github
[issue tracker](https://github.com/CQCL/pytket-cuquantum/issues).

## Development

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

```shell
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](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html) for
reference.

#### Formatting

All code should be formatted using
[black](https://black.readthedocs.io/en/stable/), with default options. This is
checked on the CI. The CI is currently using version 22.12.0. You can install it
(as well as pylint as described below) by running from the root package folder:

```shell
pip install -r lint-requirements.txt
```

#### Type annotation

On the CI, [mypy](https://mypy.readthedocs.io/en/stable/) 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:

```shell
./mypy-check ./
```
The script requires `mypy` 0.800 or above.

#### Linting

We use [pylint](https://pypi.org/project/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:

1. `cd` into that module's `tests` directory;
2. ensure you have installed `pytest` and any other modules listed in
the `test-requirements.txt` file (all via `pip`);
3. run `pytest`.

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

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pytket-cutensornet",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": null,
    "author": "TKET development team",
    "author_email": "tket-support@quantinuum.com",
    "download_url": null,
    "platform": null,
    "description": "# pytket-cutensornet\n\n[![Slack](https://img.shields.io/badge/Slack-4A154B?style=for-the-badge&logo=slack&logoColor=white)](https://tketusers.slack.com/join/shared_invite/zt-18qmsamj9-UqQFVdkRzxnXCcKtcarLRA#)\n[![Stack Exchange](https://img.shields.io/badge/StackExchange-%23ffffff.svg?style=for-the-badge&logo=StackExchange)](https://quantumcomputing.stackexchange.com/tags/pytket)\n\n[Pytket](https://tket.quantinuum.com/api-docs/index.html) is a python module for interfacing\nwith tket, a quantum computing toolkit and optimising compiler developed by Quantinuum.\n\n[cuTensorNet](https://docs.nvidia.com/cuda/cuquantum/latest/cutensornet/index.html) is a\nhigh-performance library for tensor network computations, developed by NVIDIA.\nIt is part of the [cuQuantum](https://docs.nvidia.com/cuda/cuquantum/latest/index.html) SDK -\na high-performance library aimed at quantum circuit simulations on the NVIDIA GPU chips,\nconsisting of two major components:\n - `cuStateVec`: a high-performance library for state vector computations.\n - `cuTensorNet`: a high-performance library for tensor network computations.\n\nBoth components have both C and Python API.\n\n`pytket-cutensornet` is an extension to `pytket` that allows `pytket` circuits and\nexpectation values to be simulated using `cuTensorNet` via an interface to\n[cuQuantum Python](https://docs.nvidia.com/cuda/cuquantum/latest/cutensornet/index.html).\n\nCurrently, only single-GPU calculations are supported, but a multi-GPU execution will be\nimplemented in the due course using `mpi4py` library.\n\nSome useful links:\n- [API Documentation](https://tket.quantinuum.com/extensions/pytket-cutensornet/)\n\n## Getting started\n\n`pytket-cutensornet` is available for Python 3.10, 3.11 and 3.12 on Linux.\nIn order to use it, you need access to a Linux machine with an NVIDIA GPU of\nCompute Capability +7.0 (check it [here](https://developer.nvidia.com/cuda-gpus)) and first\ninstall `cuQuantum Python` following their installation\n[instructions](https://docs.nvidia.com/cuda/cuquantum/latest/getting-started/index.html).\nThis will include the necessary dependencies such as CUDA toolkit. Then, to install\n`pytket-cutensornet`, run:\n\n```shell\npip install pytket-cutensornet\n```\n\n## Bugs, support and feature requests\n\nPlease file bugs and feature requests on the Github\n[issue tracker](https://github.com/CQCL/pytket-cuquantum/issues).\n\n## Development\n\nTo install an extension in editable mode, from its root folder run:\n\n```shell\npip install -e .\n```\n\n## Contributing\n\nPull requests are welcome. To make a PR, first fork the repo, make your proposed\nchanges on the `main` branch, and open a PR from your fork. If it passes\ntests and is accepted after review, it will be merged in.\n\n### Code style\n\n#### Docstrings\n\nWe use the Google style docstrings, please see this \n[page](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html) for\nreference.\n\n#### Formatting\n\nAll code should be formatted using\n[black](https://black.readthedocs.io/en/stable/), with default options. This is\nchecked on the CI. The CI is currently using version 22.12.0. You can install it\n(as well as pylint as described below) by running from the root package folder:\n\n```shell\npip install -r lint-requirements.txt\n```\n\n#### Type annotation\n\nOn the CI, [mypy](https://mypy.readthedocs.io/en/stable/) is used as a static\ntype checker and all submissions must pass its checks. You should therefore run\n`mypy` locally on any changed files before submitting a PR. Because of the way\nextension modules embed themselves into the `pytket` namespace this is a little\ncomplicated, but it should be sufficient to run the script `mypy-check`\nand passing as a single argument the root directory of the module to test. The directory\npath should end with a `/`. For example, to run mypy on all Python files in this\nrepository, when in the root folder, run:\n\n```shell\n./mypy-check ./\n```\nThe script requires `mypy` 0.800 or above.\n\n#### Linting\n\nWe use [pylint](https://pypi.org/project/pylint/) on the CI to check compliance\nwith a set of style requirements (listed in `.pylintrc`). You should run\n`pylint` over any changed files before submitting a PR, to catch any issues.\n\n### Tests\n\nTo run the tests for a module:\n\n1. `cd` into that module's `tests` directory;\n2. ensure you have installed `pytest` and any other modules listed in\nthe `test-requirements.txt` file (all via `pip`);\n3. run `pytest`.\n\nWhen adding a new feature, please add a test for it. When fixing a bug, please\nadd a test that demonstrates the fix.\n",
    "bugtrack_url": null,
    "license": "Apache 2",
    "summary": "Extension for pytket, providing access to the cuTensorNet Python API.",
    "version": "0.9.0",
    "project_urls": {
        "Documentation": "https://tket.quantinuum.com/extensions/pytket-cutensornet/index.html",
        "Source": "https://github.com/CQCL/pytket-cutensornet",
        "Tracker": "https://github.com/CQCL/pytket-cutensornet/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d5c649a5774a39ae542ca0d4181e07f427e0d054453c5c4609f99be02415eee1",
                "md5": "f773f096f14872ca75eb8c5c1ec9d454",
                "sha256": "31334fae975354e31b0dbae674d234d866ec1541cb20df0a97108edcb1e80426"
            },
            "downloads": -1,
            "filename": "pytket_cutensornet-0.9.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f773f096f14872ca75eb8c5c1ec9d454",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 83927,
            "upload_time": "2024-10-04T08:18:28",
            "upload_time_iso_8601": "2024-10-04T08:18:28.087190Z",
            "url": "https://files.pythonhosted.org/packages/d5/c6/49a5774a39ae542ca0d4181e07f427e0d054453c5c4609f99be02415eee1/pytket_cutensornet-0.9.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-04 08:18:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "CQCL",
    "github_project": "pytket-cutensornet",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pytket-cutensornet"
}
        
Elapsed time: 0.28155s