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

Cherry pick/docs1.28 #1411

Closed
wants to merge 36 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
ee6bffc
Merge pull request #1350 from CQCL/main
cqc-alec Apr 16, 2024
25d0a60
add yet more missing circuit methods (#1352)
CalMacCQ Apr 17, 2024
49f684c
Update to pytket-circuit-renderer 0.8 (#1354)
cqc-alec Apr 18, 2024
0288746
Ensure MacOS arm64 wheels are compatible with MacOS 12 and above (#1359)
cqc-alec Apr 19, 2024
297a0fb
Add "CANCELLING" and "RETRYING" statuses (#1364)
quantinuum-richard-morrison Apr 25, 2024
16514cc
Run do-clang-format with clang-format 18.1.4 (#1367)
sjdilkes Apr 29, 2024
cf12bd0
ci: Add automated benchmarking workflow (#1365)
daniel-mills-cqc Apr 29, 2024
26050e6
Set Nix workflow to run on PRs and commits (not just weekly) (#1370)
jake-arkinstall May 2, 2024
9b16ccf
Switch workflows to target `main` only (#1371)
cqc-alec May 3, 2024
e599bf3
Fix typo.
cqc-alec May 3, 2024
1a273e5
Bump tket version.
cqc-alec May 3, 2024
9e41b6d
Merge pull request #1372 from CQCL/develop
cqc-alec May 3, 2024
f55ef83
Show diff from clang-format. (#1373)
cqc-alec May 3, 2024
8fdb139
Remove workflow to automatically create Jira issues. (#1378)
cqc-alec May 7, 2024
145b70d
Update libraries to boost 1.85.0 (#1379)
cqc-alec May 7, 2024
6bcfa0a
Update to catch2 3.6.0 (#1375)
cqc-alec May 7, 2024
18ceee4
Update to boost 1.85.0 (#1381)
cqc-alec May 7, 2024
23bb57e
Use `lark` package instead of deprecated `lark-parser` (#1386)
cqc-alec May 10, 2024
9f2a073
Escape underscores when converting to latex (#1385)
cqc-alec May 13, 2024
fede38d
Remove debug prints. (#1387)
cqc-alec May 13, 2024
aafcd59
Update to pybind11_json 0.2.14 (#1389)
cqc-alec May 14, 2024
385d149
Add workflow to automatically add new issues to project. (#1390)
cqc-alec May 14, 2024
8aa12f1
update tket email (#1391)
cqc-melf May 14, 2024
436d3e3
Feature/greedy pauli simp (#1384)
yao-cqc May 14, 2024
6969d48
Update extensions.rst (#1394)
cqc-melf May 15, 2024
4df750b
Allow constant `BitLogicExp` as condition (#1397)
cqc-alec May 15, 2024
bc8c11c
Methods for GPI, GPI2, and AAMS gates. (#1395)
michaelontiveros May 16, 2024
ce20833
Update docs and changelog. (#1398)
cqc-alec May 16, 2024
de0cf97
Fix name for consistency and to match reference in `publish_to_pypi`.…
cqc-alec May 16, 2024
7ecbb50
Allow barriers when dagger or transpose circuits (#1400)
yao-cqc May 17, 2024
76e3f57
Bump cachix/install-nix-action from 26 to 27 (#1403)
dependabot[bot] May 20, 2024
98979c0
Bump actions/add-to-project from 0.6.1 to 1.0.1 (#1404)
dependabot[bot] May 20, 2024
ecc9855
Use `ubuntu-24.04` on CI (#1401)
cqc-alec May 20, 2024
7a3cf20
Add OpType.CnRx and OpType.CnRz (#1405)
sjdilkes May 22, 2024
48eaccc
Update `place_fully_connected` (#1409)
sjdilkes May 23, 2024
7d9e493
Merge branch 'main' into cherry-pick/docs1.28
CalMacCQ May 24, 2024
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
9 changes: 7 additions & 2 deletions .github/workflows/build-with-nix.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
name: build with nix

on:
pull_request:
branches:
- main
schedule:
# 01:00 every Sunday morning
- cron: '0 1 * * 0'
workflow_dispatch: {}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_and_test:
strategy:
matrix:
os: ['ubuntu-22.04', 'macos-14']
os: ['ubuntu-24.04', 'macos-14']
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- uses: cachix/install-nix-action@V27
- uses: cachix/cachix-action@v14
with:
name: tket
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/build-without-conan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ concurrency:
cancel-in-progress: true
jobs:
build_and_test:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
env:
INSTALL_DIR: "/home/runner/local"
TMP_DIR: "/home/runner/tmp"
Expand All @@ -22,17 +22,17 @@ jobs:
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: no-conan-build-ubuntu-22.04
key: no-conan-build-ubuntu-24.04
- name: install ninja
run: |
sudo apt update
sudo apt install ninja-build
- name: Install boost
run: |
cd ${TMP_DIR}
wget -O boost_1_84_0.tar.gz https://sourceforge.net/projects/boost/files/boost/1.84.0/boost_1_84_0.tar.gz/download
tar xzvf boost_1_84_0.tar.gz
cd boost_1_84_0/
wget -O boost_1_85_0.tar.gz https://sourceforge.net/projects/boost/files/boost/1.85.0/boost_1_85_0.tar.gz/download
tar xzvf boost_1_85_0.tar.gz
cd boost_1_85_0/
./bootstrap.sh --prefix=${INSTALL_DIR}
./b2
./b2 install
Expand Down Expand Up @@ -74,9 +74,9 @@ jobs:
- name: Install catch2
run: |
cd ${TMP_DIR}
wget https://github.com/catchorg/Catch2/archive/refs/tags/v3.5.4.tar.gz
tar xzvf v3.5.4.tar.gz
cd Catch2-3.5.4/
wget https://github.com/catchorg/Catch2/archive/refs/tags/v3.6.0.tar.gz
tar xzvf v3.6.0.tar.gz
cd Catch2-3.6.0/
mkdir build
cd build
cmake -GNinja -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} ..
Expand Down Expand Up @@ -104,9 +104,9 @@ jobs:
- name: Install pybind11_json
run: |
cd ${TMP_DIR}
wget https://github.com/pybind/pybind11_json/archive/refs/tags/0.2.13.tar.gz
tar xzvf 0.2.13.tar.gz
cd pybind11_json-0.2.13/
wget https://github.com/pybind/pybind11_json/archive/refs/tags/0.2.14.tar.gz
tar xzvf 0.2.14.tar.gz
cd pybind11_json-0.2.14/
mkdir build
cd build
cmake -GNinja -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} ..
Expand Down
77 changes: 44 additions & 33 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ on:
pull_request:
branches:
- main
- develop
push:
branches:
- develop
- main
schedule:
# 03:00 every Saturday morning
- cron: '0 3 * * 6'
Expand All @@ -20,7 +19,7 @@ concurrency:
jobs:
check_changes:
name: Check tket library version
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
outputs:
tket_or_workflow_changed: ${{ steps.filter.outputs.tket_or_workflow }}
tket_changed: ${{ steps.filter.outputs.tket }}
Expand All @@ -30,7 +29,8 @@ jobs:
tket_package_exists: ${{ steps.tket_package_exists.outputs.tket_package_exists }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Select Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- uses: dorny/paths-filter@v3.0.2
Expand Down Expand Up @@ -63,14 +63,14 @@ jobs:
tket_package_exists=`conan search -r tket-libs "tket/${{ steps.tket_ver.outputs.tket_ver }}@tket/stable" | grep "not found" > /dev/null 2>&1 && echo false || echo true`
echo "tket_package_exists=${tket_package_exists}" >> $GITHUB_OUTPUT
- name: Check tket version bump
if: github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'develop' && steps.filter.outputs.tket == 'true' && steps.test_package_exists.outputs.tket_package_exists == 'true'
if: github.event_name == 'pull_request' && steps.filter.outputs.tket == 'true' && steps.test_package_exists.outputs.tket_package_exists == 'true'
run: exit 1

check_docs_tket:
name: Check documentation build
needs: check_changes
if: needs.check_changes.outputs.tket_or_workflow_changed == 'true' || needs.check_changes.outputs.doxyfile_or_workflow_changed == 'true'
runs-on: 'ubuntu-22.04'
runs-on: 'ubuntu-24.04'
steps:
- uses: actions/checkout@v4
- name: Check doxygen
Expand All @@ -89,26 +89,26 @@ jobs:
run: |
brew update
brew install clang-format@18
git ls-files "*.cpp" "*.hpp" | xargs clang-format -style=file --dry-run --Werror
git ls-files "*.cpp" "*.hpp" | xargs clang-format -style=file -i
git diff --exit-code

build_test_tket:
name: Build and test (tket)
needs: check_changes
if: needs.check_changes.outputs.tket_or_workflow_changed == 'true'
strategy:
matrix:
os: ['ubuntu-22.04', 'macos-12', 'macos-14']
os: ['ubuntu-24.04', 'macos-12', 'macos-14']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: apt update
if: matrix.os == 'ubuntu-22.04'
if: matrix.os == 'ubuntu-24.04'
run: sudo apt update
- name: Select Python 3.11
# otherwise turtlebrowser/get-conan@v1.2 fails on macos-12
- name: Select Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'
- name: Install conan
uses: turtlebrowser/get-conan@v1.2
- name: Set up conan
Expand All @@ -120,7 +120,7 @@ jobs:
cp ${PROFILE_PATH} ${DEFAULT_PROFILE_PATH}
conan remote add tket-libs https://quantinuumsw.jfrog.io/artifactory/api/conan/tket1-libs --index 0
- name: Install runtime test requirements
if: matrix.os == 'ubuntu-22.04' && github.event_name == 'schedule'
if: matrix.os == 'ubuntu-24.04' && github.event_name == 'schedule'
run: |
sudo apt install texlive texlive-latex-extra latexmk
mkdir -p ~/texmf/tex/latex
Expand All @@ -138,7 +138,7 @@ jobs:
- name: Build tket
run: conan create tket -s build_type=Release --user=tket --channel=stable -o boost/*:header_only=True -o with_all_tests=True
- name: Upload package
if: github.event_name == 'push' && github.ref == 'refs/heads/develop'
if: github.event_name == 'push'
run: |
ccache --set-config namespace=WITHOUT_TESTS
conan create tket --user=tket --channel=stable -o boost/*:header_only=True
Expand All @@ -155,6 +155,10 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Select Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install conan
uses: turtlebrowser/get-conan@v1.2
- name: Set up conan
Expand Down Expand Up @@ -207,7 +211,7 @@ jobs:
conan build tket --user=tket --channel=stable -o boost/*:header_only=True -o with_all_tests=True -c tools.cmake.cmaketoolchain:generator=Ninja
conan export-pkg tket --user=tket --channel=stable -o boost/*:header_only=True -o with_all_tests=True -c tools.cmake.cmaketoolchain:generator=Ninja
- name: Upload package
if: github.event_name == 'push' && github.ref == 'refs/heads/develop'
if: github.event_name == 'push'
run: |
ccache --set-config namespace=WITHOUT_TESTS
conan build tket --user=tket --channel=stable -o boost/*:header_only=True
Expand All @@ -223,23 +227,27 @@ jobs:
name: Build and test pytket (ubuntu)
needs: check_changes
if: needs.check_changes.outputs.tket_or_workflow_changed == 'true' || needs.check_changes.outputs.pytket_or_workflow_changed == 'true'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Select Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install conan
uses: turtlebrowser/get-conan@v1.2
- name: Set up conan
run: |
conan profile detect
DEFAULT_PROFILE_PATH=`conan profile path default`
PROFILE_PATH=./conan-profiles/ubuntu-22.04
PROFILE_PATH=./conan-profiles/ubuntu-24.04
diff ${DEFAULT_PROFILE_PATH} ${PROFILE_PATH} || true
cp ${PROFILE_PATH} ${DEFAULT_PROFILE_PATH}
conan remote add tket-libs https://quantinuumsw.jfrog.io/artifactory/api/conan/tket1-libs --index 0
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: tket-dynamic-ubuntu-22.04
key: tket-dynamic-ubuntu-24.04
- name: further ccache config
run: |
ccache --set-config base_dir=${HOME}
Expand All @@ -257,7 +265,7 @@ jobs:
- name: Install pytket requirements
run: |
conan create recipes/pybind11
conan create recipes/pybind11_json/all --version 0.2.13
conan create recipes/pybind11_json/all --version 0.2.14
- name: Set up Python (pull request)
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
uses: actions/setup-python@v5
Expand Down Expand Up @@ -319,7 +327,7 @@ jobs:
name: pytket_test_coverage
path: pytket/tests/htmlcov
- name: Upload package
if: github.event_name == 'push' && github.ref == 'refs/heads/develop' && needs.check_changes.outputs.tket_changed == 'true'
if: github.event_name == 'push' && needs.check_changes.outputs.tket_changed == 'true'
run: |
conan remote login -p ${{ secrets.JFROG_ARTIFACTORY_TOKEN_3 }} tket-libs ${{ secrets.JFROG_ARTIFACTORY_USER_3 }}
conan upload tket/${{ needs.check_changes.outputs.tket_ver }}@tket/stable -r=tket-libs
Expand All @@ -334,11 +342,10 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Select Python 3.11
# otherwise turtlebrowser/get-conan@v1.2 fails on macos-12
- name: Select Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'
- name: Install conan
uses: turtlebrowser/get-conan@v1.2
- name: Set up conan
Expand Down Expand Up @@ -370,7 +377,7 @@ jobs:
- name: Install pytket requirements
run: |
conan create recipes/pybind11
conan create recipes/pybind11_json/all --version 0.2.13
conan create recipes/pybind11_json/all --version 0.2.14
- name: Set up Python (pull request)
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
uses: actions/setup-python@v5
Expand Down Expand Up @@ -410,7 +417,7 @@ jobs:
git diff --quiet pytket/_tket && echo "Stubs are up-to-date" || exit 1 # fail if stubs change after regeneration
python -m mypy --config-file=mypy.ini --no-incremental -p pytket -p tests
- name: Upload package
if: github.event_name == 'push' && github.ref == 'refs/heads/develop' && needs.check_changes.outputs.tket_changed == 'true'
if: github.event_name == 'push' && needs.check_changes.outputs.tket_changed == 'true'
run: |
conan remote login -p ${{ secrets.JFROG_ARTIFACTORY_TOKEN_3 }} tket-libs ${{ secrets.JFROG_ARTIFACTORY_USER_3 }}
conan upload tket/${{ needs.check_changes.outputs.tket_ver }}@tket/stable -r=tket-libs
Expand All @@ -422,6 +429,10 @@ jobs:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- name: Select Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install conan
uses: turtlebrowser/get-conan@v1.2
- name: Set up conan
Expand Down Expand Up @@ -491,7 +502,7 @@ jobs:
- name: Install pytket requirements
run: |
conan create recipes/pybind11
conan create recipes/pybind11_json/all --version 0.2.13
conan create recipes/pybind11_json/all --version 0.2.14
- name: Set up Python 3.10
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
uses: actions/setup-python@v5
Expand Down Expand Up @@ -528,7 +539,7 @@ jobs:
pip install -r requirements.txt
pytest --ignore=simulator/
- name: Upload package
if: github.event_name == 'push' && github.ref == 'refs/heads/develop' && needs.check_changes.outputs.tket_changed == 'true'
if: github.event_name == 'push' && needs.check_changes.outputs.tket_changed == 'true'
run: |
conan remote login -p ${{ secrets.JFROG_ARTIFACTORY_TOKEN_3 }} tket-libs ${{ secrets.JFROG_ARTIFACTORY_USER_3 }}
conan upload tket/${{ needs.check_changes.outputs.tket_ver }}@tket/stable -r=tket-libs
Expand All @@ -541,8 +552,8 @@ jobs:
name: Publish pytket coverage
needs: build_test_pytket_ubuntu
concurrency: gh_pages
if: github.event_name == 'push' && github.ref == 'refs/heads/develop'
runs-on: ubuntu-22.04
if: github.event_name == 'push'
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -569,16 +580,16 @@ jobs:
check_pytket_coverage:
name: Check pytket line and branch coverage
needs: build_test_pytket_ubuntu
if: (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'develop') || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-22.04
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Download artefact
uses: actions/download-artifact@v4
with:
name: pytket_test_coverage
path: pytket-test-coverage/
- name: Compare with latest report from develop
- name: Compare with latest report from main
run: |
wget https://cqcl.github.io/tket/pytket/test-coverage/cov.xml -O oldcov.xml
./.github/workflows/compare-pytket-coverage oldcov.xml pytket-test-coverage/cov.xml
Expand All @@ -598,7 +609,7 @@ jobs:
- publish_pytket_coverage
- check_pytket_coverage
if: always()
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- shell: python
name: Check job results
Expand Down
Loading
Loading