Skip to content

Commit

Permalink
fix: use QubitId, QubitPairId
Browse files Browse the repository at this point in the history
  • Loading branch information
changsookim authored and alecandido committed Oct 28, 2024
1 parent 82526b7 commit b96e3b4
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
Expand Up @@ -13,6 +13,7 @@
from qibolab.platform import Platform, create_platform
from qibolab.platform.load import available_platforms
from qibolab.version import __version__ as qibolab_version
from qibolab.qubits import QubitId, QubitPairId


def execute_qasm(circuit: str, platform, initial_state=None, nshots=1000):
Expand Down Expand Up @@ -52,12 +53,12 @@ def __init__(self, platform):
self.compiler = Compiler.default()

@property
def qubits(self) -> list[Union[str, int]]:
def qubits(self) -> list[QubitId]:
"""Returns the qubits in the platform."""
return list(self.platform.qubits)

@property
def connectivity(self) -> list[tuple[Union[str, int], Union[str, int]]]:
def connectivity(self) -> list[QubitPairId]:
"""Returns the list of connected qubits."""
return list(self.platform.pairs)

Expand Down

0 comments on commit b96e3b4

Please sign in to comment.