-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support to CouplingMap for disjoint qubits #9710
Commits on Mar 2, 2023
-
Add support to CouplingMap for disjoint qubits
Previously the CouplingMap class only supported graphs which were fully connected. This prevented us from modeling potential hardware which didn't have a path between all qubits. This isn't an inherent limitation of the underlying graph data structure but was a limitation put on the CouplingMap class because several pieces of the transpiler assume a path always exists between 2 qubits (mainly in layout and routing). This commit removes this limitation and also adds a method to get a subgraph CouplingMap for all the components of the CouplingMap. This enables us to model these devices with a CouplingMap, which is the first step towards supporting these devices in the transpiler. One limitation with this PR is most fo the layout and routing algorithms do not support disjoint connectivity. The primary exception being TrivialLayout (although the output might be invalid) VF2Layout and VF2PostLayout which inherently support this already. This commit lays the groundwork to fix this limitation in a follow-up PR but for the time being it just raises an error in those passes if a disconnected CouplingMap is being used. The intent here is to follow up to this commit soon for adding support for SabreLayout, SabreSwap, DenseLayout, and StochasticSwap to leverage the method get_component_subgraphs added here to make them usable on such coupling maps.
Configuration menu - View commit details
-
Copy full SHA for 4d134bb - Browse repository at this point
Copy the full SHA 4d134bbView commit details -
Remove coupling map connected check from NoiseAdaptiveLayout
Noise adaptive layout doesn't use a CouplingMap so we can't check for a disconnected coupling map in it.
Configuration menu - View commit details
-
Copy full SHA for b506d88 - Browse repository at this point
Copy the full SHA b506d88View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6b56517 - Browse repository at this point
Copy the full SHA 6b56517View commit details -
Rename get_component_subgraphs to components and cache result
This commit renames the get_component_subgraphs() method to components() which is much more consise name. At the same time this adds caching to the return just in case building the component subgraphs is expensive to compute we only need to ever do it once.
Configuration menu - View commit details
-
Copy full SHA for 25d3379 - Browse repository at this point
Copy the full SHA 25d3379View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4113586 - Browse repository at this point
Copy the full SHA 4113586View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4d293ba - Browse repository at this point
Copy the full SHA 4d293baView commit details -
Configuration menu - View commit details
-
Copy full SHA for 033b959 - Browse repository at this point
Copy the full SHA 033b959View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3d47405 - Browse repository at this point
Copy the full SHA 3d47405View commit details
Commits on Mar 3, 2023
-
Ensure self loops in CouplingMap.distance() return 0
In a previous commit the distance() method was updated to handle disjoint graphs correctly. Prior to this PR it was expected to raise when a path didn't exist between 2 qubits by nature of the distance matrix construction failing if there was a disconnected coupling map. Since that isn't the case after this PR the error condition was changed to check explicitly that there is no path available and then error. However, there was an issue in this case and self loops would incorrectly error as well when instead they should return 0. This commit updates the error check to ignore self loops so they return correctly.
Configuration menu - View commit details
-
Copy full SHA for e50a4c6 - Browse repository at this point
Copy the full SHA e50a4c6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 15500e9 - Browse repository at this point
Copy the full SHA 15500e9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9111a7a - Browse repository at this point
Copy the full SHA 9111a7aView commit details
Commits on Mar 7, 2023
-
Update CouplingMap.components() docstring
Co-authored-by: Kevin Krsulich <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 850e581 - Browse repository at this point
Copy the full SHA 850e581View commit details -
Configuration menu - View commit details
-
Copy full SHA for c4f2da5 - Browse repository at this point
Copy the full SHA c4f2da5View commit details -
Configuration menu - View commit details
-
Copy full SHA for df6b891 - Browse repository at this point
Copy the full SHA df6b891View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8079699 - Browse repository at this point
Copy the full SHA 8079699View commit details -
Configuration menu - View commit details
-
Copy full SHA for 654a965 - Browse repository at this point
Copy the full SHA 654a965View commit details -
Configuration menu - View commit details
-
Copy full SHA for b847ebc - Browse repository at this point
Copy the full SHA b847ebcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 42474df - Browse repository at this point
Copy the full SHA 42474dfView commit details
Commits on Mar 8, 2023
-
Rename CouplingMap.components to connected_components()
THis commit renames the CouplingMap.components() method to connected_components(). It also adds an example to the docstring to better explain what a connected component is.
Configuration menu - View commit details
-
Copy full SHA for 0936fb0 - Browse repository at this point
Copy the full SHA 0936fb0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 91b8a0d - Browse repository at this point
Copy the full SHA 91b8a0dView commit details -
Configuration menu - View commit details
-
Copy full SHA for a4d2133 - Browse repository at this point
Copy the full SHA a4d2133View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8957997 - Browse repository at this point
Copy the full SHA 8957997View commit details
Commits on Mar 15, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 6ee0c34 - Browse repository at this point
Copy the full SHA 6ee0c34View commit details
Commits on Mar 22, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 55df39e - Browse repository at this point
Copy the full SHA 55df39eView commit details -
Restore previous reduce() behavior
The current reduce() error behavior of raising on trying to reduce to a disconnected coupling map is being depended on in other locations. To avoid a potentially breaking change this commit reverts the removal of that limitation in the method. We can look at doing that in the future independently of this PR because removing this specific restriction on the reduce() method is not 100% tied to generally allowing disconnected coupling map objects.
Configuration menu - View commit details
-
Copy full SHA for a3cf7ff - Browse repository at this point
Copy the full SHA a3cf7ffView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2d13b6a - Browse repository at this point
Copy the full SHA 2d13b6aView commit details -
Configuration menu - View commit details
-
Copy full SHA for acebb43 - Browse repository at this point
Copy the full SHA acebb43View commit details -
Configuration menu - View commit details
-
Copy full SHA for f7112dd - Browse repository at this point
Copy the full SHA f7112ddView commit details