Last active
January 12, 2022 10:13
-
-
Save pdc-quantum/a95510775ce5f3091890c8541f276f9b to your computer and use it in GitHub Desktop.
Bayesian vs Frequentist Statistical Model for Randomized Benchmarking
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# curve fit | |
popt, pcov = curve_fit(f = gsp, xdata = x, | |
ydata = np.mean(counts, axis = 0) / shots, | |
sigma = np.std(counts, axis = 0) / shots / np.sqrt(num_samples), | |
absolute_sigma = True, | |
bounds = ([scale - .1, .9, .9, (1. - scale) - .1], | |
[scale + .1, 1., 1., (1. - scale) + .1])) | |
# statistical error on pararameters | |
perr = np.sqrt(np.diag(pcov)) | |
# estimated error of the interleaved gate EPC | |
epc_est = scale*(1. - popt[2]) | |
# statistical error on EPC | |
epc_est_err = scale*perr[2] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment