Skip to content

Commit

Permalink
🔥 drop Python 3.8 support
Browse files Browse the repository at this point in the history
Signed-off-by: burgholzer <burgholzer@me.com>
  • Loading branch information
burgholzer committed Sep 5, 2024
1 parent cf93f65 commit 033f77f
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ If you have any questions, feel free to contact us via [quantum.cda@xcit.tum.de]
</a>
</p>

QMAP is available via [PyPI](https://pypi.org/project/mqt.qmap/) for Linux, macOS, and Windows and supports Python 3.8 to 3.12.
QMAP is available via [PyPI](https://pypi.org/project/mqt.qmap/) for Linux, macOS, and Windows and supports Python 3.9 to 3.13.

```console
(venv) $ pip install mqt.qmap
Expand Down Expand Up @@ -76,7 +76,7 @@ circ_opt, results = qmap.optimize_clifford(circ)

## System Requirements and Building

The implementation is compatible with any C++17 compiler, a minimum CMake version of 3.19, and Python 3.8+.
The implementation is compatible with any C++17 compiler, a minimum CMake version of 3.19, and Python 3.9+.
Please refer to the [documentation](https://mqt.readthedocs.io/projects/qmap) on how to build the project.

Building (and running) is continuously tested under Linux, macOS, and Windows using the [latest available system versions for GitHub Actions](https://github.com/actions/virtual-environments).
Expand Down
2 changes: 1 addition & 1 deletion docs/source/Installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ In most practical cases (under 64-bit Linux, MacOS incl. Apple Silicon, and Wind
(venv) $ pip install --upgrade pip setuptools wheel
.. warning::
As of version 2.1.0, support for Python 3.7 has been officially dropped.
As of version 2.7.0, support for Python 3.8 has been officially dropped.
We strongly recommend that users upgrade to a more recent version of Python to ensure compatibility and continue receiving updates and support.
Thank you for your understanding.

Expand Down
9 changes: 4 additions & 5 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

nox.options.sessions = ["lint", "tests"]

PYTHON_ALL_VERSIONS = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
PYTHON_ALL_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13"]

# The following lists all the build requirements for building the package.
# Note that this includes transitive build dependencies of package dependencies,
Expand Down Expand Up @@ -100,18 +100,17 @@ def docs(session: nox.Session) -> None:
extra_installs = ["sphinx-autobuild"] if serve else []
session.install(*BUILD_REQUIREMENTS, *extra_installs)
session.install("--no-build-isolation", "-ve.[docs]", "--reinstall-package", "mqt.qmap")
session.chdir("docs")

if args.builder == "linkcheck":
session.run("sphinx-build", "-b", "linkcheck", "source", "_build/linkcheck", *posargs)
session.run("sphinx-build", "-b", "linkcheck", "docs", "docs/_build/linkcheck", *posargs)
return

shared_args = (
"-n", # nitpicky mode
"-T", # full tracebacks
f"-b={args.builder}",
"source",
f"_build/{args.builder}",
"docs",
f"docs/_build/{args.builder}",
*posargs,
)

Expand Down
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ classifiers = [
"Development Status :: 5 - Production/Stable",
"Typing :: Typed",
]
requires-python = ">=3.8"
requires-python = ">=3.9"
dependencies = [
"qiskit[qasm3-import]>=1.0.0",
"rustworkx[all]>=0.14.0",
Expand Down Expand Up @@ -159,7 +159,6 @@ xfail_strict = true
filterwarnings = [
"error",
'ignore:.*datetime\.datetime\.utcfromtimestamp.*:DeprecationWarning:',
'ignore:.*Qiskit with Python 3.8.*:DeprecationWarning:',
'ignore:.*qiskit\.providers\.models.* is deprecated.*:DeprecationWarning:qiskit.*', # Qiskit imports deprecated code (should be resolved in the 1.2.1 release)
'ignore:.*Treating CircuitInstruction as an iterable is deprecated.*:DeprecationWarning:mqt.qcec.*', # Needs a new release of QCEC (should be resolved in 2.7.1)
# we purposely maintain compatibility with the V1 backends until Qiskit removes them in 2.0
Expand All @@ -181,7 +180,7 @@ report.exclude_also = [
[tool.mypy]
files = ["src/mqt", "test/python"]
mypy_path = ["$MYPY_CONFIG_FILE_DIR/src"]
python_version = "3.8"
python_version = "3.9"
warn_unused_configs = true
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
strict = true
Expand Down Expand Up @@ -291,7 +290,7 @@ build = "cp3*"
skip = "*-musllinux*"
archs = "auto64"
test-command = "python -c \"from mqt import qmap\""
test-skip = ["cp38-macosx_arm64", "cp313*"] # skip testing on Python 3.13 until our dependencies are ready
test-skip = ["cp313*"] # skip testing on Python 3.13 until our dependencies are ready
build-frontend = "build[uv]"
free-threaded-support = true

Expand Down
4 changes: 2 additions & 2 deletions src/mqt/qmap/subarchitectures.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import sys
from itertools import combinations
from pathlib import Path
from typing import TYPE_CHECKING, Dict, NewType, Optional, Set, Tuple
from typing import TYPE_CHECKING, NewType, Optional

if TYPE_CHECKING or sys.version_info < (3, 10, 0):
import importlib_resources as resources
Expand All @@ -33,7 +33,7 @@
with contextlib.suppress(TypeError):
Graph: TypeAlias = rx.PyGraph[int, Optional[int]]

PartialOrder = NewType("PartialOrder", Dict[Tuple[int, int], Set[Tuple[int, int]]])
PartialOrder = NewType("PartialOrder", dict[tuple[int, int], set[tuple[int, int]]])

#: Architectures for which precomputed orderings are available
precomputed_backends = ["rigetti_16", "ibm_guadalupe_16"]
Expand Down
3 changes: 2 additions & 1 deletion src/mqt/qmap/visualization/search_visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
from __future__ import annotations

from tempfile import TemporaryDirectory
from typing import TYPE_CHECKING, Callable, Literal, MutableMapping
from typing import TYPE_CHECKING, Callable, Literal

if TYPE_CHECKING:
import types
from collections.abc import MutableMapping

from typing_extensions import Self

Expand Down
7 changes: 4 additions & 3 deletions src/mqt/qmap/visualization/visualize_search_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@

import json
import re
from collections.abc import Iterable, MutableMapping, Sequence
from copy import deepcopy
from dataclasses import dataclass
from pathlib import Path
from random import shuffle
from typing import TYPE_CHECKING, Callable, Iterable, Literal, MutableMapping, Sequence, Tuple, TypedDict, Union
from typing import TYPE_CHECKING, Callable, Literal, TypedDict, Union

if TYPE_CHECKING:
Position = Tuple[float, float]
Colorscale = Union[str, Sequence[str], Sequence[Tuple[float, str]]]
Position = tuple[float, float]
Colorscale = Union[str, Sequence[str], Sequence[tuple[float, str]]]

class _ActiveTraceIndices(TypedDict):
search_edges: list[int]
Expand Down

0 comments on commit 033f77f

Please sign in to comment.