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

Ensure we run VF2PostLayout when needed in optimization level 1 #9941

Merged
merged 2 commits into from
Apr 11, 2023

Commits on Apr 11, 2023

  1. Ensure we run VF2PostLayout when needed in optimization level 1

    This commit fixes an issue where we were incorrectly not running
    VF2PostLayout in the one case where it should be run. Optimization level
    1 is more involved than higher optimization levels because for backwards
    compatibility it runs multiple different passes to try and find a
    perfect layout, first starting with TrivialLayout, then VF2Layout, and
    only if those 2 fail to find a perfect match do we run SabreLayout (or
    DenseLayout and StochasticSwap if control flow are present). We only
    should run VF2PostLayout if we're running the heuristic layout pass.
    However, when we integrated routing into SabreLayout the checking for
    whether we found a pefect layout in the layout stage stopped working as
    expected.
    
    To fix this issue a new flag is added to the CheckMap pass to specify an
    alternative property set field to store the results of the check in. The
    underlying issue was that the property set field between the earlier
    check that we found a perfect layout and the later check whether we
    should run a standalone routing pass. To fix this the new flag is used
    to spearate the results from the multiple CheckMap calls. and then we
    only condition the VF2PostLayout condition on the results of the perfect
    layout check and not the later routing check.
    
    Fixes Qiskit#9936
    mtreinish committed Apr 11, 2023
    Configuration menu
    Copy the full SHA
    6071f05 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5eda70a View commit details
    Browse the repository at this point in the history