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

Remove Sabre's manual insertion-order iteration and unnecessary sorts #9560

Merged
merged 6 commits into from
Feb 15, 2023

Commits on Feb 9, 2023

  1. Remove Sabre's manual insertion-order iteration and unnecessary sorts

    The manual insertion-order tracking was initially added in 02a1939
    (Qiskitgh-9012) during a complete rewrite of the scoring algorithms for Sabre
    to demonstrate that the new algorithm could be made fully RNG
    compatible.  It maintained the identical iteration order to the previous
    iteration once the front-layer data structure was swapped from being a
    raw list to hash-based.
    
    The new data structure doesn't require the manual tracking to be
    reproducible as long as the iteration order is independent of the hash
    seed.  This swaps the relevant places over the `IndexMap` to be able to
    remove a lot of the manual tracking.  In casual testing, this didn't
    appear to have much effect on performance, but the resulting code is
    much simpler.
    
    The sorts (and deliberate canonicalisation of the swaps) was necessary
    to match RNG compatibility in the pre-relative-score Sabre, but since
    the swaps are now iterated through in a deterministic order and
    guaranteed to be generated only once each (the previous version used a
    hashset to remove duplicates), neither step is necessary.
    
    For a QV circuit of depth 5 at 1081 qubits on heavy hex, this is worth
    almost a 2x speedup in routing performance.
    jakelishman committed Feb 9, 2023
    Configuration menu
    Copy the full SHA
    0db3ac3 View commit details
    Browse the repository at this point in the history
  2. Fix RNG-related tests

    jakelishman committed Feb 9, 2023
    Configuration menu
    Copy the full SHA
    254fc51 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9a90878 View commit details
    Browse the repository at this point in the history

Commits on Feb 10, 2023

  1. Configuration menu
    Copy the full SHA
    57e899b View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2023

  1. Configuration menu
    Copy the full SHA
    a5b413e View commit details
    Browse the repository at this point in the history
  2. Add RNG-change note

    jakelishman committed Feb 14, 2023
    Configuration menu
    Copy the full SHA
    60ddde1 View commit details
    Browse the repository at this point in the history