Skip to content

Commit db4a088

Browse files
authored
Merge pull request #410 from ProjectQ-Framework/release/0.7.0
Release version 0.7.0
2 parents 1ff10be + 8ef487d commit db4a088

File tree

216 files changed

+3316
-2624
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

216 files changed

+3316
-2624
lines changed

.github/workflows/publish_release.yml

Lines changed: 43 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: "Publish new release"
22

33
on:
4+
workflow_dispatch:
45
push:
56
tags:
67
- v[0-9]+.*
@@ -14,78 +15,59 @@ jobs:
1415
packaging:
1516
name: Build wheels on ${{ matrix.os }}
1617
runs-on: ${{ matrix.os }}
17-
if: startsWith(github.ref, 'refs/tags/') || (github.event_name == 'pull_request' && github.event.pull_request.merged == true)
18+
if: startsWith(github.ref, 'refs/tags/') || (github.event_name == 'pull_request' && github.event.pull_request.merged == true) || github.event_name == 'workflow_dispatch'
1819
strategy:
1920
matrix:
20-
os: [ubuntu-20.04, windows-2019, macos-10.15]
21+
os:
22+
- ubuntu-latest
2123

2224
steps:
2325
- uses: actions/checkout@v2
26+
if: github.event_name != 'workflow_dispatch'
27+
28+
- uses: actions/checkout@v2
29+
if: github.event_name == 'workflow_dispatch'
30+
with:
31+
ref: 'master'
2432

