-
Notifications
You must be signed in to change notification settings - Fork 40
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
suspend_chains in findEmbedding instead of parser #97
Comments
The primary reason is that I don't consider At present, the Presently, we have:
So what happens if one
which provides the absolute fastest route to my performance goal -- but if a user isn't careful about preserving
So this gives best-possible performance once we hit C++, at the cost of a bunch of redundant computation. On the balance, my expectation is that allocating those frozensets is going to be a bigger bottleneck than the performance hit taken in C++, so the Python implementation remains as-is. (which, as I'm reasoning through this, makes me question the list-of-lists datatype) So then it comes down to design philosophy: I expect C++ users to be "power users" who prefer a bit of hard to work over getting railroaded into a performance hit. As mentioned before, a C++ implementation would incur the same considerations -- we can allow duplication, do weird pointer stuff and clearly document it, or do a bunch of redundant computation. Or there's a fourth choice: treat C++ developers as "power users" and expect them to create their own auxiliary nodes and fixed embeddings thereof (and this is where I've landed for the moment). What do you think? |
About implementation for performance, if you're doing de-duplication, it's not just about having the pointers to the blobs. From what I understand, you have a pin node in However, from my point of view, I wouldn't expect |
On a simpler point... regardless of moving that feature into C++ or not, I still wonder if it belongs in For example, I'm interested in experimenting with variations of the This is not critical at all, and probably makes you wonder if you should even support that metafeature... but maybe that's something I could help with. Parsing |
When a source node has a fixed chain, all of the qubits (target nodes) contained in that chain are also "fixed" -- minorminer will never use those qubits for any other node. More accurately, you can have multiple fixed chains that contain a particular qubit, but that qubit will never be used for non-fixed nodes. So if you've got multiple pin nodes fixed to the same pin qubit, that's actually completely alright. But I think you're missing a detail. In the two deduplication strategies I present above, each "pin" What happens when you perform deduplication is that multiple source nodes will be adjacent to the same source pin. Typically, the target pin will be adjacent to multiple target nodes. The neighbors of the target pin are not affected by
This is actually quite simple, even from Python, if the first deduplication strategy is employed:
But the motivation for this is a subtle impact on runtime, which, IMO, doesn't warrant the required documentation. As for the other point... I think it warrants more thought and discussion. I'm just about to go on vacation in a few minutes, but I'll think about it and return to the conversation when I can. My initial reaction is to encourage you to break features in your child class (with a |
This is one detail I missed:
I'll look deeper into that. Thanks a lot for your answers. Enjoy your vacation! |
OK... so, I went on and coded an example of what I'm planning. https://github.com/joseppinilla/minorminer/tree/topo Idea: Create a new "flavour" of minorminer, where you provide
Issue: If metafeatures like My solution (not fully implemented):
Proposed solution: Make metafeatures independent from Let me know what you think. I'm sure this is not the only or best approach, but I believe it's an interesting use case that I thought you'd appreciate. BTW: I'm sorry if I butchered that code. |
This is awesome! I haven't read anything other than your description here, but I'm excited for the collaboration. Don't worry too much about code duplication. I've gone through elaborate pains (e.g. C++ templates) to avoid duplication, and while that's worked, it's also been a source of bugs. I recently read [1] which has made me question some of my habits... I'll do my best to review this code in the next couple of weeks; but this sounds like a good start at the very least. [1] http://number-none.com/blow/john_carmack_on_inlined_code.html |
Okay, so I've read through what you've got so far. From where I sit, this proposal looks structurally quite similar to the I submit that your Therefore, I would propose a much more unified structure (which, indeed, has a lot less code duplication):
|
Just for context. We (@stefanhannie and myself) are currently working on other layout-aware hinting algorithms, so my proposed
|
Nice!! I'm very glad this is taking part of the development from your part. I'd be OK closing the issue since this takes part of a bigger conversation. Thanks a lot for the responses! |
Hi,
Is there interest in making the
suspend_chains
feature a part of find_embedding.hpp (or wherever is better)?I'm asking because I'd be interested in collaborating to implement this.
Any reason why this is kept in the parser?
The text was updated successfully, but these errors were encountered: