iqm.qrisp_iqm.passes.routing.core.sabre_metric.precompute_exp_depth

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

iqm.qrisp_iqm.passes.routing.core.sabre_metric.precompute_exp_depth(depth_array: ndarray) → ndarray#

Precompute the decay factor from the depth array.

Parameters:

depth_array (np.ndarray) – The array indicating which layer each instruction is involved in.

Returns:

The precomputed prefactors.

Return type:

np.ndarray