{"id":22882500,"url":"https://github.com/cqcl/pytket-cutensornet","last_synced_at":"2025-05-07T04:48:05.961Z","repository":{"id":172693020,"uuid":"631880620","full_name":"CQCL/pytket-cutensornet","owner":"CQCL","description":"cuTensorNet Python API extensions for pytket quantum SDK","archived":false,"fork":false,"pushed_at":"2025-04-25T13:01:35.000Z","size":3244,"stargazers_count":14,"open_issues_count":12,"forks_count":2,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-05-07T04:47:51.973Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CQCL.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-24T08:58:33.000Z","updated_at":"2025-04-02T12:06:43.000Z","dependencies_parsed_at":"2024-12-16T13:38:01.477Z","dependency_job_id":"06549fb9-b463-498b-a49c-49ccd86495bb","html_url":"https://github.com/CQCL/pytket-cutensornet","commit_stats":null,"previous_names":["cqcl/pytket-cutensornet"],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CQCL%2Fpytket-cutensornet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CQCL%2Fpytket-cutensornet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CQCL%2Fpytket-cutensornet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CQCL%2Fpytket-cutensornet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CQCL","download_url":"https://codeload.github.com/CQCL/pytket-cutensornet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252816522,"owners_count":21808702,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-13T18:18:01.636Z","updated_at":"2025-05-07T04:48:05.951Z","avatar_url":"https://github.com/CQCL.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pytket-cutensornet\n\n[![Slack](https://img.shields.io/badge/Slack-4A154B?style=for-the-badge\u0026logo=slack\u0026logoColor=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\u0026logo=StackExchange)](https://quantumcomputing.stackexchange.com/tags/pytket)\n\n[Pytket](https://docs.quantinuum.com/tket/api-docs/) 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 GPUs.\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\nSome useful links:\n- [API Documentation](https://docs.quantinuum.com/tket/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 (or WSL) with an NVIDIA GPU of\nCompute Capability +7.0 (check it [here](https://developer.nvidia.com/cuda-gpus)).\nYou will need to install `cuda-toolkit` and `cuquantum-python` before `pytket-cutensornet`;\nfor instance, in Ubuntu 24.04:\n\n```shell\nsudo apt install cuda-toolkit\npip install cuquantum-python\npip install pytket-cutensornet\n```\n\nAlternatively, you may install cuQuantum Python following their\n[instructions](https://docs.nvidia.com/cuda/cuquantum/latest/getting-started/index.html) using `conda-forge`.\nThis will include the necessary dependencies from CUDA toolkit. Then, you may install\n`pytket-cutensornet` using `pip`.\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\n```shell\npip install -r tests/test-requirements.txt\npytest tests/\n```\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcqcl%2Fpytket-cutensornet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcqcl%2Fpytket-cutensornet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcqcl%2Fpytket-cutensornet/lists"}