Skip to content

Commit

Permalink
feat: added verbatim argument to run and post circuit
Browse files Browse the repository at this point in the history
  • Loading branch information
BrunoLiegiBastonLiegi committed Nov 19, 2024
1 parent 65cfc9f commit b001862
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/qibo_client/qibo_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ def run_circuit(
self,
circuit: qibo.Circuit,
device: str,
nshots: int = None,
nshots: T.Optional[int] = None,
verbatim: T.Optional[bool] = False,
) -> T.Optional[
T.Union[
qibo.result.QuantumState,
Expand All @@ -94,7 +95,7 @@ def run_circuit(
"""
self.check_client_server_qibo_versions()
logger.info("Post new circuit on the server")
job = self._post_circuit(circuit, device, nshots)
job = self._post_circuit(circuit, device, nshots, verbatim)

logger.info("Job posted on server with pid %s", self.pid)
logger.info(
Expand All @@ -108,7 +109,8 @@ def _post_circuit(
self,
circuit: qibo.Circuit,
device: str,
nshots: int = None,
nshots: T.Optional[int] = None,
verbatim: T.Optional[bool] = False,
) -> QiboJob:
url = self.base_url + "/api/run_circuit/"

Expand All @@ -117,6 +119,7 @@ def _post_circuit(
"circuit": circuit.raw,
"nshots": nshots,
"device": device,
"verbatim": verbatim,
}
response = QiboApiRequest.post(
url,
Expand Down

0 comments on commit b001862

Please sign in to comment.