pygsti.tools.rbtheory.R_matrix_predicted_rb_decay_parameter

pygsti.tools.rbtheory.R_matrix_predicted_rb_decay_parameter#

R_matrix_predicted_rb_decay_parameter(model, group, group_to_model=None, weights=None)#

Returns the second largest eigenvalue of a generalization of the ‘R-matrix’ [see the R_matrix function].

Introduced in Proctor et al Phys. Rev. Lett. 119, 130502 (2017). This number is a prediction of the RB decay parameter for trace-preserving gates and a variety of forms of RB, including Clifford and direct RB. This function creates a matrix which scales super-exponentially in the number of qubits.

Parameters:
  • model (Model) – The model to predict the RB decay parameter for. If group_to_model is None, the labels of the gates in model should be the same as the labels of the group elements in group. For Clifford RB this would be the clifford model, for direct RB it would be the primitive gates.

  • group (MatrixGroup) – The group that the model model contains gates from (model does not need to be the full group, and could be a subset of group). For Clifford RB and direct RB, this would be the Clifford group.

  • group_to_model (dict, optional) – If not None, a dictionary that maps labels of group elements to labels of model. If model and group elements have the same labels, this dictionary is not required. Otherwise it is necessary.

  • weights (dict, optional) – If not None, a dictionary of floats, whereby the keys are the gates in model and the values are the unnormalized probabilities to apply each gate at each stage of the RB protocol. If not None, the values in weights must all be positive or zero, and they must not all be zero (because, when divided by their sum, they must be a valid probability distribution). If None, the weighting defaults to an equal weighting on all gates, as used in most RB protocols.

Returns:

p – The predicted RB decay parameter. Valid for standard Clifford RB or direct RB with trace-preserving gates, and in a range of other circumstances.

Return type:

float