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.6.0 #51

Merged
merged 13 commits into from
Mar 29, 2023
Merged
3 changes: 3 additions & 0 deletions .github/workflows/build-test
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ cd ${GITHUB_WORKSPACE}/tests

python -m pip install --pre -r test-requirements.txt

# update the pytket version to the lastest (pre) release
python -m pip install --upgrade --pre pytket~=1.0

pytest --doctest-modules

cd ..
Expand Down
48 changes: 26 additions & 22 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
branches:
- develop
- 'wheel/**'
- 'runci/**'
release:
types:
- created
Expand All @@ -35,7 +36,6 @@ jobs:
fetch-depth: '0'
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* +refs/heads/*:refs/remotes/origin/*
- name: Set up Python 3.9
if: github.event_name == 'pull_request' || github.event_name == 'release' || contains(github.ref, 'refs/heads/wheel') || github.event_name == 'schedule'
uses: actions/setup-python@v4
with:
python-version: '3.9'
Expand All @@ -46,7 +46,7 @@ jobs:
env:
PYTKET_RUN_REMOTE_TESTS: 1
- name: Build and test including remote checks (3.9) nomypy
if: (matrix.os != 'macos-12') && (github.event_name == 'pull_request' || github.event_name == 'release' || contains(github.ref, 'refs/heads/wheel') || github.event_name == 'schedule')
if: (matrix.os != 'macos-12') && (github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) || github.event_name == 'release' || github.event_name == 'schedule')
shell: bash
run: |
./.github/workflows/build-test nomypy
Expand Down Expand Up @@ -98,8 +98,8 @@ jobs:
password: ${{ secrets.PYPI_PYTKET_IQM_API_TOKEN }}
verbose: true

docs:
name: Build and publish docs
build_docs:
name: Build docs
if: github.event_name == 'release'
needs: publish_to_pypi
runs-on: ubuntu-22.04
Expand All @@ -117,7 +117,7 @@ jobs:
path: wheelhouse
- name: Install pip, wheel
run: pip install -U pip wheel
- name: Install extensions
- name: Install extension
run: for w in `find wheelhouse/ -type f -name "*.whl"` ; do pip install $w ; done
- name: Install docs dependencies
run: |
Expand All @@ -127,20 +127,24 @@ jobs:
run: |
cd .github/workflows/docs
mkdir extensions
./build-docs -d ${GITHUB_WORKSPACE}/.github/workflows/docs/extensions
- name: Configure git
run: |
git config --global user.email "tket-bot@cambridgequantum.com"
git config --global user.name "«$GITHUB_WORKFLOW» github action"
- name: Check out gh-pages branch
run: git checkout gh-pages
- name: Remove old docs
run: git rm -r --ignore-unmatch docs/api
- name: Add generated docs to repository
run: |
mkdir -p docs
mv .github/workflows/docs/extensions docs/api
git add -f docs/api
git commit --allow-empty -m "Add generated documentation."
- name: Publish docs
run: git push origin gh-pages:gh-pages
./build-docs -d ${GITHUB_WORKSPACE}/.github/workflows/docs/extensions/api
- name: Upload docs as artefact
uses: actions/upload-pages-artifact@v1
with:
path: .github/workflows/docs/extensions

publish_docs:
name: Publish docs
if: github.event_name == 'release'
needs: build_docs
runs-on: ubuntu-22.04
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: '3.9'
- name: Upgrade pip and install wheel
run: pip install --upgrade pip wheel
- name: Install pytket iqm
Expand Down
Binary file modified .github/workflows/docs/Quantinuum_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 21 additions & 5 deletions .github/workflows/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,24 @@
"sphinx.ext.autosummary",
"sphinx.ext.intersphinx",
"sphinx.ext.mathjax",
"sphinx_copybutton",
]

html_theme = "sphinx_rtd_theme"
pygments_style = "borland"

html_theme = "sphinx_book_theme"

html_theme_options = {
"repository_url": "https://github.com/CQCL/pytket-iqm",
"use_repository_button": True,
"use_issues_button": True,
}

html_static_path = ["_static"]

html_css_files = ["custom.css"]

html_logo = "Quantinuum_logo.png"

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

Expand All @@ -29,13 +44,14 @@

# The following code is for resolving broken hyperlinks in the doc.

from sphinx.application import Sphinx
import re
from typing import Any, Dict, List, Optional
from urllib.parse import urljoin

from docutils import nodes
from docutils.nodes import Element, TextElement
from sphinx.application import Sphinx
from sphinx.environment import BuildEnvironment
from urllib.parse import urljoin
import re
from typing import Any, Dict, List, Optional

# Mappings for broken hyperlinks that intersphinx cannot resolve
external_url_mapping = {
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
sphinx ~= 4.3.2
sphinx_rtd_theme
sphinx_book_theme
sphinx-copybutton
6 changes: 3 additions & 3 deletions .github/workflows/issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Login
uses: atlassian/gajira-login@v2.0.0
uses: atlassian/gajira-login@v3.0.1
env:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
- name: Create Bug
uses: atlassian/gajira-create@v2.0.1
uses: atlassian/gajira-create@v3.0.1
if: contains(github.event.issue.labels.*.name, 'bug')
with:
project: TKET
issuetype: Bug
summary: « [pytket-iqm] ${{ github.event.issue.title }}»
description: ${{ github.event.issue.html_url }}
- name: Create Task
uses: atlassian/gajira-create@v2.0.1
uses: atlassian/gajira-create@v3.0.1
if: "! contains(github.event.issue.labels.*.name, 'bug')"
with:
project: TKET
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ build
dist
*.pyc
.vscode
.venv
.mypy_cache
.hypothesis
obj
Expand Down
2 changes: 0 additions & 2 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,13 @@ enable=
line-too-long,
lost-exception,
missing-kwoa,
mixed-indentation,
mixed-line-endings,
not-callable,
no-value-for-parameter,
nonexistent-operator,
not-in-loop,
pointless-statement,
redefined-builtin,
relative-import,
return-arg-in-generator,
return-in-init,
return-outside-function,
Expand Down
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ from pytket.extensions.iqm import IQMBackend
from pytket.circuit import Circuit

backend = IQMBackend(
url="https://cortex-demo.qc.iqm.fi",
auth_server_url="https://auth.demo.qc.iqm.fi",
url="https://demo.qc.iqm.fi/cocos",
auth_server_url="https://demo.qc.iqm.fi/auth",
username="USERNAME",
password="PASSWORD",
password="PASSWORD",
)

circuit = Circuit(3, 3)
Expand All @@ -63,6 +63,10 @@ by providing the `arch` parameter to the `IQMBackend` constructor, but it genera
does not make sense, since the IQM server reports the valid quantum architecture
relevant to the given backend URL.

(Note: At the moment IQM does not provide a quantum computing service open to the
general public. Please contact our [sales team](https://www.meetiqm.com/contact/)
to set up your access to an IQM quantum computer.)

## Bugs and feature requests

Please file bugs and feature requests on the GitHub
Expand Down Expand Up @@ -122,7 +126,7 @@ skipped. To enable them, set the following environment variables:

```shell
export PYTKET_RUN_REMOTE_TESTS=1
export PYTKET_REMOTE_IQM_AUTH_SERVER_URL=https://auth.demo.qc.iqm.fi
export PYTKET_REMOTE_IQM_AUTH_SERVER_URL=https://demo.qc.iqm.fi/auth
export PYTKET_REMOTE_IQM_USERNAME=YOUR_USERNAME
export PYTKET_REMOTE_IQM_PASSWORD=YOUR_PASSWORD
```
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.5.0"
__extension_version__ = "0.6.0"
__extension_name__ = "pytket-iqm"
44 changes: 44 additions & 0 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
.wy-side-nav-search,
.wy-nav-top {
background: #5A46BE;
}

.wy-grid-for-nav,
.wy-body-for-nav,
.wy-nav-side,
.wy-side-scroll,
.wy-menu,
.wy-menu-vertical {
background-color: #FFFFFF;
}

.wy-menu-vertical a:hover {
background-color: #d9d9d9;
}

.caption-text {
color: #000000;
}

.btn-link:visited,
.btn-link,
a:visited,
.a.reference.external,
.a.reference.internal,
.wy-menu-vertical a,
.wy-menu-vertical li,
.wy-menu-vertical ul,
.span.pre,
.sig-param,
.std.std-ref,
a {
color: #544d4d;
}

:root {
--pst-color-inline-code: 199, 37, 78 !important;
}

.sig-name {
font-size: 1.25rem;
}
6 changes: 6 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Changelog
~~~~~~~~~

0.6.0 (March 2023)
------------------

* Updated pytket version requirement to 1.13.
* Updated iqm-client version requirement to 11.8.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my understanding the update to the client includes some API changes, is that right? Should we point them out here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do they actually affect the pytket-iqm API? If they are internal changes to the client API then we needn't mention them, but if they affect pytket-iqm usage we should...?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was mainly thinking about the new get_metadata which looks like it would be available for the public?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that's true, I'll add a line about it.


0.5.0 (November 2022)
---------------------

Expand Down
2 changes: 1 addition & 1 deletion pytket/extensions/iqm/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2020-2022 Cambridge Quantum Computing
# Copyright 2020-2023 Cambridge Quantum Computing
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion pytket/extensions/iqm/backends/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2020-2022 Cambridge Quantum Computing
# Copyright 2020-2023 Cambridge Quantum Computing
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion pytket/extensions/iqm/backends/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2020-2022 Cambridge Quantum Computing
# Copyright 2020-2023 Cambridge Quantum Computing
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
Loading