Fig. 7: Code. | npj Quantum Information