dwavesystems / dwavesystems/dwave-graphs
pegasus_graph & chimera_graph adding nodes/edges outside range
- Dominant language
- Python
- Stars
- 95
- Forks
- 62
- Avg merge
- 7d 18h
- Merged PRs (30d)
- 1
Description
**Description**
The ``node_list`` and ``edge_list`` parameters say "node_list ...Note that this list is used to remove nodes, so any nodes specified not in range(m * n * 2 * t) are not added."
But such nodes/edges are added for both functions.
**To Reproduce**
```
>>> c1 = dnx.chimera_graph(1, edge_list=[(0, 4), (0, 5), (44, 55)])
c1.edges
EdgeView([(0, 4), (0, 5), (44, 55)])
>>> p2_graph = dnx.pegasus_graph(2, node_list=range(8)) # 0,1 are not in pegasus(2)
NodeView((2, 3, 4, 5, 6, 7, 0, 1))
```
**Expected behavior**
I expected an intersection of nodes/edges in the ``m,n,t`` and ``node_list`` and ``edge_list`` parameters.
**Environment:**
- OS: WIN10
- Python 3.7.0
**Additional context**
I wanted to use this to extract the working graph of a QPU within a Pegasus(2): ``p2_working_graph = dnx.pegasus_graph(2, node_list=qpu.nodelist, edge_list=qpu.edgelist)``
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.