You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] "unregistered" program type still included in ConversionGraph #46
After calling unregister_program_type("qasm2"), the program type "qasm2" is removed from QPROGRAM_REGISTRY, but it is still included in the ConversionGraph. This leads to inconsistent behavior where "qasm2" is no longer recognized in the registry but still exists as a node in a new instance of ConversionGraph.
To reproduce:
fromqbraidimportQPROGRAM_REGISTRY, ConversionGraph, unregister_program_typeprint("qasm2"inQPROGRAM_REGISTRY) # Truegraph=ConversionGraph()
print(graph.has_node("qasm2")) # Trueunregister_program_type("qasm2")
print("qasm2"inQPROGRAM_REGISTRY) # Falsenew_graph=ConversionGraph()
print(new_graph.has_node("qasm2")) # True, but should be False
After unregistering "qasm2", it should not be present in new instances of ConversionGraph. It should be a requirement that all "nodes" in the ConversionGraph are "registered" program types.
Note: The "qasm2" alias was just used as an example. This issue is applicable to all program types. The solution you propose should generalize to all program types.
Activity