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
The default behavior of the function is to rename the qubits from 0 to j (where j Is the size of the subgraph). This is not documented and is not the default behavior I would expect.
When trying to provide the function with a renaming dict, the code crashes:
cg.get_subgraph((1,3,4), {i:i for i in range(5)})
The crash: ValueError: Edges between invalid qudits or num_qudits too small.
The class also has a method named 'get_induced_subgraph', that doesn't change the name of the qubits, but returns a list rather than a CouplingGraph. The issues here is why is there a code duplication? Why is the default different?
The text was updated successfully, but these errors were encountered:
I see a few issues with the method get_subgraph of CouplingGraph.
Consider the following code, where we create a 5-qubit all-to-all, and then ask for a specific subgraph :
The issues I see are:
cg.get_subgraph((1,3,4), {i:i for i in range(5)})
The crash:
ValueError: Edges between invalid qudits or num_qudits too small.
The text was updated successfully, but these errors were encountered: