Skip to main content
IBM Quantum Platform
번역 정보

이 페이지의 추가 언어 번역이 곧 제공될 예정입니다.

ChunkTiming

class samplomatic.quantum_program.ChunkTiming(spans: Iterable[ChunkSpan])

GitHub

Bases: object

A collection of chunk timing information for a QuantumProgramResult.

This class is a readonly list-like containing ChunkSpan objects, where each span represents a single execution chunk on the backend and contains timing information and a description of which parts of the QuantumProgram were executed in that chunk.

To iterate over chunks:

chunk_timings = job.result().timing
for chunk in chunk_timings:
    print(chunk)

To draw the timings for a single result:

chunk_timings.draw()

To draw the timings for several results on one plot:

from samplomatic.visualization.draw_chunk_timings import draw_chunk_timings

draw_chunk_timings(
    chunk_timings1,
    chunk_timings2,
    names=["job 1", "job 2"],
    common_start=True,
)

Attributes Summary

칼럼 1
칼럼 2
durationThe total duration from first start to last stop, in seconds.
startThe start time of the earliest chunk, in UTC.
stopThe stop time of the latest chunk, in UTC.

Methods Summary

칼럼 1
칼럼 2
draw([name, normalize_y, line_width, tz])Draw timing information on a bar plot.

Attributes Documentation

duration

The total duration from first start to last stop, in seconds.

start

The start time of the earliest chunk, in UTC.

stop

The stop time of the latest chunk, in UTC.

Methods Documentation

draw

draw(name: str | None = None, normalize_y: bool = False, line_width: int = 4, tz: timezone | None = None) → PlotlyFigure

GitHub

Draw timing information on a bar plot.

To draw chunk timings with additional options like common_start, or to draw timings of several jobs on the same axis, consider calling draw_chunk_timings() directly.

Parameters

  • name – A label for this set of chunks.
  • normalize_y – Whether to display the y-axis units as a percentage of work complete, rather than cumulative elements completed.
  • line_width – The thickness of line segments.
  • tz – The timezone to use for displaying times. None (default) uses the local system timezone. Pass datetime.timezone.utc to display times in UTC.

Returns

A plotly figure.

이 페이지가 도움이 되었습니까?
GitHub에서 버그, 오타를 보고하거나 컨텐츠를 요청하십시오.