flamingpy.codes.alternating_polarity¶
- flamingpy.codes.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
source/api/flamingpy.codes.alternating_polarity
Download Python script
Download Notebook
View on GitHub