Client object¶
The module implementing the Client class.
- class qibo_client.qibo_client.Client(token: str, url: str = 'https://cloud.qibo.science')¶
Bases:
objectClass to manage the interaction with the remote server.
- check_client_server_qibo_versions()¶
Check that client and server qibo package installed versions match.
Raise assertion error if the two versions are not the same.
- run_circuit(circuit: Circuit, device: str, project: str = 'personal', nshots: int | None = None, verbatim: bool = False) QiboJob | None¶
Run circuit on the cluster.
- Parameters:
circuit (Circuit) – the QASM representation of the circuit to run
device (str) – the device to run the circuit on.
nshots (int) – number of shots, mandatory for non-simulation devices, defaults to nshots=100 for simulation partitions
verbatim (bool) – If True, attempts to run the circuit without any transpilation. Defaults to False.
wait_for_results (bool) – whether to let the client hang until server results are ready or not. Defaults to True.
- Returns:
the result of the computation. None if the job raised an error.
- Return type:
Optional[QiboJob]
- print_quota_info()¶
Logs the formatted user quota info table.
- print_job_info()¶
Logs the formatted user quota info table.
Job object¶
- class qibo_client.qibo_job.QiboJobStatus(value)¶
Bases:
EnumAn enumeration.
- QUEUEING = 'queueing'¶
- PENDING = 'pending'¶
- RUNNING = 'running'¶
- POSTPROCESSING = 'postprocessing'¶
- SUCCESS = 'success'¶
- ERROR = 'error'¶
- class qibo_client.qibo_job.QiboJob(pid: str, base_url: str = 'https://cloud.qibo.science', headers: Dict[str, str] | None = None, circuit: Circuit | None = None, nshots: int | None = None, device: str | None = None)¶
Bases:
object- refresh()¶
Refreshes job information from server (no results download).
- status() QiboJobStatus¶