Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Use VF2Layout in all preset passmanagers #7213
Use VF2Layout in all preset passmanagers #7213
Changes from 48 commits
51114d4
2abcec9
f84d851
ff7e0c6
269e45e
82be5c5
0a28e2b
7c9e1c0
a2c06e6
94ad975
70a5b26
2959b3f
e95b8e2
f7b3902
6d3e2d1
df47835
65ae6ee
5eadd28
e22940c
e45c58d
d0eb76d
b145d52
6c34b4f
434d3d4
4a2fbb2
5042350
107fda6
f6bf092
f77e102
59ef326
1adf7b5
37aabdc
3b9eb49
8888fde
e71d9e3
7105d1c
b8d7ef1
9374913
f1315d1
b720ca6
714b362
1b20e11
039b2b5
1bc29f0
c4a17e0
df599db
78eb1dd
846f2de
486417c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't the relationship between number of calls and time taken dependent on the degree of the graph?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is some dependency on graph structure to determine how the graph is traversed which will determines when we increment the call count and compare against the limit. But in practice it should be relatively constant except for edge some pathological edge cases (the ones I can think of might not even matter because I think they'll eval as not matching earlier). It's a bit dense but you can trace through the traversal part of the algorithm here: https://github.com/Qiskit/retworkx/blob/main/src/isomorphism/vf2.rs#L862-L976
Regardless I don't think it matters too much here because we need to pick something to set a per iteration limit on
vf2_mapping()
iterator to ensure retworkx doesn't take too long trying to find the first mapping (for hard isomorphism problems it can be slow, despite generally being fast) so even if it's not perfectly 60 seconds here it'll be close enough in most cases (there's also some fuzz around hardware, python version, and how you installed retworkx).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that seems fine in general to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related to this something I've been thinking about after talking to @nonhermitian about vf2 for https://github.com/Qiskit-Partners/mapomatic is that we might want to add a scaling factor here based on the number of qubits. When I did scale testing on this with larger device coupling graphs things did take some more time to generate an initial mapping like 20 secs for a ~200 qubit graph. I'll generate a plot now to get a better feel for it but I'm thinking that something like
call_limit=int(3e7 * 10**(abs(log10(coupling_map.size()) - 1)))
might do the trick