Note: I am not the original author of this code, this is here for me to compare results against. twoqubitec The simulation source code for arXiv:1705.02329 [quant-ph].