Skip to content

Commit

Permalink
Remove support for Python 3.9 (#200)
Browse files Browse the repository at this point in the history
* Remove support for Python 3.9

* changelog

* vulnerable dependencies

* ooops

* vulnerable dependency

* retrigger ci

* try again

* happy now?

* clean slate

* try again

* add setuptools

* update

* do it again

* oooops

* update version

* include pennylane as a dependency
  • Loading branch information
astralcai authored Nov 1, 2024
1 parent 8f90a4a commit 715f0c9
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 147 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: "3.10"

- name: Install dependencies
run: pip install black
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']
python-version: ['3.10', '3.11', '3.12']

steps:
- name: Cancel Previous Runs
Expand All @@ -29,7 +29,7 @@ jobs:

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade pip setuptools
pip install -r requirements-ci.txt
pip install qsimcirq
pip install --upgrade git+https://github.com/PennyLaneAI/pennylane.git#egg=pennylane
Expand Down Expand Up @@ -65,11 +65,11 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade pip setuptools
pip install -r requirements-ci.txt
pip install qsimcirq
pip install --upgrade git+https://github.com/PennyLaneAI/pennylane.git#egg=pennylane
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: "3.10"

- name: Build and install Plugin
run: |
Expand Down
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,17 @@
* Fix deprecated import path for `QubitDevice`.
[(#194)](https://github.com/PennyLaneAI/pennylane-cirq/pull/194)
[(#195)](https://github.com/PennyLaneAI/pennylane-cirq/pull/195)

### Breaking changes 💔

* Removed support for Python 3.9
[(#200)](https://github.com/PennyLaneAI/pennylane-cirq/pull/200)

### Contributors ✍️

This release contains contributions from (in alphabetical order):

Astral Cai
Astral Cai,
Alex Preciado

---
Expand Down
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Features
Installation
============

This plugin requires Python version 3.9 or above, as well as PennyLane
This plugin requires Python version 3.10 or above, as well as PennyLane
and Cirq. Installation of this plugin, as well as all dependencies, can be done using ``pip``:

.. code-block:: bash
Expand All @@ -76,11 +76,11 @@ Dependencies

PennyLane-Cirq requires the following libraries be installed:

* `Python <http://python.org/>`__ >= 3.9
* `Python <http://python.org/>`__ >= 3.10

as well as the following Python packages:

* `PennyLane <http://pennylane.readthedocs.io/>`__ >= 0.17
* `PennyLane <http://pennylane.readthedocs.io/>`__ >= 0.29
* `Cirq <https://cirq.readthedocs.io/>`__ >= 0.10.0

To use the qsim and qsimh devices, the qsim-Cirq interface ``qsimcirq`` is required:
Expand Down
77 changes: 2 additions & 75 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,82 +1,9 @@
alabaster==0.7.12
appdirs==1.4.4
attrs==20.3.0
autograd==1.4
autoray==0.3.1
backports.cached-property==1.0.1
Babel==2.9.1
cachetools==5.3
certifi==2023.7.22
charset-normalizer==2.0.12
cirq==1.3.0
cirq-core==1.3.0
cirq-pasqal==1.3.0
cycler==0.10.0
decorator==5.1.1
deprecation==2.1.0
docutils==0.16.0
duet==0.2.8
fonttools==4.32.0
future==0.18.3
google-api-core==2.0.0
google-auth==2.25.2
googleapis-common-protos==1.56.0
idna==2.10
imagesize==1.3.0
importlib-metadata==3.10.1
iniconfig==1.1.1
ipython-genutils==0.2.0
Jinja2==3.1.1
jsonschema==3.2.0
jupyter-core==4.11.2
kiwisolver==1.4.2
MarkupSafe==2.1.1
matplotlib==3.5.1
mpmath==1.3.0
nbformat==5.1.3
networkx==2.6.3
ninja==1.10.2.3
numpy
openfermion==1.3.0
openfermionpyscf==0.5
packaging>=24
pandas==1.3.5
pennylane==0.28.0
PennyLane-Lightning==0.28
Pillow==10.0.1
pluggy==1.0.0
protobuf==3.19.5
PubChemPy==1.0.4
py==1.11.0
Pygments==2.15.0
pyparsing==2.4.7
pyrsistent==0.18.0
pyscf==1.7.6
pytest==6.2.5
python-dateutil==2.8.2
pytz==2021.1
PyYAML==6.0
requests==2.31.0
retworkx==0.11.0
scipy==1.10.0
semantic-version==2.10
six==1.16.0
snowballstemmer==2.2.0
sortedcontainers==2.4.0
Sphinx==4.3.2
sphinx==4.3.2
sphinx-automodapi==0.14.1
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
sympy==1.9
toml==0.10.2
tqdm==4.64.0
traitlets==5.1.0
typing_extensions==4.2.0
urllib3==1.26.18
# Do not pin the following
pennylane-sphinx-theme
zipp==3.8.0
pennylane-sphinx-theme # do not pin this
2 changes: 0 additions & 2 deletions requirements-ci.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
pennylane
cirq-core
cirq-pasqal
numpy
80 changes: 28 additions & 52 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,56 +1,32 @@
appdirs==1.4.4
autograd==1.4
autoray==0.3.1
cachetools==5.3
certifi==2022.12.7
charset-normalizer==2.0.12
cirq==1.3.0
cirq-core==1.3.0
cirq-pasqal==1.3.0
cycler==0.10.0
deprecation==2.1.0
duet==0.2.8
future==0.18.3
google-api-core==1.31.2
googleapis-common-protos==1.53.0
idna==3.3
iniconfig==1.1.1
ipython-genutils==0.2.0
jsonschema==3.2.0
jupyter-core==4.11.2
kiwisolver==1.3.2
matplotlib==3.4.3
attrs==24.2.0
certifi==2024.8.30
charset-normalizer==3.4.0
cirq-core==1.4.1
cirq-pasqal==1.4.1
contourpy==1.3.0
cycler==0.12.1
duet==0.2.9
fonttools==4.54.1
idna==3.10
kiwisolver==1.4.7
matplotlib==3.9.2
mpmath==1.3.0
nbformat==5.1.3
networkx==2.6.3
ninja==1.10.2.3
numpy==1.22.3
openfermion==1.1.0
openfermionpyscf==0.5
packaging==21.0
pandas==1.3.3
networkx==3.4.2
numpy==1.26.4
packaging==24.1
pandas==2.2.3
pennylane==0.29.0
PennyLane-Lightning==0.29.0
Pillow==10.0.1
pluggy==1.0.0
protobuf==3.19.5
PubChemPy==1.0.4
py==1.10.0
pyparsing==2.4.7
pyrsistent==0.18.0
pyscf==1.7.6
pytest==6.2.5
python-dateutil==2.8.2
pytz==2021.1
requests==2.31.0
retworkx==0.11.0
scipy==1.10.0
semantic-version==2.6.0
pillow==11.0.0
pipdeptree==2.23.4
pyparsing==3.2.0
python-dateutil==2.9.0.post0
pytz==2024.2
requests==2.32.3
scipy==1.14.1
six==1.16.0
sortedcontainers==2.4.0
sympy==1.8
toml==0.10.2
tqdm==4.62.2
traitlets==5.1.0
typing_extensions==4.2.0
urllib3==1.26.18
sympy==1.13.3
tqdm==4.66.6
typing_extensions==4.12.2
tzdata==2024.2
urllib3==2.2.3
19 changes: 11 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# 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.
#!/usr/bin/env python3
# !/usr/bin/env python3

import sys
import os
Expand All @@ -35,12 +35,15 @@
"url": "http://xanadu.ai",
"license": "Apache License 2.0",
"packages": ["pennylane_cirq"],
"entry_points": {"pennylane.plugins": ["cirq.simulator = pennylane_cirq:SimulatorDevice",
"cirq.mixedsimulator = pennylane_cirq:MixedStateSimulatorDevice",
"cirq.qsim = pennylane_cirq.qsim_device:QSimDevice",
"cirq.qsimh = pennylane_cirq.qsim_device:QSimhDevice",
"cirq.pasqal = pennylane_cirq:PasqalDevice"],},
# Place a one line description here. This will be shown by pip
"entry_points": {
"pennylane.plugins": [
"cirq.simulator = pennylane_cirq:SimulatorDevice",
"cirq.mixedsimulator = pennylane_cirq:MixedStateSimulatorDevice",
"cirq.qsim = pennylane_cirq.qsim_device:QSimDevice",
"cirq.qsimh = pennylane_cirq.qsim_device:QSimhDevice",
"cirq.pasqal = pennylane_cirq:PasqalDevice"
],
},
"description": "PennyLane plugin for Cirq",
"long_description": open("README.rst").read(),
"long_description_content_type": "text/x-rst",
Expand All @@ -62,9 +65,9 @@
"Programming Language :: Python",
# Make sure to specify here the versions of Python supported
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Scientific/Engineering :: Physics",
]
Expand Down

0 comments on commit 715f0c9

Please sign in to comment.