-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use physical qubits internally within Sabre (#10782)
* Use physical qubits internally within Sabre This swaps the whole Sabre algorithm over to using physical qubits rather than virtual qubits. This makes all operations based on finding the swaps and scoring them far more natural, at the cost of the layer structures needing to do a little more book-keeping to rewrite themselves in terms of the new physical qubits after a swap. This also means that the swaps that come out of the Sabre algorithm automatically become physical, which requires less tracking to output them into the final DAG circuit. The test outputs change slightly because the order we filter out duplicate swaps in `obtain_swaps` is not identical. We filter out cases where the left index is greater than the right, and with the assignments of virtual qubits to physical qubits varying, doing the filter with physical indices in not guaranteed to filter in the same order as doing it with virtual indices (though the trialled swaps will be the same). * Remove branching from extended-set scoring On modern hardware, branching is typically more expensive than a simple floating-point addition that can be pipelined in. This removes the branch in favour of removing the duplication from the scoring at the end by dividing by two. * Fix formatting
- Loading branch information
1 parent
01bb111
commit 22b94a1
Showing
6 changed files
with
192 additions
and
158 deletions.
There are no files selected for viewing
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
Oops, something went wrong.