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.

egraph

the corresponding EGraph

Type

EGraph

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

parity

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

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.

coords()[source]

Return the coordinates of the syndrome vertices.

midpoint()[source]

Return the midpoint of the cube.

xlims()[source]

Return the smallest and largest x vals of the coordinates.

ylims()[source]

Return the smallest and largest y vals of the coordinates.

zlims()[source]

Return the smallest and largest z vals of the coordinates.

Contents

Home

Background

Using FlamingPy

Development

Getting Help

Python API