Skip to content

Commit

Permalink
Add support for py39 (#83)
Browse files Browse the repository at this point in the history
* Add support for py39

* Update source to support py39. Pin a min version for jax/scipy.

* Ruff: target python 3.9

* Tell other linters we are on python 3.9

* We do type checking on python 3.10, so set mypy to use it

This fixes an issue with checking types for jax

* Add python 3.9 to the CI matrix

---------

Co-authored-by: Jim Garrison <[email protected]>
  • Loading branch information
caleb-johnson and garrison authored Oct 10, 2024
1 parent 44ee661 commit a90d78e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_latest_versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
max-parallel: 4
matrix:
os: [ubuntu-latest]
python-version: ["3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
include:
- os: macos-latest
python-version: "3.12"
Expand Down
13 changes: 7 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,23 @@ classifiers = [
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Physics",
]


requires-python = ">=3.10"
requires-python = ">=3.9"

dependencies = [
"qiskit>=1.2",
"numpy>=1.26",
"pyscf>=2.5",
"jaxlib>=0.4.31",
"jax>=0.4.31",
"scipy>=1.14.1",
"jaxlib>=0.4.30",
"jax>=0.4.30",
"scipy>=1.13.1",
]

[project.optional-dependencies]
Expand Down Expand Up @@ -103,7 +104,7 @@ warn_unused_configs = true
ignore_missing_imports = true

[tool.pylint.main]
py-version = "3.10"
py-version = "3.9"

[tool.pylint."messages control"]
disable = ["all"]
Expand All @@ -126,7 +127,7 @@ testpaths = ["./qiskit_addon_sqd/", "./test/"]
[tool.ruff]
line-length = 100
src = ["qiskit_addon_sqd", "test"]
target-version = "py310"
target-version = "py39"

[tool.ruff.lint]
select = [
Expand Down
2 changes: 1 addition & 1 deletion qiskit_addon_sqd/configuration_recovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def recover_configurations(
# First, we need to flip the orbitals such that

corrected_dict: defaultdict[str, float] = defaultdict(float)
for bitstring, freq in zip(bitstring_matrix, probabilities, strict=False):
for bitstring, freq in zip(bitstring_matrix, probabilities):
bs_corrected = _bipartite_bitstring_correcting(
bitstring,
avg_occupancies,
Expand Down

0 comments on commit a90d78e

Please sign in to comment.