pygsti.algorithms.germselection.compute_composite_vector_set_score

pygsti.algorithms.germselection.compute_composite_vector_set_score#

compute_composite_vector_set_score(current_update_cache, vector_update, model=None, num_nongauge_params=None, force_rank_increase=False)#

Compute the score for a germ set when it is not AC against a model.

Normally scores computed for germ sets against models for which they are not AC will simply be astronomically large. This is fine if AC is all you care about, but not so useful if you want to compare partial germ sets against one another to see which is closer to being AC. This function will see if the germ set is AC for the parameters corresponding to the largest N eigenvalues for increasing N until it finds a value of N for which the germ set is not AC or all the non gauge parameters are accounted for and report the value of N as well as the score. This allows partial germ set scores to be compared against one-another sensibly, where a larger value of N always beats a smaller value of N, and ties in the value of N are broken by the score for that value of N.

Parameters:
  • current_update_cache (tuple) – A tuple whose elements are the components of the current update cache for performing a low-rank update. Elements are (pinv(A), proj_A).

  • vector_update (ndarray) – A numpy array corresponding to one half of the low-rank symmetric update to to perform.

  • model (Model, optional) – The model against which the germ set is to be scored. Not needed if partial_deriv_dagger_deriv is provided.

  • num_nongauge_params (int, optional) – Force the number of nongauge parameters rather than rely on automated gauge optimization.

  • force_rank_increase (bool, optional) – Whether to force the greedy iteration to select a new germ that increases the rank of the jacobian at each iteration (this may result in choosing a germ that is sub-optimal with respect to the chosen score function). Also results in pruning in subsequent optimization iterations. Defaults to False.

Returns:

  • CompositeScore – The score for the germ set indicating how many parameters it amplifies and its numerical score restricted to those parameters.

  • rank_increase_flag (bool) – A flag that indicates whether the candidate update germ increases the rank of the overall Jacobian.