-
Notifications
You must be signed in to change notification settings - Fork 603
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/PennyLaneAI/pennylane int…
…o capture_qml_cond
- Loading branch information
Showing
33 changed files
with
2,174 additions
and
371 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Copyright 2024 Xanadu Quantum Technologies Inc. | ||
|
||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
|
||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
""" | ||
This module bumps the PennyLane development version by one unit. | ||
""" | ||
|
||
import os | ||
import re | ||
|
||
version_file_path = os.path.join(os.path.dirname(__file__), "../../../pennylane/_version.py") | ||
|
||
assert os.path.isfile(version_file_path) | ||
|
||
with open(version_file_path, "r+", encoding="UTF-8") as f: | ||
lines = f.readlines() | ||
|
||
version_line = lines[-1] | ||
assert "__version__ = " in version_line | ||
|
||
pattern = r"(\d+).(\d+).(\d+)-dev(\d+)" | ||
match = re.search(pattern, version_line) | ||
assert match | ||
|
||
major, minor, bug, dev = match.groups() | ||
|
||
replacement = f'__version__ = "{major}.{minor}.{bug}-dev{int(dev)+1}"\n' | ||
lines[-1] = replacement | ||
|
||
f.seek(0) | ||
f.writelines(lines) | ||
f.truncate() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Build nightly PennyLane releases for TestPyPI | ||
|
||
on: | ||
schedule: | ||
# Run every weekday at 5:50 EDT (cron is in UTC) | ||
- cron: "50 9 * * 1-5" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
setup: | ||
name: Setup the release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout PennyLane repo | ||
uses: actions/checkout@v4 | ||
with: | ||
ssh-key: ${{ secrets.NIGHTLY_VERSION_UPDATE_DEPLOY_KEY }} | ||
|
||
- name: Bump dev version | ||
run: | | ||
python $GITHUB_WORKSPACE/.github/workflows/scripts/set_nightly_version.py | ||
- name: Push new version | ||
run: | | ||
git config --global user.email '${{ secrets.AUTO_UPDATE_VERSION_RINGO_EMAIL }}' | ||
git config --global user.name "ringo-but-quantum" | ||
git add $GITHUB_WORKSPACE/pennylane/_version.py | ||
git commit -m "[no ci] bump nightly version" | ||
git push | ||
upload: | ||
name: Upload wheels to TestPyPI | ||
needs: [setup] | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write # IMPORTANT: mandatory for trusted publishing | ||
|
||
steps: | ||
- name: Build wheels | ||
run: | | ||
python -m pip install build | ||
python -m build --wheel --outdir dist | ||
- name: Upload wheels | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
repository-url: https://test.pypi.org/legacy/ | ||
packages-dir: dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -929,4 +929,4 @@ Kenya Sakka, | |
Jay Soni, | ||
Kazuki Tsuoka, | ||
Haochen Paul Wang, | ||
David Wierichs. | ||
David Wierichs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,4 @@ | |
Version number (major.minor.patch[-label]) | ||
""" | ||
|
||
__version__ = "0.38.0-dev" | ||
__version__ = "0.38.0-dev3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.