Skip to content

Commit

Permalink
Add support for Python 3.12 (#1359)
Browse files Browse the repository at this point in the history
### Summary

Now that Aer supports Python 3.12 starting with 0.13.2
(Qiskit/qiskit-aer#2022), we should be able to
support it as well. The only code change needed was to update the
deprecated usage of `datetime.datetime.utcnow()` to
`datetime.datetime.now(datetime.UTC)`. I added a python version checker
to handle this since `datetime.UTC` was only introduced in 3.11.

---------

Co-authored-by: Will Shanks <[email protected]>
  • Loading branch information
coruscating and wshanks authored Jan 19, 2024
1 parent c536026 commit 0ee4889
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cron-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.8, "3.11"]
python-version: [3.8, "3.12"]
os: ["ubuntu-latest", "macOS-latest", "windows-latest"]
steps:
- name: Print Concurrency Group
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.8, "3.11"]
python-version: [3.8, "3.12"]
os: ["ubuntu-latest", "macOS-latest", "windows-latest"]
steps:
- name: Print Concurrency Group
Expand Down
3 changes: 1 addition & 2 deletions docs/tutorials/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ Installation

Qiskit Experiments is built on top of Qiskit, so we recommend that you first install
Qiskit following its `installation guide <https://docs.quantum.ibm.com/start/install>`__. Qiskit
Experiments supports the same platforms as Qiskit itself and Python versions 3.8,
3.9, 3.10, and 3.11.
Experiments supports the same platforms as Qiskit itself and Python versions 3.8 through 3.12.

Qiskit Experiments releases can be installed via the Python package manager ``pip``
in your shell environment:
Expand Down
2 changes: 1 addition & 1 deletion requirements-extras.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
qiskit-ibm-provider>=0.6.1 # for submitting experiments to backends through the IBM provider
cvxpy>=1.3.2 # for tomography
scikit-learn # for discriminators
qiskit-aer>=0.11.0
qiskit-aer>=0.13.2
qiskit_dynamics>=0.4.0 # for the PulseBackend
1 change: 1 addition & 0 deletions setup.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
],
keywords="qiskit sdk quantum",
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
minversion = 3.3.0
envlist = py311,py310,py39,py38,lint
envlist = py312,py311,py310,py39,py38,lint
isolated_build = true

[testenv]
Expand Down

0 comments on commit 0ee4889

Please sign in to comment.