Result Storage and Retrieval

VTT QX stores job results exactly as the quantum computer returns them, whatever their size. Results are kept compressed and sent to you compressed, so large results take less storage and download faster. The original result of a circuit job, with every individual shot, is deleted after a retention period, after which the job can only be fetched as measurement counts.

How Results Are Stored

Since VTT QX 1.3.0, jobs keep their full results:

  • Circuit jobs: the individual measurement shots and their aggregated counts.
  • Pulse jobs: the sweep results.

Results are compressed with gzip.

Retention Period

The original result of a circuit job, with every individual shot, is kept for 7 days after the job finishes. When this retention period ends, the original result is deleted and only the measurement counts remain. The job is then marked as converted (see Checking Whether Results Were Converted).

After the retention period:

  • Only the measurement counts can be fetched, with IQMClient.get_job_measurement_counts.
  • Anything that needs the individual shots fails, including IQMClient.get_job_measurements, Qiskit job.result() (also when you only call get_counts()) and the Cirq IQMSampler results.

Download the individual shots within the retention period if you need them later.

Pulse job sweep results are not affected and are kept.

Retrieving Results

Within the retention period you can retrieve either the individual shots or the counts:

from iqm.iqm_client import IQMClient

client = IQMClient("https://qx.vtt.fi", quantum_computer="<device_name>")

# Individual shots, only within the retention period
measurements = client.get_job_measurements("<job_id>")

# Counts, available at any time
counts = client.get_job_measurement_counts("<job_id>")

With Qiskit, job.result() downloads the individual shots, so it only works within the retention period:

result = job.result()
counts = result.get_counts()

Counts give the frequency of each measured bitstring for each circuit in the job (e.g., {"00": 672, "11": 15563}).

Converted Results

A circuit job is converted once its retention period ends: its original result is deleted and only the counts remain. Before VTT QX 1.3.0, circuit job results larger than 10MB were also converted when the job finished. For converted jobs the individual shots are no longer available.

Checking Whether Results Were Converted

In the QX web interface, the job details show the result type as either:

  • Raw: Results are in full format with individual measurement shots available
  • Converted: Results have been converted to counts format

Result status indicator in the job details panel

Through the REST API, the job response includes the is_converted_measurement flag:

{
  "is_converted_measurement": false
}
  • false: Individual measurement shots are available
  • true: Results have been converted to counts format

Retrieving Converted Results

A converted job can only be fetched with get_job_measurement_counts. This also applies to jobs submitted through Qiskit or Cirq, whose own result methods need the individual shots:

from iqm.iqm_client import IQMClient

client = IQMClient("https://qx.vtt.fi", quantum_computer="<device_name>")
counts = client.get_job_measurement_counts("<job_id>")

get_job_measurements and Qiskit job.result() fail for a converted job with an error saying to use the measurement counts instead.