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

draw_topology functions error when linear xor quadratic biases is provided #232

Open
kevinchern opened this issue Nov 16, 2023 · 0 comments

Comments

@kevinchern
Copy link
Contributor

Description
draw_topology functions, e.g., draw_pegasus, errors when you supply linear biases and not quadratic biases (vice versa too)

To Reproduce

import dwave_networkx as dnx
G = dnx.pegasus_graph(3)
# This case works as expected
dnx.draw_pegasus(G,  linear_biases={117:-1}, quadratic_biases={(128, 130): -1})
# This case errors out
try:
    dnx.draw_pegasus(G, quadratic_biases={(128, 130): -1})
except Exception as e:
    print(e)
# This case errors out
try:
    dnx.draw_pegasus(G, linear_biases={117:-1})
except Exception as e:
    print(e)

Additional context
Culprit: https://github.com/dwavesystems/dwave-networkx/blob/0.8.14/dwave_networkx/drawing/qubit_layout.py#L117C1-L120

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