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
slice_by_coloring, CollectOpColor, and is_valid_edge_coloring all handle user-input edge coloring directly, but each has a different "perspective" on the coloring.
slice_by_coloring wants to ensure all the edges in the input circuit are correctly covered by the coloring
CollectOpColor is a more naive, generalized tool, so it will simply collect ops on the subset of edges it is given. It doesn't necessarily want to do much checking on the inputs.
is_valid_edge_coloring currently just checks whether the edge coloring on the input graph is valid (i.e. No two incident edges share a color)
Resolution of this issue should include handling the case where a user passes a valid, but incomplete, edge coloring. Currently, this value error passes through silently, causing unintended behavior.
One option is making is_valid_edge_coloring a bit more circuit-centric, in that it would verify that all the qubits in a circuit are covered by the coloring. If we go this route, the function should probably just pass through all circuit instructions and ensure all defined edges in the circuit (i.e. any edge with at least one connecting gate) are included in the coloring.
Another option is to let slice_by_coloring verify that all the input circuit edges are covered by the coloring. slice_by_coloring could continue using is_valid_edge_coloring to ensure the actual coloring is valid.
The text was updated successfully, but these errors were encountered:
slice_by_coloring, CollectOpColor, and is_valid_edge_coloring all handle user-input edge coloring directly, but each has a different "perspective" on the coloring.
slice_by_coloring wants to ensure all the edges in the input circuit are correctly covered by the coloring
CollectOpColor is a more naive, generalized tool, so it will simply collect ops on the subset of edges it is given. It doesn't necessarily want to do much checking on the inputs.
is_valid_edge_coloring currently just checks whether the edge coloring on the input graph is valid (i.e. No two incident edges share a color)
Resolution of this issue should include handling the case where a user passes a valid, but incomplete, edge coloring. Currently, this value error passes through silently, causing unintended behavior.
One option is making is_valid_edge_coloring a bit more circuit-centric, in that it would verify that all the qubits in a circuit are covered by the coloring. If we go this route, the function should probably just pass through all circuit instructions and ensure all defined edges in the circuit (i.e. any edge with at least one connecting gate) are included in the coloring.
Another option is to let slice_by_coloring verify that all the input circuit edges are covered by the coloring. slice_by_coloring could continue using is_valid_edge_coloring to ensure the actual coloring is valid.
The text was updated successfully, but these errors were encountered: