-
Notifications
You must be signed in to change notification settings - Fork 31
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 StaticPlacementPass #250
add StaticPlacementPass #250
Conversation
This is definitely on the right track. Thanks for taking this issue up and putting a PR. I like the timeout feature, but we should have this interface with the predicate system to simplify workflows containing this. By this I mean, turning this workflow = [
StaticPlacementPass(...)
IfThenElsePass(
FoundPlacement(),
NOOPPass(),
normal_mapping_workflow,
] I am also very hesitant to add a heavy dependency (networkx) for just this one algorithm. Can we implement the algorithm internally? |
Great idea! I have removed RuntimeErrors for the first step.
Yes, of course! We can use an exhaustive search for monomorphism by checking all possible embeddings from logical to physical qudits. |
Here I have added a naive implementation of the |
I have added a pruning feature to reduce the search space.
Using this feature, the search space is reduced from |
Hi @edyounis, how does my code look to you? I would appreciate your comments, feedbacks, or suggestions for further improvement. Thanks! |
Looks good, can we add some tests? How large can we push this within a 1- or 10-second time frame? |
Pre-commit and tests are failing, can you get those fixed. The code does look good |
@edyounis The code seems to be fixed now. Could you check it? |
This PR adds a new pass named
StaticPlacementPass
, which attempts to find an embedding of logical qubits into the physical coupling graph so that no SWAPs are needed.Also, it supports a
timeout_sec
parameter to limit the search time.Please note that additional packages such as
timeout_decorator
andnetworkx
are required to run this pass.Original issue: #224