iqm.qrisp_iqm.passes.routing.core.sabre_metric.compute_depth_array

iqm.qrisp_iqm.passes.routing.core.sabre_metric.compute_depth_array#

iqm.qrisp_iqm.passes.routing.core.sabre_metric.compute_depth_array(front_layer_indices: list[int], extended_set: list[int], instruction_data: ndarray, N: tuple) → ndarray#

Precompute the depth array.

Computes for a given combination of front layer and extended set.

Parameters:
  • front_layer_indices (list[int]) – A list of integers indicating which entries of instruction data constitute the front layer.

  • extended_set (list[int]) – A list of integers indicating which entries of instruction data constitute the extended set.

  • instruction_data (np.ndarray) – An array describing what instructions are available globally (see graph_processing_tools for more details).

  • N (tuple) – A topology tuple (indptr, indices, distance_matrix, predecessors) as returned by connectivity_to_topology(). The distance matrix at N[2] determines the output dtype (int16 on NISQ-scale devices).

Returns:

depth_array – An array indicating what layer each instruction from the front layer and extended set lives in.

Return type:

np.ndarray