qat.core.wrappers.result.aggregate_data

qat.core.wrappers.result.aggregate_data(result, threshold=1e-10)

Aggregate the data in result.raw_data, i.e compute frequency of each state and corresponding error bar, and add “nbshots” to result.meta_data

Parameters
  • result (ThriftResult) – the result

  • threshold (float, optional) – if its frequency is under this threshold, we do not report the corresponding state. Defaults to 1e-10.

Returns

the result with aggregated data

Return type

ThriftResult

Note

the error is the estimate of the standard error on the mean \(\varepsilon_{k}\equiv\sqrt{\langle\left(p_{k}-f_{k}\right)^{2}\rangle}\), where \(p_k\) is the true probability of obtaining state \(k\) and :math`f_k` its estimate.