- Ian Hincks
- Joel J. Wallman
- Chris Ferrie
- Chris Granade
- David G. Cory
This repository contains all source code necessary to reproduce the results found in the paper Bayesian Inference for Randomized Benchmarking Protocols. Plase submit questions about using this repository as GitHub issues.
Both Mathematica and Python are used. Mathematica is used for sequence re-use derivations and plots, generating survival distributions, and deriving beta reparameterizations. Python is used for all fitting, including the CDPBM model, beta-model, and bootstrapping.
File extensions .nb
are to be run with Wolfram Mathematica 11 (though earlier and later versions will likely work too). As this is paid software, we have also made the notebooks available in the .cdf
format where they can be viewed, but not modified, using the free Wolfram CDF Player.
The following third party Mathematica packages are required to run these notebooks:
All code is run from Jupyter notebooks. These notebooks can be viewed online by browsing the GitHub tree structure above, opening files with the .ipynb
extension. See the manifests below to figure out which file does what.
To run or modify these notebooks on your own computer, we recommend using a conda virtual environment to install dependencies:
$ conda env create -f environment.yml
Alternatively with pip:
$ pip install -r requirements.txt
Or with pip and virtualenv:
$ virtualenv env/
$ env/scripts/activate.sh # Use ".ps1" instead of ".sh" on Windows.
$ pip install -r requirements.txt
- Figure 1:
src/sequence-reuse-calculations.*
, subsection "Weighted Cramer-Rao Bound Plots" - Figure 2:
src/sequence-reuse-calculations.*
, subsection "Generalization to Finite Switching Cost" - Figure 3:
src/rb-dp-different_noise_models.ipynb
, subsection "Dirichlet Process based Stan Model" - Figure 4:
src/rb-dp-different_noise_models.ipynb
, subsection "Comparison Plots" - Figure 5:
src/rb-dp-different_noise_models.ipynb
, subsection "Comparison Plots" - Figure 6:
src/rb-dp-different_noise_models.ipynb
, subsection "Plots" - Figure 7:
src/rb-dp-pathological_model.ipynb
- Figure 8:
src/lrb.ipynb
- Table 2:
src/beta-reparameterizations.*