-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Adds AbstractInitialMapper base class and IdentityInitialMapper #5829
Adds AbstractInitialMapper base class and IdentityInitialMapper #5829
Conversation
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.
One question regarding the interface of initial mapper. Should we instead expose a method that expects a circuit
or a (circuti, device_graph)
and returns an initial mapping for that circuit / circuit, device graph combination?
I'm thinking that the class should encapsulate the strategy to map a circuit on a device; and not necessarily hardcode exact circuit / device combination as part of it's construction.
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.
Can we rebase it to master so that unrelated changes in mapping manager don't appear here? We can merge once it's rebased.
9ba9cef
to
c899e16
Compare
…tumlib#5829) * added abstract initial mapper and identity initial mapper * added __str__ and __repr__ for MappingManager * minor bug * made MappingManager not serializable * removed unused import * addressed comments * fixed bug with edges not being sorted for graph equality testing * fixed bug with digraphs repr method in MappingManager and added test for it * rebase * minor lint fix * addressed comments * addressed some comments * changed interface for AbstractInitialMapper * made MappingManager serializable * removed print statements * ready for merging * nit * temp * fix lint * removed serialization * removed unused imports * addressed comments and made HardCodedInitialMapper not serializable * fixed nit * fixed raises docstring * forgot to add import statement * import bug * removed debug print
…tumlib#5829) * added abstract initial mapper and identity initial mapper * added __str__ and __repr__ for MappingManager * minor bug * made MappingManager not serializable * removed unused import * addressed comments * fixed bug with edges not being sorted for graph equality testing * fixed bug with digraphs repr method in MappingManager and added test for it * rebase * minor lint fix * addressed comments * addressed some comments * changed interface for AbstractInitialMapper * made MappingManager serializable * removed print statements * ready for merging * nit * temp * fix lint * removed serialization * removed unused imports * addressed comments and made HardCodedInitialMapper not serializable * fixed nit * fixed raises docstring * forgot to add import statement * import bug * removed debug print
This PR starts the implementation of the placement strategy for qubit routing http://tinyurl.com/cirq-qubit-routing. A base class
AbstractInitialMapper
and a trivial implementationIdentityInitialMapper
are added.