ExecutionSpans
class ExecutionSpans(spans)
Bases: object
A collection of timings for pub results.
This class is a list-like containing ExecutionSpan
s, where each execution span represents a time window of data collection, and contains a reference to exactly which of the data were collected during the window.
It is possible for distinct time windows to overlap. This is not because a QPU was performing multiple executions at once, but is instead an artifact of certain classical processing that may happen concurrently with quantum execution. The guarantee being made is that the referenced data definitely occurred in the reported execution span, but not necessarily that the limits of the time window are as tight as possible.
Attributes
Parameters
spans (Iterable[ExecutionSpan])
duration
The total duration of this collection, in seconds.
pub_idxs
Which pubs, by index, have dependence on one or more execution spans present.
start
The start time of the entire collection, in UTC.
stop
The stop time of the entire collection, in UTC.
Methods
__getitem__
__len__
draw
draw(name=None, normalize_y=False, line_width=4)
Draw these execution spans.
To draw multiple sets of execution spans at once, for example coming from multiple jobs, consider calling draw_execution_spans()
directly.
Parameters
- name (str) – The name of this set of spans.
- normalize_y (bool) – Whether to display the y-axis units as a percentage of work complete, rather than cumulative shots completed.
- line_width (int) – The thickness of line segments.
Returns
A plotly figure.
Return type
PlotlyFigure
filter_by_pub
filter_by_pub(pub_idx)
Return a new set of spans where each one has been filtered to the specified pubs.
See also :meth:~.ExecutionSpan.filter_by_pub`.
Parameters
pub_idx (int | Iterable[int]) – One or more pub indices to filter.
Return type
sort
sort(inplace=True)
Return the same execution spans, sorted.
Sorting is done by the start
timestamp of each execution span.
Parameters
inplace (bool) – Whether to sort this instance in place, or return a copy.
Returns
This instance if inplace
, a new instance otherwise, sorted.
Return type