flamingpy.utils.viz.syndrome_plot¶
- flamingpy.utils.viz.syndrome_plot(code, ec, index_dict=None, drawing_opts=None)[source]¶
Draw the syndrome plot for a code.
A comprehensive graphing tool for drawing the error syndrome of code. Labelling options are specified with the help of drawing_opts, and can include:
‘show_nodes’ -> the underlying graph displayed ‘label_nodes’ -> node labels, as per draw_EGraph ‘label_stabilizers’ -> indices of the stabilizers ‘label_boundary’-> indices of the boundary points ‘legend’ -> legends for the nodes and stabilizers
Stabilizers are shown as transparent voxels, green for even parity and red for odd. For now, stabilizers on periodic boundaries are not drawn in a special way, stabilizers on dual boundaries are unshifted from the primal stabilizer location, and incomplete stabilizers are still represented as complete cubes.
- Parameters
code (SurfaceCode) – the qubit QEC code
ec (string) – the error complex (‘primal’ or ‘dual’)
index_dict (dict) – the stabiizer-to-index mapping
drawing_opts (dict) – a dictionary of drawing options, with all possibilities described above.
- Returns
figure and axes
- Return type
tuple