QuantumProgramResult

class samplomatic.quantum_program.QuantumProgramResult(data: Sequence[dict[str, ndarray] | QuantumProgramItemResult], passthrough_data: list[list[DataTree] | dict[str, DataTree] | ndarray[float] | str | float | int | bool | None] | dict[str, list[DataTree] | dict[str, DataTree] | ndarray[float] | str | float | int | bool | None] | ndarray[float] | str | float | int | bool | None = None)[source]

Bases: object

A container to store results from executing a QuantumProgram.

Parameters:
  • data – A list of dictionaries with array-valued data.

  • passthrough_data – Arbitrary nested data passed through execution without modification.

Attributes Summary

timing

Execution timing information of these results.

Attributes Documentation

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 samplomatic.visualization.draw_chunk_timings 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.