-
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
Sabre layout and routing transpiler passes #4537
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It looks good to me. |
1ucian0
reviewed
Jun 19, 2020
1ucian0
reviewed
Jun 19, 2020
1ucian0
reviewed
Jun 19, 2020
1ucian0
reviewed
Jun 19, 2020
1ucian0
reviewed
Jun 19, 2020
1ucian0
reviewed
Jun 19, 2020
1ucian0
reviewed
Jun 19, 2020
1ucian0
reviewed
Jun 19, 2020
Co-authored-by: Gushu Li <Skywalker2012@users.noreply.github.com>
1ucian0
reviewed
Jun 20, 2020
1ucian0
reviewed
Jun 20, 2020
1ucian0
reviewed
Jun 20, 2020
1ucian0
reviewed
Jun 20, 2020
1ucian0
reviewed
Jun 20, 2020
Co-authored-by: Luciano Bello <luciano.bello@ibm.com>
Co-authored-by: Luciano Bello <luciano.bello@ibm.com>
1ucian0
reviewed
Jun 21, 2020
1ucian0
reviewed
Jun 21, 2020
1ucian0
approved these changes
Jun 23, 2020
ajavadia
added
the
Changelog: New Feature
Include in the "Added" section of the changelog
label
Aug 3, 2020
faisaldebouni
pushed a commit
to faisaldebouni/qiskit-terra
that referenced
this pull request
Aug 5, 2020
* add SABRE swap pass * add SABRE layout bidirectional search pass * expose sabre via preset passmanagers * undo deprecation for Layout.combine_into_edge_map * add Approx2qDecompose and SimplifyU3 passes * allow synthesis_fidelity in global transpile options * stopgap fix for circuits with regs in sabre_layout * add test * add tests * clean up sabre swap * restore lost qasm test files * fix tests * leave SimplifyU3 for later * leave Approx2qDecompose for later * Release notes Co-authored-by: Gushu Li <Skywalker2012@users.noreply.github.com> * lint * update level 3 * lint * lint relax * regenerate mapper tests * make set to list conversion deterministic * cleaning the diff a bit * test.python.transpiler.test_coupling.CouplingTest.test_make_symmetric * make randomization of SabreSwap controllable via seed * control randomization of SabreSwap via seed * move imports * test.python.transpiler.test_coupling.CouplingTest.test_neighbors * test.python.dagcircuit.test_dagcircuit.TestDagNodeSelection.test_front_layer * fix doc * Update test/python/transpiler/test_sabre_swap.py Co-authored-by: Luciano Bello <luciano.bello@ibm.com> * Update qiskit/transpiler/passes/routing/sabre_swap.py Co-authored-by: Luciano Bello <luciano.bello@ibm.com> * add note and test for neighbors * lint * release note Co-authored-by: Gushu Li <Skywalker2012@users.noreply.github.com> Co-authored-by: Luciano Bello <luciano.bello@ibm.com>
jakelishman
added a commit
to jakelishman/qiskit-terra
that referenced
this pull request
Sep 1, 2023
The custom `decay` heuristic is supposed to penalise increases in depth in the output. The output space of qubits are the physical qubits, so the depth is defined in relation to those. Since its introduction in Qiskitgh-4537, this heuristic has instead been tracking the depth on the virtual qubits, which due to the swaps is not necessarily related to the depth in the output. Notably, this commit actually makes the depth for routing large volumetric circuits slightly _worse_ on average (at least for heavy-hex topologies). This may be because the effect on the heuristic is overweighted, or that the depth tracking resets after each gate is routed (and occasionally in between) to be flat across all qubits, rather than reflecting the actual depth each qubit is subject to.
jakelishman
added a commit
to jakelishman/qiskit-terra
that referenced
this pull request
Sep 5, 2023
The custom `decay` heuristic is supposed to penalise increases in depth in the output. The output space of qubits are the physical qubits, so the depth is defined in relation to those. Since its introduction in Qiskitgh-4537, this heuristic has instead been tracking the depth on the virtual qubits, which due to the swaps is not necessarily related to the depth in the output. Notably, this commit actually makes the depth for routing large volumetric circuits slightly _worse_ on average (at least for heavy-hex topologies). This may be because the effect on the heuristic is overweighted, or that the depth tracking resets after each gate is routed (and occasionally in between) to be flat across all qubits, rather than reflecting the actual depth each qubit is subject to.
jakelishman
added a commit
to jakelishman/qiskit-terra
that referenced
this pull request
Sep 5, 2023
The custom `decay` heuristic is supposed to penalise increases in depth in the output. The output space of qubits are the physical qubits, so the depth is defined in relation to those. Since its introduction in Qiskitgh-4537, this heuristic has instead been tracking the depth on the virtual qubits, which due to the swaps is not necessarily related to the depth in the output. Notably, this commit actually makes the depth for routing large volumetric circuits slightly _worse_ on average (at least for heavy-hex topologies). This may be because the effect on the heuristic is overweighted, or that the depth tracking resets after each gate is routed (and occasionally in between) to be flat across all qubits, rather than reflecting the actual depth each qubit is subject to.
github-merge-queue bot
pushed a commit
that referenced
this pull request
Sep 7, 2023
The custom `decay` heuristic is supposed to penalise increases in depth in the output. The output space of qubits are the physical qubits, so the depth is defined in relation to those. Since its introduction in gh-4537, this heuristic has instead been tracking the depth on the virtual qubits, which due to the swaps is not necessarily related to the depth in the output. Notably, this commit actually makes the depth for routing large volumetric circuits slightly _worse_ on average (at least for heavy-hex topologies). This may be because the effect on the heuristic is overweighted, or that the depth tracking resets after each gate is routed (and occasionally in between) to be flat across all qubits, rather than reflecting the actual depth each qubit is subject to.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adding a layout and routing method from https://arxiv.org/abs/1809.02573 (by @skywalker2012).
The initial layout selection is especially good in this method and finds high-quality initial placements very fast. I allow this layout method to be combined with any of the other available routing methods as well through selection of
layout_method
androuting_method
. But Sabre's own routing method is also quite good - it anticipates upcoming gates via look ahead, and gives you the ability to trade off parallelism vs. number of gates.I have not made this part of the default pipeline yet, but I think I'll do that once I do more randomized testing.