flamingpy.codes.Stabilizer¶
- class flamingpy.codes.Stabilizer(G)[source]¶
Bases:
object
A class for representing a stabilizer element of a code.
- Parameters
G (EGraph) – the subgraph of the EGraph of the lattice induced by the stabilizer vertices.
- physical¶
the list of physical coordinates associated with the complete stabilizer element, mainly for plotting purposes. Specified during syndrome identification in the code class. For example, the list will contain six points even for incomplete surface code stabilizers, and will have only the local points in case of periodic boundaries.
- Type
NoneType or list
Attributes
Compute total parity of the cube.
- parity¶
Compute total parity of the cube.
Uses the bit_values found in the ‘bit_val’ attribute of the nodes of the EGraph of the code.
- Returns
the total parity
- Return type
int
Methods
coords
()Return the coordinates of the syndrome vertices.
midpoint
()Return the midpoint of the cube.
xlims
()Return the smallest and largest x vals of the coordinates.
ylims
()Return the smallest and largest y vals of the coordinates.
zlims
()Return the smallest and largest z vals of the coordinates.