pygsti.tools.fill_count_vecs¶
-
pygsti.tools.
fill_count_vecs
(mxToFill, spam_label_rows, dataset, gatestring_list)¶ Fill a matrix of counts that is useful for speeding up multiple evaluations of logl(...). Identical to create_count_vec_dict except counts for a given spam label are placed into a row of mxToFill instead of into a returned dictionary.
Parameters: - mxToFill (numpy ndarray) – an already-allocated KxS numpy array, where K is larger than the maximum value in spam_label_rows and S is equal to the number of gate strings (lenght of gatestring_list).
- spam_label_rows (dictionary) – a dictionary with keys == spam labels and values which are integer row indices into mxToFill, specifying the correspondence between rows of mxToFill and spam labels.
- dataset (DataSet) – The dataset to extract counts from.
- gatestring_list (list of (tuples or GateStrings)) – List of the gate strings to extract counts for, which determines the ordering of the counts within each dictionary value.
Returns: Return type: None