_IQMServerClient#
Module: iqm.iqm_server_client.iqm_server_client
- class iqm.iqm_server_client.iqm_server_client._IQMServerClient(iqm_server_url: str, *, quantum_computer: str | None = None, token: str | None = None, tokens_file: str | None = None, client_signature: str | None = None, enable_opentelemetry: bool = False, timeout: float = 120.0)#
Bases:
objectClient implementation for IQM Server REST API.
Warning
_IQMServerClientis an unstable, private API. It may change without notice. Do not use it outside this package.- Parameters:
iqm_server_url (str) – Remote IQM Server URL to connect to.
quantum_computer (str | None) – ID or alias of the quantum computer to connect to, if the IQM Server instance controls more than one.
token (str | None) – Long-lived IQM token in plain text format.
tokens_file (str | None) – Path to a tokens file used for authentication.
client_signature (str | None) – String that is added to the User-Agent header of requests sent to the server.
enable_opentelemetry (bool) – Iff True, enable Jaeger/OpenTelemetry tracing.
timeout (float) – Timeout for the request in seconds.
Attributes
API version of the IQM Server API this client is using.
Human-readable alias of the quantum computer this client connects to.
Methods
Cancel a job.
Delete a job with the given ID.
Get information about IQM Server.
Get information about Station Control.
Get a calibration set from the database.
Get the latest quality metric set for the given calibration set ID.
Get the channel properties from the quantum computer.
Get the chip design records of the quantum computer.
Get the DUT(s) of the quantum computer.
Get the dynamic quantum architecture for the given calibration set ID.
Get the status of the IQM Server.
Get the current status and metadata of the job.
Get the "measurement_counts" artifact of the given circuit job.
Get the "measurements" artifact of the given circuit job.
Get N-dimensional sweep results from the database for the given sweep job.
Default settings tree of the quantum computer, as defined in the configuration files.
Get the static quantum architecture(s) of the quantum computer.
Get the job payload, i.e. the contents of the run request sent to IQM Server.
Get the job payload, i.e. the contents of the run definition sent to IQM Server.
Validate the connection details, provide some backwards compatibility.
Submit a batch of quantum circuits for execution.
Submit an experiment run for execution.
Submit an N-dimensional sweep for execution.
- static normalize_url(iqm_server_url: str, quantum_computer: str | None) tuple[str, str | None, bool]#
Validate the connection details, provide some backwards compatibility.
- property quantum_computer: str#
Human-readable alias of the quantum computer this client connects to.
- get_settings() SettingNode#
Default settings tree of the quantum computer, as defined in the configuration files.
- Return type:
- get_chip_design_records() list[dict[str, Any]]#
Get the chip design records of the quantum computer.
- get_channel_properties() dict[str, ChannelProperties]#
Get the channel properties from the quantum computer.
Channel properties contain information about the hardware limitations, e.g. the sample rate, granularity and supported instructions for the various control channels.
- get_static_quantum_architectures() list[StaticQuantumArchitecture]#
Get the static quantum architecture(s) of the quantum computer.
- Return type:
- get_calibration_set(calibration_set_id: str | UUID | Literal['default']) ObservationSetWithObservations#
Get a calibration set from the database.
- Parameters:
- Return type:
- get_dynamic_quantum_architecture(calibration_set_id: str | UUID | Literal['default']) DynamicQuantumArchitecture#
Get the dynamic quantum architecture for the given calibration set ID.
- Returns:
Dynamic quantum architecture of the quantum computer for the given calibration set ID.
- Parameters:
- Return type:
- get_calibration_set_quality_metric_set(calibration_set_id: str | UUID | Literal['default']) ObservationSetWithObservations#
Get the latest quality metric set for the given calibration set ID.
- Parameters:
- Return type:
- submit_sweep(sweep_definition: SweepDefinition, *, use_timeslot: bool = False) JobData#
Submit an N-dimensional sweep for execution.
- Parameters:
sweep_definition (SweepDefinition) – The content of the sweep to be created.
use_timeslot (bool) – If
Truesubmit the job to the timeslot queue, otherwise submit it to the shared FIFO queue.
- Returns:
sweep job data, including the job ID that can be used to track it.
- Return type:
Upon successful submission
- submit_run(run_definition: RunDefinition, *, use_timeslot: bool = False) JobData#
Submit an experiment run for execution.
- Parameters:
run_definition (RunDefinition) – The content of the run to be created.
use_timeslot (bool) – If
Truesubmit the job to the timeslot queue, otherwise submit it to the shared FIFO queue.
- Returns:
run job data, including the job ID that can be used to track it.
- Return type:
Upon successful submission
- submit_circuits(run_request: PostJobsRequest, *, use_timeslot: bool = False) JobData#
Submit a batch of quantum circuits for execution.
- Parameters:
run_request (PostJobsRequest) – Circuit execution request.
use_timeslot (bool) – If
Truesubmit the job to the timeslot queue, otherwise submit it to the shared FIFO queue.
- Returns:
circuit job data, including the job ID that can be used to track it.
- Return type:
Upon successful submission
- cancel_job(job_id: str | UUID) None#
Cancel a job.
A canceled job will remain in the server database, but it will not be executed. If the job is currently being executed, it is interrupted. If the job was already executed (or failed), it will remain in its current terminal state.
- delete_job(job_id: str | UUID) None#
Delete a job with the given ID.
Works like
cancel_job(), but also removes the job from the IQM Server database.
- get_submit_run_payload(job_id: str | UUID) RunDefinition#
Get the job payload, i.e. the contents of the run definition sent to IQM Server.
- Parameters:
- Return type:
- get_submit_circuits_payload(job_id: str | UUID) PostJobsRequest#
Get the job payload, i.e. the contents of the run request sent to IQM Server.
- Parameters:
- Return type:
- get_job_artifact_sweep_results(job_id: str | UUID) dict[str, list[ndarray]]#
Get N-dimensional sweep results from the database for the given sweep job.
- get_job_artifact_measurements(job_id: str | UUID) list[dict[str, list[list[int]]]]#
Get the “measurements” artifact of the given circuit job.
- get_job_artifact_measurement_counts(job_id: str | UUID) list[CircuitMeasurementCounts]#
Get the “measurement_counts” artifact of the given circuit job.
- Parameters:
- Return type:
Inheritance
