Skip to content

Commit

Permalink
Remove NW, NE, SW, SE to be automatically stored in Layout (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcSerraPeralta authored Dec 16, 2024
1 parent 732098e commit fc23a9d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
6 changes: 0 additions & 6 deletions surface_sim/layouts/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,6 @@ def to_dict(self) -> dict[str, object]:
edge_dir = edge_attrs["direction"]
nbr_dict[edge_dir] = nbr_node

for ver_dir in ("north", "south"):
for hor_dir in ("east", "west"):
edge_dir = f"{ver_dir}_{hor_dir}"
if edge_dir not in nbr_dict:
nbr_dict[edge_dir] = None

node_dict["neighbors"] = nbr_dict

layout.append(node_dict)
Expand Down
8 changes: 0 additions & 8 deletions tests/layouts/test_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@
"ind": 0,
"neighbors": {
"south_east": "X1",
"north_east": None,
"north_west": None,
"south_west": None,
},
"qubit": "D1",
},
Expand All @@ -40,9 +37,6 @@
"ind": 1,
"neighbors": {
"south_west": "X1",
"north_east": None,
"north_west": None,
"south_east": None,
},
"qubit": "D2",
},
Expand All @@ -55,8 +49,6 @@
"neighbors": {
"north_east": "D2",
"north_west": "D1",
"south_east": None,
"south_west": None,
},
"qubit": "X1",
},
Expand Down

0 comments on commit fc23a9d

Please sign in to comment.