From 38e30ef3393dffc9194951627551460e01ad1dfc Mon Sep 17 00:00:00 2001 From: Jim Garrison Date: Wed, 25 Dec 2024 22:29:20 -0500 Subject: [PATCH 1/6] Add support for Python 3.13 --- .github/workflows/test_latest_versions.yml | 2 +- pyproject.toml | 2 ++ tox.ini | 8 ++++---- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test_latest_versions.yml b/.github/workflows/test_latest_versions.yml index b19fedc..393c4c1 100644 --- a/.github/workflows/test_latest_versions.yml +++ b/.github/workflows/test_latest_versions.yml @@ -21,7 +21,7 @@ jobs: max-parallel: 4 matrix: os: [ubuntu-latest, macos-latest] - python-version: ["3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] include: - os: windows-latest python-version: "3.12" diff --git a/pyproject.toml b/pyproject.toml index 4ef1368..b4dbc3f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,6 +20,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: Scientific/Engineering :: Physics", ] @@ -42,6 +43,7 @@ quimb = [ # a dependency of quimb. We install kahypar only on platforms # where we have verified that wheels are available on pypi. "kahypar>=1.3.5; (sys_platform == 'linux' or sys_platform == 'darwin') and python_version < '3.13'", + "numba>=0.61.0rc2; python_version == '3.13'", ] quimb-autograd = [ "qiskit-addon-aqc-tensor[quimb]", diff --git a/tox.ini b/tox.ini index 067519c..b26594d 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] minversion = 4.4.3 -envlist = py{39,310,311,312}{,-notebook}, lint, coverage, docs +envlist = py{39,310,311,312,313}{,-notebook}, lint, coverage, docs isolated_build = True [testenv] @@ -14,12 +14,12 @@ extras = commands = pytest {posargs} -[testenv:{,py-,py3-,py39-,py310-,py311-,py312-}aer-only] +[testenv:{,py-,py3-,py39-,py310-,py311-,py312-,py313-}aer-only] extras = test aer -[testenv:{,py-,py3-,py39-,py310-,py311-,py312-}quimb-only] +[testenv:{,py-,py3-,py39-,py310-,py311-,py312-,py313-}quimb-only] extras = test quimb-all @@ -50,7 +50,7 @@ commands = sphinx-alt-text-validator -f qiskit_addon_aqc_tensor nbqa pylint -rn --disable=wrong-import-order,wrong-import-position docs/ -[testenv:{,py-,py3-,py39-,py310-,py311-,py312-}notebook] +[testenv:{,py-,py3-,py39-,py310-,py311-,py312-,py313-}notebook] extras = nbtest notebook-dependencies From 59eef362401a37de2bae748345336bc23a2a87c2 Mon Sep 17 00:00:00 2001 From: Jim Garrison Date: Wed, 25 Dec 2024 22:40:01 -0500 Subject: [PATCH 2/6] Try on ubuntu 22.04 - https://github.com/Qiskit/qiskit-aer/issues/2281 - https://github.com/Qiskit/qiskit-addon-cutting/pull/726 --- .github/workflows/test_latest_versions.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_latest_versions.yml b/.github/workflows/test_latest_versions.yml index 393c4c1..3e43f47 100644 --- a/.github/workflows/test_latest_versions.yml +++ b/.github/workflows/test_latest_versions.yml @@ -21,10 +21,14 @@ jobs: max-parallel: 4 matrix: os: [ubuntu-latest, macos-latest] - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.9", "3.10", "3.11", "3.12"] include: - os: windows-latest python-version: "3.12" + - os: ubuntu-22.04 + python-version: "3.13" + - os: macos-latest + python-version: "3.13" steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} From fa0a048690a95768ade52b1362d11bf84a96ecc3 Mon Sep 17 00:00:00 2001 From: Jim Garrison Date: Wed, 25 Dec 2024 22:53:07 -0500 Subject: [PATCH 3/6] Bump python version allowed for quimb --- pyproject.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b4dbc3f..64f24a1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,13 +36,13 @@ dependencies = [ [project.optional-dependencies] quimb = [ - "quimb>=1.8.4, <2; python_version < '3.13'", - "qiskit-quimb>=0.0.4, <0.1; python_version < '3.13'", - "networkx>=2.3; python_version < '3.13'", + "quimb>=1.8.4, <2; python_version < '3.14'", + "qiskit-quimb>=0.0.4, <0.1; python_version < '3.14'", + "networkx>=2.3; python_version < '3.14'", # The following line silences a warning from cotengra, which is # a dependency of quimb. We install kahypar only on platforms # where we have verified that wheels are available on pypi. - "kahypar>=1.3.5; (sys_platform == 'linux' or sys_platform == 'darwin') and python_version < '3.13'", + "kahypar>=1.3.5; (sys_platform == 'linux' or sys_platform == 'darwin') and python_version < '3.14'", "numba>=0.61.0rc2; python_version == '3.13'", ] quimb-autograd = [ From 74994a4847d43941fddb55a64041fbafeab283b4 Mon Sep 17 00:00:00 2001 From: Jim Garrison Date: Tue, 21 Jan 2025 11:07:05 -0500 Subject: [PATCH 4/6] Remove numba line from pyproject.toml --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 64f24a1..c34a31f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,6 @@ quimb = [ # a dependency of quimb. We install kahypar only on platforms # where we have verified that wheels are available on pypi. "kahypar>=1.3.5; (sys_platform == 'linux' or sys_platform == 'darwin') and python_version < '3.14'", - "numba>=0.61.0rc2; python_version == '3.13'", ] quimb-autograd = [ "qiskit-addon-aqc-tensor[quimb]", From 24bd92febed9d899d1c2048c36bf1acd9fdf669f Mon Sep 17 00:00:00 2001 From: Jim Garrison Date: Tue, 21 Jan 2025 11:55:04 -0500 Subject: [PATCH 5/6] Add release note --- releasenotes/notes/python-3.13-support-293741d17da476f0.yaml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 releasenotes/notes/python-3.13-support-293741d17da476f0.yaml diff --git a/releasenotes/notes/python-3.13-support-293741d17da476f0.yaml b/releasenotes/notes/python-3.13-support-293741d17da476f0.yaml new file mode 100644 index 0000000..524b37e --- /dev/null +++ b/releasenotes/notes/python-3.13-support-293741d17da476f0.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + Support for Python 3.13. From 7ab73eb3311bc616d2eec834fe07233285b932f6 Mon Sep 17 00:00:00 2001 From: Jim Garrison Date: Wed, 22 Jan 2025 20:07:37 -0500 Subject: [PATCH 6/6] Update test_latest_versions.yml --- .github/workflows/test_latest_versions.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/test_latest_versions.yml b/.github/workflows/test_latest_versions.yml index 3e43f47..12f3cae 100644 --- a/.github/workflows/test_latest_versions.yml +++ b/.github/workflows/test_latest_versions.yml @@ -21,13 +21,9 @@ jobs: max-parallel: 4 matrix: os: [ubuntu-latest, macos-latest] - python-version: ["3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] include: - os: windows-latest - python-version: "3.12" - - os: ubuntu-22.04 - python-version: "3.13" - - os: macos-latest python-version: "3.13" steps: - uses: actions/checkout@v4