Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/0.5.0 #61

Merged
merged 27 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
8632503
Merge pull request #40 from CQCL/main
PabloAndresCQ Oct 26, 2023
51a8908
Docs/update menu links (#45)
cqc-melf Nov 22, 2023
439f375
update dependebot and clean up links (#46)
cqc-melf Nov 23, 2023
7b59448
Bump actions/upload-pages-artifact from 1 to 2 (#47)
dependabot[bot] Nov 23, 2023
d76394a
Bump actions/checkout from 3 to 4 (#48)
dependabot[bot] Nov 23, 2023
4956608
Bump the python-packages group with 2 updates (#49)
dependabot[bot] Nov 23, 2023
4069615
Bump actions/deploy-pages from 2 to 3
dependabot[bot] Dec 5, 2023
19a563b
Bump actions/setup-python from 4 to 5
dependabot[bot] Dec 7, 2023
18a63f4
Merge pull request #51 from CQCL/dependabot/github_actions/actions/de…
PabloAndresCQ Dec 8, 2023
a4c012a
Merge pull request #52 from CQCL/dependabot/github_actions/actions/se…
PabloAndresCQ Dec 8, 2023
0e744ed
Bump the python-packages group with 1 update
dependabot[bot] Dec 13, 2023
ed538df
Bump actions/download-artifact from 3 to 4
dependabot[bot] Dec 15, 2023
8a9e26a
Bump actions/upload-artifact from 3 to 4
dependabot[bot] Dec 15, 2023
6ad3a15
update github actions
cqc-melf Dec 15, 2023
8ba4d31
add PR template
cqc-melf Dec 15, 2023
940c8f8
Merge pull request #53 from CQCL/dependabot/pip/python-packages-27a10…
PabloAndresCQ Dec 15, 2023
8e803eb
Merge pull request #54 from CQCL/dependabot/github_actions/actions/do…
PabloAndresCQ Dec 15, 2023
f979116
Merge pull request #55 from CQCL/dependabot/github_actions/actions/up…
PabloAndresCQ Dec 15, 2023
29929ff
Merge pull request #56 from CQCL/update/pr-and-actions
PabloAndresCQ Dec 15, 2023
20463e2
Bump actions/deploy-pages from 3 to 4
dependabot[bot] Dec 20, 2023
4aa00b0
Bump actions/upload-pages-artifact from 2 to 3
dependabot[bot] Dec 20, 2023
56b7093
Merge pull request #57 from CQCL/dependabot/github_actions/actions/de…
PabloAndresCQ Dec 20, 2023
6eae2f5
Merge pull request #58 from CQCL/dependabot/github_actions/actions/up…
PabloAndresCQ Dec 20, 2023
32a930a
Refactor/discarded weight cutoff (#42)
PabloAndresCQ Dec 20, 2023
89ac6d0
Update README to fix broken links (#43)
PabloAndresCQ Dec 20, 2023
46e6b3b
Updating pytket requirement to 1.22
PabloAndresCQ Dec 20, 2023
82da301
Updated metadata to 0.5.0 and changelog
PabloAndresCQ Dec 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: pip
directory: "/"
schedule:
interval: "daily"
groups:
python-packages:
patterns:
- "*"
15 changes: 15 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Description

Please summarise the changes.

# Related issues

Please mention any github issues addressed by this PR.

# Checklist

- [ ] I have performed a self-review of my code.
- [ ] I have commented hard-to-understand parts of my code.
- [ ] I have made corresponding changes to the public API documentation.
- [ ] I have added tests that prove my fix is effective or that my feature works.
- [ ] I have updated the changelog with any user-facing changes.
20 changes: 10 additions & 10 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ jobs:
os: ['ubuntu-22.04', 'macos-12']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* +refs/heads/*:refs/remotes/origin/*
- name: Set up Python 3.9
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Build and mypy (3.9)
Expand All @@ -42,7 +42,7 @@ jobs:
./.github/workflows/build-test mypy
- name: Set up Python 3.10
if: github.event_name == 'push' || github.event_name == 'pull_request' || github.event_name == 'release' || github.event_name == 'schedule'
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Build (3.10)
Expand All @@ -51,7 +51,7 @@ jobs:
run: |
chmod +x ./.github/workflows/build-test
./.github/workflows/build-test nomypy
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: github.event_name == 'release' || contains(github.ref, 'refs/heads/wheel')
with:
name: artefacts
Expand All @@ -74,7 +74,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Download all wheels
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: wheelhouse
- name: Put them all in the dist folder
Expand All @@ -94,15 +94,15 @@ jobs:
needs: publish_to_pypi
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Set up Python 3.10
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Download all wheels
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: wheelhouse
- name: Install pip, wheel
Expand All @@ -119,7 +119,7 @@ jobs:
mkdir extensions
./build-docs -d ${GITHUB_WORKSPACE}/.github/workflows/docs/extensions/api
- name: Upload docs as artefact
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v3
with:
path: .github/workflows/docs/extensions

Expand All @@ -137,4 +137,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4
6 changes: 3 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
name: build docs
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Upgrade pip and install wheel
Expand All @@ -30,7 +30,7 @@ jobs:
cd .github/workflows/docs
mkdir extensions
./build-docs -d ${GITHUB_WORKSPACE}/.github/workflows/docs/extensions
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: pytket-extension-docs
path: .github/workflows/docs/extensions/
14 changes: 10 additions & 4 deletions .github/workflows/docs/build-docs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ import sys

DOCS_DIR = Path(sys.argv[0]).absolute().parent
MODULES_DIR = DOCS_DIR.parent.parent.parent
PYTKET_DOCS_LINK = "https://cqcl.github.io/tket/pytket/api/index.html"
PYTKET_EX_DOCS_LINK = "https://cqcl.github.io/pytket-extensions/api/index.html"
TKET_EXAMPLES_LINK = "https://tket.quantinuum.com/examples/"
TKET_MANUAL_LINK = "https://tket.quantinuum.com/user-manual/"
TKET_WEBSITE_LINK = "https://tket.quantinuum.com/"
PYTKET_DOCS_LINK = "https://tket.quantinuum.com/api-docs/"
PYTKET_EX_DOCS_LINK = "https://tket.quantinuum.com/api-docs/extensions.html"
PYTKET_QULACS_PYPI_LINK = "https://pypi.org/project/pytket-cutensornet/"
PYTKET_QULACS_GITHUB = "https://github.com/CQCL/pytket-cutensornet"
MODULE = "cutensornet"
Expand Down Expand Up @@ -49,10 +52,13 @@ def build_module_docs():
with open(mod_docs / "intro.txt", "r") as f:
content = f.readlines()
content.append(
"\n.. toctree::\n\t:caption: More documentation:\n\t:maxdepth: 1\n\n"
"\n.. toctree::\n\t:caption: pytket documentation:\n\t:maxdepth: 1\n\n"
)
content.append(f"\tpytket <{PYTKET_DOCS_LINK}>\n")
content.append(f"\tpytket API docs <{PYTKET_DOCS_LINK}>\n")
content.append(f"\tpytket extensions <{PYTKET_EX_DOCS_LINK}>\n")
content.append(f"\tManual <{TKET_MANUAL_LINK}>\n")
content.append(f"\tExample notebooks <{TKET_EXAMPLES_LINK}>\n")
content.append(f"\tTKET website <{TKET_WEBSITE_LINK}>\n")
content.append(
"\n.. toctree::\n\t:caption: Links:\n\t:maxdepth: 1\n\n"
)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

# -- Extension configuration -------------------------------------------------

pytketdoc_base = "https://cqcl.github.io/tket/pytket/api/"
pytketdoc_base = "https://tket.quantinuum.com/api-docs/"

intersphinx_mapping = {
"python": ("https://docs.python.org/3/", None),
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.x
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Update pip
Expand Down
26 changes: 12 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
# Pytket Extensions

This repository contains the pytket-cutensornet extension, using Quantinuum's
[pytket](https://cqcl.github.io/tket/pytket/api/index.html) quantum SDK.

# pytket-cutensornet

[Pytket](https://cqcl.github.io/tket/pytket/api/index.html) is a python module for interfacing
with tket, a quantum computing toolkit and optimisation compiler developed by Quantinuum.
[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/cutensornet/index.html) is a
[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/index.html) SDK -
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.
Expand All @@ -21,21 +16,24 @@ 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/python/index.html).
[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.

## Getting started

`pytket-cutensornet` is available for Python 3.9, 3.10 and 3.11 on Linux.
In order to use it, you need access to a Linux machine with either `Volta`, `Ampere`
or `Hopper` GPU and first install `cuQuantum Python` following their installation
[instructions](https://docs.nvidia.com/cuda/cuquantum/python/README.html#installation).
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/python/README.html#installation).
This will include the necessary dependencies such as CUDA toolkit. Then, to install
`pytket-cutensornet`, run:

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

## Bugs, support and feature requests

Expand Down
2 changes: 1 addition & 1 deletion _metadata.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__extension_version__ = "0.4.0"
__extension_version__ = "0.5.0"
__extension_name__ = "pytket-cutensornet"
5 changes: 5 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
~~~~~~~~~

0.5.0 (December 2023)
---------------------

* ``MPS`` simulation with fixed ``truncation_fidelity`` now uses the corresponding truncation primitive from cuQuantum (v23.10).

0.4.0 (October 2023)
--------------------

Expand Down
2 changes: 1 addition & 1 deletion examples/mps_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"source": [
"# Introduction\n",
"\n",
"This notebook provides examples of the usage of the MPS functionalities of `pytket_cutensornet`. For more information, see the docs at https://cqcl.github.io/pytket-cutensornet/api/index.html.\n",
"This notebook provides examples of the usage of the MPS functionalities of `pytket_cutensornet`. For more information, see the docs at https://tket.quantinuum.com/extensions/pytket-cutensornet/api/index.html.\n",
"\n",
"A Matrix Product State (MPS) represents a state on `n` qubits as a list of `n` tensors connected in a line as show below:\n",
"\n",
Expand Down
4 changes: 2 additions & 2 deletions lint-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
black~=22.3
pylint~=2.13,!=2.13.6
black~=23.12
pylint~=3.0
Loading