pygsti.extras.paritybenchmarking.disturbancecalc.RegularizedDeltaLikelihood

pygsti.extras.paritybenchmarking.disturbancecalc.RegularizedDeltaLikelihood#

class RegularizedDeltaLikelihood(data_p, data_q, solver='CLARABEL')#

Bases: object

The max - log-likelihood regularized by a “fixed-transition-matrix residual TVD”. The ‘alpha’ parameter determines the strength of the regularizaton. The objective function is:

(max_logL - logL) + alpha * fixed_T_residual_tvd

Initialize a RegularizedLikelihood function object.

Parameters:
  • data_p (numpy array) – Arrays of outcome counts from the reference and test experiments, respectively. Each array has one element per 2^n_bits bit string.

  • data_q (numpy array) – Arrays of outcome counts from the reference and test experiments, respectively. Each array has one element per 2^n_bits bit string.

  • solver (str, optional) – The name of the solver to used (see cvxpy.installed_solvers())

Methods

__init__(data_p, data_q[, solver])

Initialize a RegularizedLikelihood function object.

__call__(log10_alpha, tmx, verbosity=1, warn=True)#

Computes the regularized log-likelihood: (max_logL - logL) + alpha * fixed_T_residual_tvd

Parameters:
  • log10_alpha (float) – log10(alpha), where alpha sets the strength of the regularization.

  • T (numpy array) – The (fixed) transition matrix used in fixed_T_residual_tvd.

  • verbosity (int, optional) – Sets the level of detail for messages printed to the console (higher = more detail).

  • warn (bool, optional) – Whether warning messages should be issued if problems are encountered.

Return type:

float