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

Update/docmain1.34 #1638

Merged
merged 17 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/build-with-nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
build_and_test:
strategy:
matrix:
os: ['ubuntu-24.04', 'macos-14']
os: ['ubuntu-24.04', 'macos-15']
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v29
- uses: cachix/install-nix-action@v30
- uses: cachix/cachix-action@v15
with:
name: tket
Expand Down
35 changes: 24 additions & 11 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
name: Check C++ code formatting
needs: check_changes
if: needs.check_changes.outputs.tket_or_workflow_changed == 'true'
runs-on: 'macos-14'
runs-on: 'macos-15'
steps:
- uses: actions/checkout@v4
- name: Check C++ code formatting
Expand All @@ -98,7 +98,7 @@ jobs:
if: needs.check_changes.outputs.tket_or_workflow_changed == 'true'
strategy:
matrix:
os: ['ubuntu-24.04', 'macos-12', 'macos-14']
os: ['ubuntu-24.04', 'macos-13', 'macos-15']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -286,11 +286,15 @@ jobs:
if: github.event_name == 'schedule'
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.13'
- name: Build pytket
run: |
cd pytket
pip install -e .[ZX] -v
if python --version | grep -q '3.13' ; then
pip install -e . -v
else
pip install -e .[ZX] -v
fi
- name: Run doctests
run: |
cd pytket
Expand Down Expand Up @@ -341,7 +345,7 @@ jobs:
if: needs.check_changes.outputs.tket_or_workflow_changed == 'true' || needs.check_changes.outputs.pytket_or_workflow_changed == 'true'
strategy:
matrix:
os: ['macos-12', 'macos-14']
os: ['macos-13', 'macos-15']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -362,7 +366,7 @@ jobs:
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: tket-dynamic-macos-12
key: tket-dynamic-macos
- name: further ccache config
run: |
ccache --set-config base_dir=${HOME}
Expand Down Expand Up @@ -399,11 +403,15 @@ jobs:
if: github.event_name == 'schedule'
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.13'
- name: Build pytket
run: |
cd pytket
python -m pip install -e .[ZX] -v
if python --version | grep -q '3.13' ; then
pip install -e . -v
else
pip install -e .[ZX] -v
fi
- name: Run doctests
run: |
cd pytket
Expand All @@ -415,7 +423,7 @@ jobs:
python -m pip install -r requirements.txt
python -m pytest --ignore=simulator/
- name: Check type stubs are up-to-date and run mypy
if: matrix.os == 'macos-14' && (github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch')
if: matrix.os == 'macos-15' && (github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch')
run: |
python -m pip install -U mypy pybind11-stubgen
cd pytket
Expand Down Expand Up @@ -527,11 +535,16 @@ jobs:
if: github.event_name == 'schedule'
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.13'
- name: Build pytket
shell: bash
run: |
cd pytket
pip install -e .[ZX] -v
if python --version | grep -q '3.13' ; then
pip install -e . -v
else
pip install -e .[ZX] -v
fi
- name: Run doctests
run: |
cd pytket
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_libs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
if: ${{ needs.changes.outputs.libs != '[]' && needs.changes.outputs.libs != '' }}
strategy:
matrix:
os: ['ubuntu-24.04', 'macos-12', 'windows-2022', 'macos-14']
os: ['ubuntu-24.04', 'macos-13', 'macos-15', 'windows-2022']
lib: ${{ fromJson(needs.changes.outputs.libs) }}
build_type: ['Release', 'Debug']
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
name: Build
strategy:
matrix:
os: ['ubuntu-24.04', 'macos-12', 'windows-2022', 'macos-14']
os: ['ubuntu-24.04', 'macos-13', 'macos-14', 'macos-15', 'windows-2022']
runs-on: ${{ matrix.os }}
steps:

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pytket_benchmarking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
run: |
conan profile detect
DEFAULT_PROFILE_PATH=`conan profile path default`
PROFILE_PATH=./conan-profiles/macos-14
PROFILE_PATH=./conan-profiles/macos-15
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
Expand All @@ -57,7 +57,7 @@ jobs:

compile-and-compare:
name: Compile and compare
runs-on: macos-14
runs-on: macos-15
needs: build_wheels

steps:
Expand Down
49 changes: 22 additions & 27 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-24.04
strategy:
matrix:
python3-version: ['10', '11', '12']
python3-version: ['10', '11', '12', '13']
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -41,7 +41,7 @@ jobs:
runs-on: 'buildjet-8vcpu-ubuntu-2204-arm'
strategy:
matrix:
python3-version: ['10', '11', '12']
python3-version: ['10', '11', '12', '13']
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -64,10 +64,10 @@ jobs:

build_macos_x86_wheels:
name: Build macos x86 wheels
runs-on: macos-12
runs-on: macos-13
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -83,7 +83,7 @@ jobs:
run: |
conan profile detect
DEFAULT_PROFILE_PATH=`conan profile path default`
PROFILE_PATH=./conan-profiles/macos-12
PROFILE_PATH=./conan-profiles/macos-13
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
Expand All @@ -94,8 +94,8 @@ jobs:
conan create recipes/pybind11
conan create recipes/pybind11_json/all --version 0.2.14
cd pytket
# Ensure wheels are compatible with MacOS 12.0 and later:
export WHEEL_PLAT_NAME=macosx_12_0_x86_64
# Ensure wheels are compatible with MacOS 13.0 and later:
export WHEEL_PLAT_NAME=macosx_13_0_x86_64
pip install -U pip build delocate
python -m build
delocate-wheel -v -w "$GITHUB_WORKSPACE/wheelhouse/" "dist/pytket-"*".whl"
Expand All @@ -106,12 +106,12 @@ jobs:

build_macos_arm64_wheels:
name: Build macos arm64 wheels
runs-on: macos-14
runs-on: macos-15
env:
MACOSX_DEPLOYMENT_TARGET: '12.0'
MACOSX_DEPLOYMENT_TARGET: '13.0'
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -127,7 +127,7 @@ jobs:
run: |
conan profile detect
DEFAULT_PROFILE_PATH=`conan profile path default`
PROFILE_PATH=./conan-profiles/macos-14
PROFILE_PATH=./conan-profiles/macos-15
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
Expand All @@ -138,8 +138,8 @@ jobs:
conan create recipes/pybind11
conan create recipes/pybind11_json/all --version 0.2.14
cd pytket
# Ensure wheels are compatible with MacOS 12.0 and later:
export WHEEL_PLAT_NAME=macosx_12_0_arm64
# Ensure wheels are compatible with MacOS 13.0 and later:
export WHEEL_PLAT_NAME=macosx_13_0_arm64
python${{ matrix.python-version }} -m pip install -U pip build delocate
python${{ matrix.python-version }} -m build
delocate-wheel -v -w "$GITHUB_WORKSPACE/wheelhouse/" "dist/pytket-"*".whl"
Expand All @@ -153,7 +153,7 @@ jobs:
runs-on: windows-2022
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -194,7 +194,7 @@ jobs:
runs-on: ubuntu-24.04
strategy:
matrix:
python3-version: ['10', '11', '12']
python3-version: ['10', '11', '12', '13']
steps:
- name: Set up Python 3.${{ matrix.python3-version }}
uses: actions/setup-python@v5
Expand Down Expand Up @@ -223,18 +223,13 @@ jobs:
runs-on: 'buildjet-4vcpu-ubuntu-2204-arm'
strategy:
matrix:
python3-version: ['10', '11', '12']
python3-version: ['10', '11', '12', '13']
steps:
- uses: actions/checkout@v4
with:
path: tket
- name: Set up Python 3.${{ matrix.python3-version }}
# Use deadsnakes/action because Python for Linux/ARM is not available with
# actions/setup-python.
# Python 3.10 is the default python on Ubuntu 22.04, so this combination
# is not available from deadsnakes: use the default python in this case.
if: matrix.python3-version != '10'
uses: deadsnakes/[email protected]
uses: actions/setup-python@v5
with:
python-version: "3.${{ matrix.python3-version }}"
- name: Download wheel
Expand All @@ -259,8 +254,8 @@ jobs:
needs: build_macos_x86_wheels
strategy:
matrix:
os: ['macos-12', 'macos-13']
python-version: ['3.10', '3.11', '3.12']
os: ['macos-13']
python-version: ['3.10', '3.11', '3.12', '3.13']
runs-on: ${{ matrix.os }}
steps:
- name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -289,8 +284,8 @@ jobs:
needs: build_macos_arm64_wheels
strategy:
matrix:
os: ['macos-13-xlarge', 'macos-14']
python-version: ['3.10', '3.11', '3.12']
os: ['macos-14', 'macos-15']
python-version: ['3.10', '3.11', '3.12', '3.13']
runs-on: ${{ matrix.os }}
steps:
- name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -320,7 +315,7 @@ jobs:
runs-on: windows-2022
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12', '3.13']
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_libs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ['ubuntu-24.04', 'macos-12', 'windows-2022', 'macos-14']
os: ['ubuntu-24.04', 'macos-13', 'macos-15', 'windows-2022']
lib: ${{ fromJson(needs.set_libs_matrix.outputs.libs) }}
runs-on: ${{ matrix.os }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_libs_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
name: test library
strategy:
matrix:
os: ['ubuntu-24.04', 'macos-12', 'windows-2022', 'macos-14']
os: ['ubuntu-24.04', 'macos-13', 'macos-15', 'windows-2022']
lib: ['tklog', 'tkassert', 'tkrng', 'tktokenswap', 'tkwsm']
runs-on: ${{ matrix.os }}
steps:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ depend on the features they support. The compiler version can be controlled by
setting `CC` and `CXX` in your environment (e.g. `CC=gcc-11` and `CXX=g++-11`),
or on Debian-based Linux systems using `update-alternatives`.

You should also have Python (3.10, 3.11 or 3.12) and `pip` installed. We use
`cmake` and the package manager `conan` to build tket and pytket. The latter can
be installed with `pip`:
You should also have Python (3.10, 3.11, 3.12 or 3.13) and `pip` installed. We
use `cmake` and the package manager `conan` to build tket and pytket. The latter
can be installed with `pip`:

```shell
pip install conan
Expand Down
8 changes: 8 additions & 0 deletions conan-profiles/macos-13
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[settings]
arch=x86_64
build_type=Release
compiler=apple-clang
compiler.cppstd=gnu17
compiler.libcxx=libc++
compiler.version=15
os=Macos
8 changes: 8 additions & 0 deletions conan-profiles/macos-15
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[settings]
arch=armv8
build_type=Release
compiler=apple-clang
compiler.cppstd=gnu17
compiler.libcxx=libc++
compiler.version=16
os=Macos
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
(import ./nix-support/symengine.nix)
(import ./nix-support/tket.nix)
(import ./nix-support/third-party-python-packages.nix)
(import ./nix-support/pytket.nix { package_version = "1.33.0"; })
(import ./nix-support/pytket.nix { package_version = "1.34.0"; })
];
};
in {
Expand Down
Loading