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)
Description draw_topology functions, e.g.,
draw_pegasus
, errors when you supply linear biases and not quadratic biases (vice versa too)To Reproduce
Additional context Culprit: https://github.com/dwavesystems/dwave-networkx/blob/0.8.14/dwave_networkx/drawing/qubit_layout.py#L117C1-L120