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

Set max_trials for VF2Layout in preset pass managers. (backport #10054) #10061

Merged
merged 1 commit into from
May 2, 2023

Commits on May 2, 2023

  1. Set max_trials for VF2Layout in preset pass managers. (#10054)

    * Set max_trials for VF2Layout in preset pass managers.
    
    By setting max_trials, we limit the number of layouts
    enumerated and scored when iterating through vf2_mapping().
    
    This is necessary for scoring to complete in a reasonable
    amount of time for circuits with many connected components
    on larger (e.g. 400 qubit) devices.
    
    These limits were chosen using a fake 400 qubit device,
    using 200 connected components, where each component is
    a single CX gate.
    
    Because layout scoring scales linearly
    with the number of qubits in the circuit, 250,000 (O3)
    takes abount a minute, 25,000 (O2) takes about 6 seconds,
    and 2,500 (O1) takes less than a second.
    
    * Address review comments.
    
    * Return tuple of None instead for finer control and a better interface.
    
    * Add deprecation notice to release note.
    
    * Remove deprecation until 0.25.0.
    
    * Remove unused import.
    
    (cherry picked from commit f13b1ed)
    kevinhartman authored and mergify[bot] committed May 2, 2023
    Configuration menu
    Copy the full SHA
    18148ac View commit details
    Browse the repository at this point in the history