surface_sim.layouts.plot#

plot(ax, *layouts, add_labels=True, add_patches=True, add_connections=True, add_logicals=True, pad=1, stim_orientation=True, label_fontsize=11)[source]#

Plots a layout.

Parameters:
ax

The axis to plot the layout on.

*layouts

List of layouts to plot.

add_labels

Flag to add qubit labels, by default True.

add_patches

Flag to plot stabilizer patches, by default True.

add_connections

Flag to plot lines indicating the connectivity, by default True.

add_logicals

Flag to highlight the logical support on the data qubits, by default True.

pad

The padding to the bottom axis, by default 1.

stim_orientation

Flag to orient the layout and axis as stim does for diagram.

label_fontsize

Default font size of the qubit labels. If layout has information about the font size, then this argument is ignored. The purpose of this argument is to easily scale down the label size for large codes.

Returns:
ax

The figure the layout was plotted on.