---
title: DoubleSliceSpan (latest version)
description: API reference for qiskit_ibm_runtime.execution_span.DoubleSliceSpan in the latest version of qiskit-ibm-runtime
source: https://eu-de.quantum.cloud.ibm.com/docs/en/api/qiskit-ibm-runtime/execution-span-double-slice-span
---

# DoubleSliceSpan

*class* `DoubleSliceSpan(start, stop, data_slices)`

[GitHub](https://github.com/Qiskit/qiskit-ibm-runtime/tree/stable/0.49/qiskit_ibm_runtime/execution_span/double_slice_span.py#L33-L92)

Bases: [`ExecutionSpan`](/docs/api/qiskit-ibm-runtime/execution-span-execution-span "qiskit_ibm_runtime.execution_span.execution_span.ExecutionSpan")

An [`ExecutionSpan`](/docs/api/qiskit-ibm-runtime/execution-span-execution-span "qiskit_ibm_runtime.execution_span.ExecutionSpan") for data stored in a sliceable format.

This type of execution span references pub result data by assuming that it is a sliceable portion of the data where the shots are the outermost slice and the rest of the data is flattened. Therefore, for each pub dependent on this span, the constructor accepts two `slice` instances, along with the corresponding shape of the data to be sliced; in contrast to [`SliceSpan`](/docs/api/qiskit-ibm-runtime/execution-span-slice-span "qiskit_ibm_runtime.execution_span.SliceSpan"), this class does not assume that *all* shots for a particular set of parameter values are contiguous in the array of data.

**Parameters**

- **start** (*datetime*) – The start time of the span, in UTC.
- **stop** (*datetime*) – The stop time of the span, in UTC.
- **data\_slices** (*dict\[int, tuple\[ShapeType, slice, slice]]*) – A map from pub indices to `(shape_tuple, flat_shape_slice, shots_slice)`.

## Attributes

### duration

The duration of this span, in seconds.

### pub\_idxs

Which pubs, by index, have dependence on one or more execution spans present.

### size

The total number of results with dependence on this execution span, across all pubs.

### start

The start time of the span, in UTC.

### stop

The stop time of the span, in UTC.

## Methods

### contains\_pub

`contains_pub(pub_idx)`

[GitHub](https://github.com/Qiskit/qiskit-ibm-runtime/tree/stable/0.49/qiskit_ibm_runtime/execution_span/execution_span.py#L117-L127)

Return whether the pub with the given index has data with dependence on this span.

**Parameters**

**pub\_idx** (*int | Iterable\[int]*) – One or more pub indices from the original primitive call.

**Returns**

Whether there is dependence on this span.

**Return type**

bool

### filter\_by\_pub

`filter_by_pub(pub_idx)`

[GitHub](https://github.com/Qiskit/qiskit-ibm-runtime/tree/stable/0.49/qiskit_ibm_runtime/execution_span/double_slice_span.py#L88-L92)

Return a new set of spans where each one has been filtered to the specified pubs.

**Parameters**

**pub\_idx** (*int | Iterable\[int]*)

**Return type**

[DoubleSliceSpan](#qiskit_ibm_runtime.execution_span.DoubleSliceSpan "qiskit_ibm_runtime.execution_span.DoubleSliceSpan")

### mask

`mask(pub_idx)`

[GitHub](https://github.com/Qiskit/qiskit-ibm-runtime/tree/stable/0.49/qiskit_ibm_runtime/execution_span/double_slice_span.py#L78-L86)

Return array-valued mask specifying which parts of a pub result depend on this span.

**Parameters**

**pub\_idx** (*int*)

**Return type**

npt.NDArray\[np.bool\_]
