Skip to content

Commit

Permalink
Change NetworkX.node to NetworkX.nodes in load_from_networkx docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarhiggott committed Sep 6, 2021
1 parent db32eb7 commit d0ecdca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pymatching/matching.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,8 @@ def load_from_networkx(self, graph: nx.Graph) -> None:
>>> g = nx.Graph()
>>> g.add_edge(0, 1, qubit_id=0, weight=math.log((1-0.1)/0.1), error_probability=0.1)
>>> g.add_edge(1, 2, qubit_id=1, weight=math.log((1-0.15)/0.15), error_probability=0.15)
>>> g.node[0]['is_boundary'] = True
>>> g.node[2]['is_boundary'] = True
>>> g.nodes[0]['is_boundary'] = True
>>> g.nodes[2]['is_boundary'] = True
>>> m = pymatching.Matching(g)
>>> m
<pymatching.Matching object with 2 qubits, 1 detector, 2 boundary nodes, and 2 edges>
Expand Down

0 comments on commit d0ecdca

Please sign in to comment.