flamingpy.codes.surface_code.alternating_polarity

flamingpy.codes.surface_code.alternating_polarity(edge)[source]

Return +1 or -1 depending on the vertices that form edge edge.

Help with the assignment of edge weights (i.e. polarity) for the RHG graph. This particular alternating pattern ensures that every vertex has two +1 and two -1 weight edges incident on it. The precise combination depends on the direction of the edge and the coordinates of the vertices. This pattern may be helpful to reduce, e.g. CV noise.

Parameters

edge (list-type) – a pair of tuples, denoting lattice vertices.

Returns

+1 or -1.

Return type

int

Contents

Home

Background

Using FlamingPy

Development

Getting Help

Python API