2533
- name: Get history and tags for SCM versioning to work
2634
run: |
2735
git fetch --prune --unshallow
2836
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
2937
30-
- name: Extract version from tag name (Unix)
31-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && runner.os != 'Windows'
32-
run: |
33-
TAG_NAME="${GITHUB_REF/refs\/tags\//}"
34-
VERSION=${TAG_NAME#v}
35-
36-
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
38+
# ========================================================================
3739

3840
- name: Extract version from branch name (for release branches) (Unix)
3941
if: github.event_name == 'pull_request' && startsWith(github.event.pull_request.head.ref, 'release/') && runner.os != 'Windows'
4042
run: |
4143
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
4244
VERSION=${BRANCH_NAME#release/}
43-
44-
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
45-
git tag v${RELEASE_VERSION} master
45+
git tag v${VERSION} master
4646
4747
- name: Extract version from branch name (for hotfix branches) (Unix)
4848
if: github.event_name == 'pull_request' && startsWith(github.event.pull_request.head.ref, 'hotfix/') && runner.os != 'Windows'
4949
run: |
5050
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
5151
VERSION=${BRANCH_NAME#hotfix/}
52+
git tag v${VERSION} master
5253
53-
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
54-
git tag v${RELEASE_VERSION} master
55-
56-
57-
- name: Extract version from tag name (Windows)
58-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && runner.os == 'Windows'
59-
run: |
60-
$TAG_NAME = $GITHUB_REF -replace "refs/tags/",""
61-
$VERSION = $TAG_NAME -replace "v",""
62-
63-
Write-Output "RELEASE_VERSION=$VERSION" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
54+
# ------------------------------------------------------------------------
6455

6556
- name: Extract version from branch name (for release branches) (Windows)
6657
if: github.event_name == 'pull_request' && startsWith(github.event.pull_request.head.ref, 'release/') && runner.os == 'Windows'
6758
run: |
6859
$BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
6960
$VERSION = $BRANCH_NAME -replace "release/",""
61+
git tag v${VERSION} master
7062
71-
Write-Output "RELEASE_VERSION=$VERSION" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
72-
git tag v${RELEASE_VERSION} master
73-
74-
- name: Extract version from branch name (for hotfix branches) (Unix)
63+
- name: Extract version from branch name (for hotfix branches) (Windows)
7564
if: github.event_name == 'pull_request' && startsWith(github.event.pull_request.head.ref, 'hotfix/') && runner.os == 'Windows'
7665
run: |
7766
$BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
7867
$VERSION = $BRANCH_NAME -replace "hotfix/",""
68+
git tag v${VERSION} master
7969
80-
Write-Output "RELEASE_VERSION=$VERSION" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
81-
git tag v${RELEASE_VERSION} master
82-
83-
- name: Build wheels
84-
uses: joerick/[email protected]
85-
env:
86-
CIBW_ARCHS: auto64
87-
CIBW_SKIP: cp27-* pp* cp35-*
88-
CIBW_BEFORE_BUILD: python -m pip install pybind11
70+
# ========================================================================
8971

9072
- name: Build source distribution
9173
if: runner.os == 'Linux'
@@ -101,11 +83,21 @@ jobs:
10183
name: packages
10284
path: ./wheelhouse/*
10385

86+
10487
release:
10588
name: Publish new release
10689
runs-on: ubuntu-latest
107-
needs: packaging
90+
needs:
91+
- packaging
10892
steps:
93+
- name: Extract version from tag name (workflow_dispatch)
94+
if: github.event_name == 'workflow_dispatch'
95+
run: |
96+
TAG_NAME=$(git describe --tags `git rev-list --tags --max-count=1`)
97+
VERSION=${TAG_NAME#v}
98+
99+
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
100+
109101
- name: Extract version from tag name
110102
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
111103
run: |
@@ -130,8 +122,18 @@ jobs:
130122
131123
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
132124
125+
# ------------------------------------------------------------------------
126+
# Checkout repository to get CHANGELOG
127+
133128
- uses: actions/checkout@v2
129+
if: github.event_name != 'workflow_dispatch'
130+
131+
- uses: actions/checkout@v2
132+
if: github.event_name == 'workflow_dispatch'
133+
with:
134+
ref: 'master'
134135

136+
# ------------------------------------------------------------------------
135137
# Downloads all to directories matching the artifact names
136138
- uses: actions/download-artifact@v2
137139

@@ -164,7 +166,7 @@ jobs:
164166
upload_to_pypi:
165167
name: Upload to PyPI
166168
runs-on: ubuntu-latest
167-
needs: release # Only upload to PyPi if everything was successful
169+
needs: release
168170
steps:
169171
- uses: actions/setup-python@v2
170172

@@ -181,7 +183,9 @@ jobs:
181183
master_to_develop_pr:
182184
name: Merge master back into develop
183185
runs-on: ubuntu-latest
184-
needs: release # Only create PR if everything was successful
186+
needs:
187+
- release
188+
- upload_to_pypi
185189
steps:
186190
- name: Merge master into develop branch
187191
uses: thomaseizinger/[email protected]

.pre-commit-config.yaml

Lines changed: 66 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -12,56 +12,77 @@
1212
#
1313
# See https://github.com/pre-commit/pre-commit
1414

15+
---
16+
1517
ci:
16-
skip: [check-manifest]
18+
skip: [check-manifest]
1719

1820
repos:
19-
- repo: https://github.com/pre-commit/pre-commit-hooks
20-
rev: v4.0.1
21-
hooks:
22-
- id: check-added-large-files
23-
- id: check-case-conflict
24-
- id: check-merge-conflict
25-
- id: check-symlinks
26-
- id: check-yaml
27-
- id: check-toml
28-
- id: debug-statements
29-
- id: end-of-file-fixer
30-
- id: mixed-line-ending
31-
- id: trailing-whitespace
32-
- id: fix-encoding-pragma
21+
- repo: meta
22+
hooks:
23+
- id: check-useless-excludes
24+
25+
- repo: https://github.com/pre-commit/pre-commit-hooks
26+
rev: v4.0.1
27+
hooks:
28+
- id: check-added-large-files
29+
- id: check-case-conflict
30+
- id: check-merge-conflict
31+
- id: check-symlinks
32+
- id: check-yaml
33+
- id: check-toml
34+
- id: debug-statements
35+
- id: end-of-file-fixer
36+
- id: mixed-line-ending
37+
- id: trailing-whitespace
38+
- id: fix-encoding-pragma
39+
40+
# Changes tabs to spaces
41+
- repo: https://github.com/Lucas-C/pre-commit-hooks
42+
rev: v1.1.10
43+
hooks:
44+
- id: remove-tabs
3345

34-
# Changes tabs to spaces
35-
- repo: https://github.com/Lucas-C/pre-commit-hooks
36-
rev: v1.1.10
37-
hooks:
38-
- id: remove-tabs
46+
- repo: https://github.com/PyCQA/isort
47+
rev: 5.9.1
48+
hooks:
49+
- id: isort
50+
name: isort (python)
3951

40-
- repo: https://github.com/psf/black
41-
rev: 21.5b1
42-
hooks:
43-
- id: black
44-
language_version: python3
45-
# This is a slow hook, so only run this if --hook-stage manual is passed
46-
stages: [manual]
52+
- repo: https://github.com/psf/black
53+
rev: 21.5b1
54+
hooks:
55+
- id: black
56+
language_version: python3
57+
# This is a slow hook, so only run this if --hook-stage manual is passed
58+
stages: [manual]
4759

48-
- repo: https://gitlab.com/pycqa/flake8
49-
rev: 3.9.2
50-
hooks:
51-
- id: flake8
52-
exclude: ^(docs/.*|tools/.*)$
60+
- repo: https://gitlab.com/PyCQA/flake8
61+
rev: 3.9.2
62+
hooks:
63+
- id: flake8
64+
name: flake8-strict
65+
exclude: ^(.*_test\.py)$
66+
additional_dependencies: [flake8-comprehensions, flake8-breakpoint,
67+
flake8-eradicate, flake8-mutable,
68+
flake8-docstrings]
69+
- id: flake8
70+
name: flake8-test-files
71+
additional_dependencies: [flake8-comprehensions, flake8-breakpoint,
72+
flake8-eradicate, flake8-mutable]
73+
files: ^(.*_test\.py)$
5374

54-
- repo: https://github.com/pre-commit/mirrors-pylint
55-
rev: 'v3.0.0a3'
56-
hooks:
57-
- id: pylint
58-
args: ['--score=n']
59-
# This is a slow hook, so only run this if --hook-stage manual is passed
60-
stages: [manual]
61-
additional_dependencies: ['pybind11>=2.6', 'numpy', 'requests', 'boto3', 'matplotlib', 'networkx']
75+
- repo: https://github.com/pre-commit/mirrors-pylint
76+
rev: 'v3.0.0a3'
77+
hooks:
78+
- id: pylint
79+
args: ['--score=n']
80+
# This is a slow hook, so only run this if --hook-stage manual is passed
81+
stages: [manual]
82+
additional_dependencies: [pybind11>=2.6, numpy, requests, boto3, matplotlib, networkx, sympy]
6283

63-
- repo: https://github.com/mgedmin/check-manifest
64-
rev: "0.46"
65-
hooks:
66-
- id: check-manifest
67-
additional_dependencies: ['setuptools-scm', 'pybind11>=2.6']
84+
- repo: https://github.com/mgedmin/check-manifest
85+
rev: '0.46'
86+
hooks:
87+
- id: check-manifest
88+
additional_dependencies: ['setuptools-scm', 'pybind11>=2.6']

CHANGELOG.md

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,39 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414
### Removed
1515
### Repository
1616

17+
## [0.7.0] - 2021-07-14
18+
19+
### Added
20+
21+
- UnitarySimulator backend for computing the unitary transformation corresponding to a quantum circuit
22+
23+
### Changed
24+
25+
- Moved some exceptions classes into their own files to avoid code duplication
26+
27+
### Deprecated
28+
29+
### Fixed
30+
31+
- Prevent infinite recursion errors when too many compiler engines are added to the MainEngine
32+
- Error in testing the decomposition for the phase estimation gate
33+
- Fixed small issue with matplotlib drawing backend
34+
- Make all docstrings PEP257 compliant
35+
36+
### Removed
37+
38+
- Some compatibility code for Python 2.x
39+
40+
### Repository
41+
42+
- Added `isort` to the list of pre-commit hooks
43+
- Added some more flake8 plugins to the list used by `pre-commit`:
44+
+ flake8-breakpoint
45+
+ flake8-comprehensions
46+
+ flake8-docstrings
47+
+ flake8-eradicate
48+
+ flake8-mutable
49+
1750
## [0.6.1] - 2021-06-23
1851

1952
### Repository
@@ -51,17 +84,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5184
### Repository
5285

5386
- Use `setuptools-scm` for versioning
87+
5488
- Added `.editorconfig` file
89+
5590
- Added `pyproject.toml` and `setup.cfg`
91+
5692
- Added CHANGELOG.md
93+
5794
- Added support for GitHub Actions
5895
- Build and testing on various plaforms and compilers
5996
- Automatic draft of new release
6097
- Automatic publication of new release once ready
6198
- Automatic upload of releases artifacts to PyPi and GitHub
99+
62100
- Added pre-commit configuration file
63101

64102
- Updated cibuildwheels action to v1.11.1
103+
65104
- Updated thomaseizinger/create-pull-request action to v1.1.0
66105

67106
## [0.5.1] - 2019-02-15
@@ -102,6 +141,12 @@ The ProjectQ v0.5.x release branch is the last one that is guaranteed to work wi
102141

103142
Future releases might introduce changes that will require Python 3.5 (Python 3.4 and earlier have already been declared deprecated at the time of this writing)
104143

105-
[Unreleased]: https://github.com/ProjectQ-Framework/ProjectQ/compare/0.6.0...HEAD
144+
[Unreleased]: https://github.com/ProjectQ-Framework/ProjectQ/compare/v0.7.0...HEAD
145+
146+
[0.7.0]: https://github.com/ProjectQ-Framework/ProjectQ/compare/v0.6.1...v0.7.0
147+
148+
[0.6.0]: https://github.com/ProjectQ-Framework/ProjectQ/compare/v0.5.1...v0.6.0
149+
150+
[0.5.1]: https://github.com/ProjectQ-Framework/ProjectQ/compare/v0.5.0...v0.5.1
106151

107-
[0.6.0]: https://github.com/ProjectQ-Framework/ProjectQ/compare/0.5.1...0.6.0
152+
[0.5.0]: https://github.com/ProjectQ-Framework/ProjectQ/compare/v0.4.2...v0.5.0

0 commit comments

Comments
 (0)