flamingpy.codes.surface_code.dual_neighbours¶
- flamingpy.codes.surface_code.dual_neighbours(p, displace=1)[source]¶
All the dual neighbours of primal vertex p in the RHG lattice.
A helper function for RHG_graph. Given a primal vertex p, returns the coordinates of all the dual neighbours. Assumes each neighbour is 1 unit away by default.
- Parameters
p (tuple) – the coordinates of the primal vertex.
displace (float) – how much to displace the neighbour by. Useful to change when creating maronodes.
- Returns
the coordinates of the four neighbours.
- Return type
List[Tuple]
source/api/flamingpy.codes.surface_code.dual_neighbours
Download Python script
Download Notebook
View on GitHub