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

Add max_trials parameter to VF2PostLayout. #9963

Merged
merged 5 commits into from
Apr 13, 2023

Conversation

kevinhartman
Copy link
Contributor

@kevinhartman kevinhartman commented Apr 13, 2023

Summary

Adds a new parameter max_trials to pass VF2PostLayout which, when specified, limits the number of layouts discovered and compared when searching for the best layout.

This can be used to place an upper bound on the time spent scoring potential layouts, which may be useful for larger devices. In a follow-up PR, we'll specify the parameter accordingly when invoking VF2 post layout within the preset pass managers.

@kevinhartman kevinhartman requested a review from a team as a code owner April 13, 2023 20:17
@qiskit-bot
Copy link
Collaborator

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

One or more of the the following people are requested to review this:

  • @Qiskit/terra-core

@mtreinish mtreinish added this to the 0.24.0 milestone Apr 13, 2023
@mtreinish
Copy link
Member

mtreinish commented Apr 13, 2023

I've tagged this as being part of the 0.24.0 as a feature freeze exception. This extra flag for VF2PostLayout is a prerequisite for fixing #9834. #9834 is a potential blocker for supporting some near future devices so we've decided it was a final release (not rc1) blocker to fix the issue. But, since we since we need this flag to be able to set limits in vf2postlayout to avoid the issue this needs to be included as part of RC1 even though it's coming in a week late. If there is any disagreement with this we can untag this from the release and discuss further.

@mtreinish mtreinish added the Changelog: New Feature Include in the "Added" section of the changelog label Apr 13, 2023
@coveralls
Copy link

coveralls commented Apr 13, 2023

Pull Request Test Coverage Report for Build 4694176989

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • 34 unchanged lines in 4 files lost coverage.
  • Overall coverage increased (+0.03%) to 85.798%

Files with Coverage Reduction New Missed Lines %
qiskit/transpiler/passes/routing/sabre_swap.py 1 95.24%
crates/qasm2/src/lex.rs 5 90.63%
crates/qasm2/src/parse.rs 6 97.58%
qiskit/transpiler/passes/layout/sabre_layout.py 22 75.48%
Totals Coverage Status
Change from base Build 4692324070: 0.03%
Covered Lines: 70453
Relevant Lines: 82115

💛 - Coveralls

Copy link
Member

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The release note LGTM, just one small inline comment. After that I think we're good to merge this.

qiskit/transpiler/passes/layout/vf2_layout.py Outdated Show resolved Hide resolved
Copy link
Member

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the quick updates.

@mtreinish mtreinish enabled auto-merge April 13, 2023 22:05
@mtreinish mtreinish added this pull request to the merge queue Apr 13, 2023
Merged via the queue into Qiskit:main with commit 9e54f13 Apr 13, 2023
giacomoRanieri pushed a commit to giacomoRanieri/qiskit-terra that referenced this pull request Apr 16, 2023
* Add max_trials parameter to VF2PostLayout.

* Fix formatting.

* Fix spacing.

* Update release note based on review.

* Revert vf2_layout.py.
king-p3nguin pushed a commit to king-p3nguin/qiskit-terra that referenced this pull request May 22, 2023
* Add max_trials parameter to VF2PostLayout.

* Fix formatting.

* Fix spacing.

* Update release note based on review.

* Revert vf2_layout.py.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: New Feature Include in the "Added" section of the changelog priority: high
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants