pygsti.extras.paritybenchmarking.disturbancecalc

pygsti.extras.paritybenchmarking.disturbancecalc#

Functions

build_basis(weight, n_bits)

Build a basis of matrices for constructing the transition matrix T = I + sum_i a_i G_i also builds the constraint matrix, C: C .

comprehensive_transition_matrix(v, weight, ...)

Build a generic weight-n transition_matrix

compute_disturbances(n_bits, data_ref, data_test)

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

compute_disturbances_bootstrap_rawdata(...)

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

compute_disturbances_from_bootstrap_rawdata(...)

Compute 1-sigma error bars for a set of disturbances (given by ml_disturbances) using boostrap data.

compute_disturbances_with_confidence(n_bits, ...)

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

compute_ovd_corrected_disturbances(n_bits, ...)

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

compute_ovd_corrected_disturbances_bootstrap_rawdata(...)

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

compute_ovd_corrected_disturbances_noconfidence(...)

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

compute_ovd_over_tvd_ratio(n_bits, data_ref, ...)

TODO: docstring

compute_residual_tvds(n_bits, data_ref, ...)

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

default_cvxpy_args(solver)

interior_tensor_product(mx, dim_a, dim_b[, e])

mx is an operator on two subsystems of dimension dim_a and dim_b mx = sum_i A_i otimes B_i where A_i is an operator on subsystem a and B_i is an operator on subsystem b Return: sum_i A_i otimes e otimes B_i

log_likelihood(data, probs)

Compute log likelihood of a probability distribution over bitstrings given data

matrix_units(dim)

Returns a list of all matrix units of dimension dim

max_log_likelihood(data)

Compute log likelihood of a probability distribution over bitstrings given data

multikron(a)

Kronecker product of all the elements of a

n_matrices_per_weight(weight, n_bits)

The number of submatrices there are for weight

n_parameters(weight, n_bits)

The number of parameters needed to define a complete weight-w transition matrix

n_parameters_per_matrix(weight, n_bits)

The number of parameters needed to define a weight-w transition submatrix on n_bits

nlogp(n, p)

n*log(p) such that if n == 0 the product is 0 too

print_revert_msg(formatted_str, tup, verbosity)

remove_kicked(s)

resample_data(data[, n_data_points, seed])

Sample from the ML probability distrubution of data.

swell(mx, which_bits[, n_bits])

swell_slow(mx, which_bits[, n_bits])

transition_matrix(v, dimension)

Produce a transition matrix of a given dimension given a parameter vector v.

unit_vector(a, b)

Returns the unit vector of length 'b' with the 'a'th element = 1

Classes

ProfileLikelihood(weight, n_bits, data_ref, ...)

The profile likelihood obtained by maximizing the likelihood on level-sets of constant weight-X residual-TVD.

ProfileLikelihoodPlot(profile_likelihood[, ...])

Creates a plot of the profile log-likelihood.

RegularizedDeltaLikelihood(data_p, data_q[, ...])

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.

ResidualTVD(weight, n_bits[, ...])

Computes the "weight-X residual TVD": the TVD between two probability distributions up to weight-X transformations.

ResidualTVDWithConfidence(weight, n_bits, ...)

Residual TVD with error bars given by an assumed-symmetric confidence-region.