pygsti.objects.GateSet.bulk_fill_dprobs

GateSet.bulk_fill_dprobs(mxToFill, spam_label_rows, evalTree, prMxToFill=None, clipTo=None, check=False, comm=None, wrtBlockSize=None)

Identical to bulk_dprobs(...) except results are placed into rows of a pre-allocated array instead of being returned in a dictionary.

Specifically, the probability derivatives for all gate strings and a given SPAM label are placed into mxToFill[ spam_label_rows[spamLabel] ]. Optionally, probabilities can be placed into prMxToFill[ spam_label_rows[spamLabel] ]

Parameters:
  • mxToFill (numpy array) – an already-allocated KxSxM numpy array, where K is larger than the maximum value in spam_label_rows, S is equal to the number of gate strings (i.e. evalTree.num_final_strings()), and M is the length of the vectorized gateset.
  • 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.
  • prMxToFill (numpy array, optional) – when not None, an already-allocated KxS numpy array that is filled with the probabilities as per spam_label_rows, similar to bulk_fill_probs(...).
  • clipTo (2-tuple, optional) – (min,max) to clip returned probability to if not None. Only relevant when prMxToFill is 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 first performed over subtrees of evalTree (if it is split), and then over blocks (subsets) of the parameters being differentiated with respect to (see wrtBlockSize).
  • wrtBlockSize (int, optional) – The maximum number of derivative columns to compute products for simultaneously. None means compute all columns at once. The minimum of wrtBlockSize and the size that makes maximal use of available processors is used as the final block size. Use this argument to reduce amount of intermediate memory required.
Returns:

Return type:

None