iqm.benchmarks.compressive_gst.mgst.additional_fns

iqm.benchmarks.compressive_gst.mgst.additional_fns#

Utility functions used by mGST modules.

Functions

F_avg_X(X, K)

Returns the average gate fidelity between a superoperator and a set of Kraus operators.

Kraus_rep(X, d, pdim, rK)

Compute the Kraus representations for all gates in the gate set.

MVE(gates_true, gates_estimate, d, length, ...)

Mean varation error between the outputs of two gate sets on random sequences.

Mp_norm(gates_true, gates_estimate, d, length, p)

Mean of the p-norm deviation between the outputs of two gate sets on random sequences.

basis(size, index)

Creates standard basis vectors.

batch(y, J, bsize)

Returns random batch of sequences and corresponding measurements.

depol(pdim, p)

Kraus representation of depolarizing channel.

generate_fids(d, length, m_f)

Generate random fiducial sequencecs.

local_dephasing_pp(prob_vec)

Returns the tensor product of single qubit dephasing channels in Pauli basis.

multikron(matrix_array)

Computes the Kronecker product of all matrices in an array.

n_params(pdim, d, rK, n_povm)

Returns the number of free parameters in a gate set.

outcome_probs_from_files(folder_name, ...)

Searches a specified folder for .txt files containing circuit outcomes and combines the results.

perturbed_target_init(X_target, rK)

Generates a small random noise gate around the identity and applies it to the target gate.

randHerm(n)

Generate random square hermitian matrix.

randHermGS(d, r)

Generates random set of operators that are hermiticity preserving.

randKrausSet(d, r, rK[, a])

Generates random set of Kraus operators.

randKrausSet_Haar(d, r, rK)

Generates random set of Kraus operators.

randU(n[, a])

Generates random unitary from a random hermitian generator.

randU_Haar(n)

Return a Haar distributed random unitary.

random_gs(d, r, rK, n_povm)

Generates a random gate using the Gaussian unitary ensemble, initial state and POVM.

random_gs_Haar(d, r, rK, n_povm)

Generates a random gate set with gates from Haar random unitaries, initial state and POVM.

random_len_seq(d, min_l, max_l, N)

Generate random gate sequence instructions.

random_seq_design(d, l_min, l_cut, l_max, ...)

Generate a set of random sequences ith given lengths.

randpsd(n[, normalized])

Generate a random positive semidefinite square matrix.

randvec(n)

Generate vector with real and imaginary part drawn from the normal distribution.

sampled_measurements(y, n_samples)

Compute finite sample estimates of input probabilities.

transp(dim1, dim2)

Superoperator of a map that performs the transpose operation.

tvd(X, E, rho, J, y_data)

Return the total variation distance between model probabilities and y_data.