Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pegasus_graph & chimera_graph adding nodes/edges outside range #189

Open
JoelPasvolsky opened this issue Mar 5, 2021 · 0 comments
Open

Comments

@JoelPasvolsky
Copy link
Contributor

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant