-
Notifications
You must be signed in to change notification settings - Fork 248
Open
Description
This line says, "Note that the last qubit is not actually connected to the first one, ...."
I think the code corresponding to this footnote is
Line 366 in 237853c
"graph.add_edges_from([(edge[0], edge[1], weights) for edge in generic_backend.coupling_map][:-1])\n", |
However, when I print the edges added to the graph, the result does not match the intention of the footnote.
# the result of [(edge[0], edge[1], weights) for edge in generic_backend.coupling_map][:-1]
[(0, 1, 1),
(1, 0, 1),
(0, 2, 1),
(2, 0, 1),
(0, 3, 1),
(3, 0, 1),
(0, 4, 1),
(4, 0, 1),
(1, 2, 1),
(2, 1, 1),
(1, 3, 1),
(3, 1, 1),
(1, 4, 1),
(4, 1, 1),
(2, 3, 1),
(3, 2, 1),
(2, 4, 1),
(4, 2, 1),
(3, 4, 1)]
# the result of [(edge[0], edge[1], weights) for edge in generic_backend.coupling_map]
[(0, 1, 1),
(1, 0, 1),
(0, 2, 1),
(2, 0, 1),
(0, 3, 1),
(3, 0, 1),
(0, 4, 1),
(4, 0, 1),
(1, 2, 1),
(2, 1, 1),
(1, 3, 1),
(3, 1, 1),
(1, 4, 1),
(4, 1, 1),
(2, 3, 1),
(3, 2, 1),
(2, 4, 1),
(4, 2, 1),
(3, 4, 1),
(4, 3, 1)]
In the code, there's one edge from Node 3 to Node 4 but no one edge from Node 4 to Node 3 while the last qubit (Node 4) is connected to the first one (Node 0) since there're 2 edges connecting them. So, I guess the footnote is wrong.
Metadata
Metadata
Assignees
Labels
No labels