Skip to content

Commit

Permalink
fix: type hint for python 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
changsookim authored and alecandido committed Oct 18, 2024
1 parent 62af6c4 commit 199c74c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/qibolab/backends.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from collections import deque
from typing import Union

import numpy as np
from qibo import __version__ as qibo_version
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 199c74c

Please sign in to comment.