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

Return sorted lists by exact_mappings #5

Merged
merged 8 commits into from
Feb 5, 2022
Merged

Return sorted lists by exact_mappings #5

merged 8 commits into from
Feb 5, 2022

Conversation

nonhermitian
Copy link
Collaborator

@nonhermitian nonhermitian commented Feb 5, 2022

Return mappings as lists that are sorted for use by initial_layout

Also had to bump call_limit to 1000 as otherwise VF2 was always missing a subgraph on the 27Q layout

@nonhermitian nonhermitian changed the title Return only unique subsets from mapping Return sorted lists by exact_mappings Feb 5, 2022
@mtreinish
Copy link
Collaborator

mtreinish commented Feb 5, 2022

On the call limit default value it makes sense to use a much larger number. In terra we use it roughly as a per iteration time limit, but it really is internal state visits in the vf2 algorithm and for larger graphs it will require a higher number to find any solution. In Qiskit/qiskit#7213 we used 50,000 for level 1 (which took about 100ms in local testing), 5,000,000 for level 2 (which was roughly 10 sec) , and 30,000,000 for level 3 (which was roughly 60 seconds). I have some benchmarks using vf2layour to solve for a perfect initial layout of a several hundred qubit circuit on a 1081 quit heavy hex coupling map and it taking about 20 seconds on average for the pass to find a solution and required the higher call limit to find a solution at all.

@nonhermitian
Copy link
Collaborator Author

Ok yeah that makes sense. There is probably a rough heuristic that one can find based on topology size and circuit size that gives a good guess for how many calls it takes. That of course assumes think like we always use heavy hex

@nonhermitian nonhermitian merged commit e3e0dcc into main Feb 5, 2022
@nonhermitian nonhermitian deleted the sort_maps branch February 5, 2022 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants