pygsti.objects.GateSet.bulk_fill_probs¶
-
GateSet.
bulk_fill_probs
(mxToFill, spam_label_rows, evalTree, clipTo=None, check=False, comm=None)¶ Identical to bulk_probs(...) except results are placed into rows of a pre-allocated array instead of being returned in a dictionary.
Specifically, the probabilities for all gate strings and a given SPAM label are placed into the row of mxToFill specified by spam_label_rows[spamLabel].
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 (i.e. evalTree.num_final_strings())
- 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.
- evalTree (EvalTree) – given by a prior call to bulk_evaltree. Specifies the gate strings to compute the bulk operation on.
- clipTo (2-tuple, optional) – (min,max) to clip return value if not None.
- check (boolean, optional) – If True, perform extra checks within code to verify correctness, generating warnings when checks fail. Used for testing, and runs much slower when True.
- comm (mpi4py.MPI.Comm, optional) – When not None, an MPI communicator for distributing the computation across multiple processors. Distribution is performed over subtrees of evalTree (if it is split).
Returns: Return type: None