iqm.benchmarks.compressive_gst.mgst.low_level_jit.contract

Contents

iqm.benchmarks.compressive_gst.mgst.low_level_jit.contract#

iqm.benchmarks.compressive_gst.mgst.low_level_jit.contract(X: ndarray, j_vec: ndarray) ndarray#

Contract a sequence of matrices in the given order.

This function computes the product of a sequence of matrices specified by the indices in j_vec. The result is the contracted product of the matrices in the given order.

Parameters:
  • X (ndarray) – A 3D array containing the input matrices, of shape (n_matrices, n_rows, n_columns).

  • j_vec (ndarray) – A 1D array of indices specifying the order in which to contract the matrices in X.

Returns:

The contracted product of the matrices specified by the indices in j_vec.

Return type:

ndarray