Python package for simulation and visualization of quantum error-correction on surface codes. The package provides the ability to inspect the error-correcting code during the decoding process, and tools to benchmark the decoder.
Exception: cannot handle a non-unique multi-index!
This is because sim.py appends decoder data to a pandas MultiIndex through a floating point, introducing slight variations depending on how this value is read.
Proposed solution
Write the p column as data, not as an index. Replace with labels that can be uniquely defined, e.g. integers.
Steps to reproduce
python run_threshold.py uf toric 1000 -l 8 10 12 -p 0.09 0.10 0.11
(directly from README)python run_threshold.py uf toric 1000 -l 8 9 10 12 -p 0.09 0.10 0.11
Issues
toric_graph_2D_uf_.csv
contains seemingly duplicate rows where thep
index is the same, i.e.L,p,N,succes 8,0.09,1000.0,816.0 8,0.09,2000.0,1588.0 8,0.1,1000.0,732.0 8,0.1,2000.0,1470.0 8,0.11,1000.0,627.0 8,0.11,2000.0,1272.0 10,0.09,0.0,0.0 10,0.09,1000.0,795.0 10,0.1,0.0,0.0 10,0.1,1000.0,710.0 10,0.11,0.0,0.0 10,0.11,1000.0,659.0 12,0.09,0.0,0.0 12,0.09,1000.0,819.0 12,0.1,0.0,0.0 12,0.1,1000.0,721.0 12,0.11,0.0,0.0 12,0.11,1000.0,638.0
Exception: cannot handle a non-unique multi-index!
This is because
sim.py
appends decoder data to a pandasMultiIndex
through a floating point, introducing slight variations depending on how this value is read.Proposed solution Write the
p
column as data, not as an index. Replace with labels that can be uniquely defined, e.g. integers.