Skip to content
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

Use physical qubits internally within Sabre #10782

Merged
merged 4 commits into from
Sep 20, 2023

Commits on Sep 8, 2023

  1. 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).
    jakelishman committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    4e44644 View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2023

  1. 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.
    jakelishman committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    0475b3b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    03089f9 View commit details
    Browse the repository at this point in the history
  3. Fix formatting

    jakelishman committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    64d304c View commit details
    Browse the repository at this point in the history