Skip to content

Commit

Permalink
Merge pull request #30 from CQCL/release/pytket-1.6
Browse files Browse the repository at this point in the history
Release/0.29.0
  • Loading branch information
cqc-alec committed Jun 14, 2023
2 parents 56433b3 + 56f147e commit e9c5364
Show file tree
Hide file tree
Showing 24 changed files with 103 additions and 57 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,36 +30,36 @@ jobs:
with:
fetch-depth: '0'
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* +refs/heads/*:refs/remotes/origin/*
- name: Set up Python 3.8
- name: Set up Python 3.9
if: github.event_name == 'push' || github.event_name == 'schedule'
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Build and test (3.8)
python-version: '3.9'
- name: Build and test (3.9)
if: github.event_name == 'push' || github.event_name == 'schedule'
shell: bash
run: |
./.github/workflows/build-test nomypy
- name: Set up Python 3.9
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Build and test including remote checks (3.9) mypy
python-version: '3.10'
- name: Build and test including remote checks (3.10) mypy
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 mypy
- name: Build and test including remote checks (3.9) nomypy
- name: Build and test including remote checks (3.10) nomypy
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
- name: Set up Python 3.10
- name: Set up Python 3.11
if: github.event_name == 'push' || github.event_name == 'pull_request' || github.event_name == 'schedule'
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Build and test (3.10)
python-version: '3.11'
- name: Build and test (3.11)
if: github.event_name == 'push' || github.event_name == 'pull_request' || github.event_name == 'schedule'
shell: bash
run: |
Expand Down Expand Up @@ -110,10 +110,10 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Set up Python 3.9
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.10'
- name: Download all wheels
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -150,4 +150,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v2
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 cirq
Expand Down
Binary file removed .github/workflows/docs/Quantinuum_logo.png
Binary file not shown.
Binary file added .github/workflows/docs/Quantinuum_logo_black.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/workflows/docs/Quantinuum_logo_white.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 6 additions & 3 deletions .github/workflows/docs/build-docs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ def build_module_docs():
mod_docs = MODULES_DIR / "docs"
mod_build = mod_docs / "build"
conf_copy = mod_docs / "conf.py"
logo_copy = mod_docs / "Quantinuum_logo.png"
logo_copy_black = mod_docs / "Quantinuum_logo_black.png"
logo_copy_white = mod_docs / "Quantinuum_logo_white.png"
shutil.copy(DOCS_DIR / "conf.py", conf_copy)
shutil.copy(DOCS_DIR / "Quantinuum_logo.png", logo_copy)
shutil.copy(DOCS_DIR / "Quantinuum_logo_black.png", logo_copy_black)
shutil.copy(DOCS_DIR / "Quantinuum_logo_white.png", logo_copy_white)
remove_dir(mod_build)
index_rst = mod_docs / "index.rst"
with open(mod_docs / "intro.txt", "r") as f:
Expand Down Expand Up @@ -82,7 +84,8 @@ def build_module_docs():
fix_links(htmlfile)
fix_links(mod_build / "searchindex.js")
conf_copy.unlink()
logo_copy.unlink()
logo_copy_black.unlink()
logo_copy_white.unlink()
index_rst.unlink()


Expand Down
28 changes: 23 additions & 5 deletions .github/workflows/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,26 @@
"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-cirq",
"use_repository_button": True,
"use_issues_button": True,
"logo": {
"image_light": "Quantinuum_logo_black.png",
"image_dark": "Quantinuum_logo_white.png",
},
}

html_static_path = ["_static"]

html_css_files = ["custom.css"]

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

Expand All @@ -29,13 +46,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
5 changes: 0 additions & 5 deletions .github/workflows/docs/intro.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
pytket-extensions
=================

.. image:: Quantinuum_logo.png
:width: 160px
:align: right


These extensions enable ``pytket` to be used in conjunction with other
platforms. Each extension adds either new methods to the ``pytket`` package to
convert between circuit representations, or new backends to which ``pytket``
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 >= 1.0.1, <2.0
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@v3.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@v3.0.0
uses: atlassian/gajira-create@v3.0.1
if: contains(github.event.issue.labels.*.name, 'bug')
with:
project: TKET
issuetype: Bug
summary: « [pytket-cirq] ${{ github.event.issue.title }}»
description: ${{ github.event.issue.html_url }}
- name: Create Task
uses: atlassian/gajira-create@v3.0.0
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: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Cirq representations.

## Getting started

`pytket-cirq` is available for Python 3.8, 3.9 and 3.10, on Linux, MacOS
`pytket-cirq` is available for Python 3.9, 3.10 and 3.11, on Linux, MacOS
and Windows. To install, run:

```pip install pytket-cirq```
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.28.0"
__extension_version__ = "0.29.0"
__extension_name__ = "pytket-cirq"
35 changes: 35 additions & 0 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
.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;
}

.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,
html[data-theme=light] {
--pst-color-inline-code: rgb(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.29.0 (June 2023)
------------------

* Update pytket version requirement to 1.16.
* Drop support for Python 3.8; add support for 3.11.

0.28.0 (November 2022)
----------------------

Expand Down
15 changes: 1 addition & 14 deletions docs/intro.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,13 @@
pytket-cirq
===========

.. raw:: html

<embed>
<div style="width:100%; display:flex; align-items:center; justify-content:end; transform: translateY(-85px); margin-bottom: -75px">
<img src="_images/Quantinuum_logo.png" width="100" height="100"></img>
</div>
</embed>

.. image:: Quantinuum_logo.png
:width: 0px
:height: 0px
:align: right

`Cirq <https://www.github.com/quantumlib/cirq>`_ is a python library for producing
quantum circuits and running them on simulators and physical quantum devices.

``pytket-cirq`` is an extension to ``pytket`` that allows conversion to and from
Cirq representations.

``pytket-cirq`` is available for Python 3.8, 3.9 and 3.10, on Linux, MacOS and
``pytket-cirq`` is available for Python 3.9, 3.10 and 3.11, on Linux, MacOS and
Windows. To install, run:

::
Expand Down
2 changes: 1 addition & 1 deletion pytket/extensions/cirq/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2022 Cambridge Quantum Computing
# Copyright 2019-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/cirq/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/cirq/backends/cirq.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/cirq/backends/cirq_convert.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2022 Cambridge Quantum Computing
# Copyright 2019-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/cirq/backends/cirq_utils.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
6 changes: 3 additions & 3 deletions setup.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 Expand Up @@ -44,16 +44,16 @@
packages=find_namespace_packages(include=["pytket.*"]),
include_package_data=True,
install_requires=[
"pytket ~= 1.9",
"pytket ~= 1.16",
"cirq-core ~= 1.0",
"cirq-google ~= 1.0",
"protobuf ~= 3.20, < 4.0",
],
classifiers=[
"Environment :: Console",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"License :: OSI Approved :: Apache Software License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX :: Linux",
Expand Down
2 changes: 1 addition & 1 deletion tests/cirq_convert_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2022 Cambridge Quantum Computing
# Copyright 2019-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 tests/test_cirq_backend.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2022 Cambridge Quantum Computing
# Copyright 2019-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

0 comments on commit e9c5364

Please sign in to comment.