edge_weights does not reflect edges added after construction
Description
DataGraph._edge_weights is populated by _reset_dicts(), which is called only at construction time. Since add_edges_from is inherited from NetworkX and does not update _edge_weights, any edges added after construction are missing from edge_weights with no error or warning.
Root cause
BaseGraph._reset_dicts seeds _edge_weights from sorted_edges once, at construction. Subsequent add_edges_from calls go directly to the NetworkX layer and bypass _reset_dicts.
Minimum reproducible example
from qoolqit.graphs.data_graph import DataGraph
g = DataGraph.from_nodes([0, 1, 2])
g.add_edges_from([(0, 1), (1, 2)])
print(g.edge_weights) # {} — expected {(0, 1): None, (1, 2): None}
Expected behaviour
{(0, 1): None, (1, 2): None}
edge_weightsdoes not reflect edges added after constructionDescription
DataGraph._edge_weightsis populated by_reset_dicts(), which is called only at construction time. Sinceadd_edges_fromis inherited from NetworkX and does not update_edge_weights, any edges added after construction are missing from edge_weights with no error or warning.Root cause
BaseGraph._reset_dictsseeds_edge_weightsfromsorted_edgesonce, at construction. Subsequentadd_edges_fromcalls go directly to the NetworkX layer and bypass_reset_dicts.Minimum reproducible example
Expected behaviour
{(0, 1): None, (1, 2): None}