diff --git a/graphix/channels.py b/graphix/channels.py index dbea14f5..08a575a6 100644 --- a/graphix/channels.py +++ b/graphix/channels.py @@ -4,8 +4,8 @@ import copy import itertools +import sys import typing -from collections.abc import Sequence from typing import TYPE_CHECKING, SupportsIndex import numpy as np @@ -14,6 +14,11 @@ from graphix import linalg_validations as lv from graphix.ops import Ops +if sys.version_info >= (3, 9): + from collections.abc import Sequence +else: + from typing import Sequence + if TYPE_CHECKING: from collections.abc import Iterable