From 96e2e003606102edb1530f1e133624e8de552976 Mon Sep 17 00:00:00 2001 From: changsookim <> Date: Fri, 18 Oct 2024 14:34:34 +0400 Subject: [PATCH] fix: type hint for python 3.9 --- src/qibolab/backends.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/qibolab/backends.py b/src/qibolab/backends.py index fc6aa4d9e..5baaa3921 100644 --- a/src/qibolab/backends.py +++ b/src/qibolab/backends.py @@ -1,4 +1,5 @@ from collections import deque +from typing import Union import numpy as np from qibo import __version__ as qibo_version @@ -51,11 +52,11 @@ def __init__(self, platform): self.compiler = Compiler.default() @property - def qubits(self) -> list[str | int]: + def qubits(self) -> list[Union[str, int]]: return list(self.platform.qubits.keys()) @property - def connectivity(self) -> list[tuple[str | int, str | int]]: + def connectivity(self) -> list[tuple[Union[str, int], Union[str, int]]]: return list(self.platform.pairs) @property