Skip to main contentIBM Quantum Documentation Mirror

QuantumProgramResult

class QuantumProgramResult(data, metadata=None, passthrough_data=None)

GitHub

Bases: object

A container to store results from executing a QuantumProgram.

Parameters

  • data (Sequence[dict[str, np.ndarray] | QuantumProgramItemResult]) – A list of dictionaries with array-valued data.
  • metadata (Metadata | None) – A dictionary of metadata.
  • passthrough_data (DataTree | None) – Arbitrary nested data passed through execution without modification.

Attributes

timing

Execution timing information of these results.

A single executor job may be broken up into chunks of work that are executed serially. This property stores information about their timing. Most notably, for each chunk of execution, a start and stop timestamp are provided that bound the window in which the data was collected.

To draw the timings for a single result:

job.result().timing.draw()

To draw the timings for several results on one plot:

from qiskit_ibm_runtime.visualization import draw_chunk_timings

draw_chunk_timings(
    job1.result().timing,
    job2.result().timing,
    names=["job 1", "job 2"],
    common_start=True,
)

Returns

A ChunkTiming collection.


Methods

__getitem__

__getitem__(idx)

GitHub

Parameters

idx (int)

Return type

QuantumProgramItemResult

__len__

__len__()

GitHub

Return type

int