Skip to content

Commit

Permalink
fix: fixed return type hint for run-circuit
Browse files Browse the repository at this point in the history
  • Loading branch information
BrunoLiegiBastonLiegi committed Feb 24, 2025
1 parent 43e2b0c commit b334d46
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
8 changes: 4 additions & 4 deletions examples/run_successful_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@
from qibo_client import Client

# create the circuit you want to run
circuit = qibo.Circuit(17)
circuit = qibo.Circuit(3)
circuit.add(qibo.gates.GPI2(0, 0.0))
circuit.add(qibo.gates.GPI2(1, 0.0))
circuit.add(qibo.gates.GPI2(2, 0.0))
circuit.add(qibo.gates.M(0, 1, 2))

wire_names = [f"A{i}" for i in range(1, 18)]
# wire_names = [f"A{i}" for i in range(1, 18)]

circuit.wire_names = wire_names
# circuit.wire_names = wire_names

circuit.draw()

# read the token from file
token_path = Path(__file__).parent / "token.txt"
token = token_path.read_text()
token = token_path.read_text().replace("\n", "")

# authenticate to server through the client instance
client = Client(token) # , url="http://localhost:8011")
Expand Down
10 changes: 2 additions & 8 deletions src/qibo_client/qibo_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,7 @@ def run_circuit(
project: str = "personal",
nshots: T.Optional[int] = None,
verbatim: bool = False,
) -> T.Optional[
T.Union[
qibo.result.QuantumState,
qibo.result.MeasurementOutcomes,
qibo.result.CircuitResult,
]
]:
) -> T.Optional[QiboJob]:
"""Run circuit on the cluster.
:param circuit: the QASM representation of the circuit to run
Expand All @@ -97,7 +91,7 @@ def run_circuit(
:return:
the result of the computation. None if the job
raised an error.
:rtype: Optional[QiboJobResult]
:rtype: Optional[QiboJob]
"""
self.check_client_server_qibo_versions()
logger.info("Post new circuit on the server")
Expand Down

0 comments on commit b334d46

Please sign in to comment.