iqm.benchmarks.compressive_gst.mgst.additional_fns.batch

Contents

iqm.benchmarks.compressive_gst.mgst.additional_fns.batch#

iqm.benchmarks.compressive_gst.mgst.additional_fns.batch(y: ndarray, J: ndarray, bsize: int) tuple[ndarray, ndarray]#

Returns random batch of sequences and corresponding measurements.

Parameters:
  • y (ndarray) – 2D array of measurement outcomes for sequences in J; Each column contains the outcome probabilities for a fixed sequence

  • J (ndarray) – 2D array where each row contains the gate indices of a gate sequence

  • bsize (int) – Size of the batch (number of sequences)

Returns:

Randomly subsampled columns of y J_b: Randomly subsampled rows of J in accordance the the columns selected in y_b

Return type:

y_b