pygsti.extras.paritybenchmarking.disturbancecalc.compute_ovd_corrected_disturbances_noconfidence

pygsti.extras.paritybenchmarking.disturbancecalc.compute_ovd_corrected_disturbances_noconfidence#

compute_ovd_corrected_disturbances_noconfidence(n_bits, data_ref, data_test, p_ideal, max_weight=4, maxiters=20, search_tol=0.1, reltol=1e-05, abstol=1e-05, solver='CLARABEL', initial_treg_factor=0.001, verbosity=1)#

Compute the weight-X distrubances between two data sets (including error bars).

This function is computes the weight-X OVD-corrected disturbances, defined as the scaled difference between the weight-(X-1) and weight-X residual TVDs, for all weights up to max_weight. Each difference is scaled by the ratio of the original variation distance (OVD) and the TVD, that is, multipled by r = OVD/TVD.

Parameters:
  • n_bits (int) – The number of bits (qubits).

  • data_ref (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_test (numpy array) – Arrays of outcome counts from the reference and test experiments, respectively. Each array has one element per 2^n_bits bit string.

  • p_ideal (numpy array) – The ideal probability distribution (of both reference and test experiments).

  • max_weight (int, optional) – The maximum weight disturbance to compute. Typically this is the same as n_bits.

  • maxiters (int, optional) – The maximum number of alternating-minimization iterations to allow within the profile-loglikelihood computation before giving up and deeming the final result “ok”.

  • search_tol (float, optional) – The tolerance on the log-likelihood used when trying to locate the (residualTVD, logL) pair with logL at the edge of the confidence interval.

  • reltol (float, optional) – The relative tolerance used to within profile likelihood.

  • abstol (float, optional) – The absolute tolerance used to within profile likelihood.

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

  • initial_treg_factor (float, optional) – The magnitude of an internal penalty factor on the off-diagonals of the T matrix (see ResidualTVD).

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

Returns:

A list of the OVD-corrected disturbances by weight. The lists i-th element is the weight (i+1) disturbance. The max_weight-th element is the OVD/TVD ratio.

Return type:

list