Allow graph to be directed
Hi,
I'm interested in using this work as a basic building block in my research. However, I require the graphs to be directed, and edge contraction to be only limited to certain edges. So if I understand correctly, I will need to first add the directed option in function find_embedding, and also add restrictions to edge contractions.
Any suggestion on where might be the best place for me to make these two changes? Thanks!
Hello,
The changes you propose sound quite intrusive. To be perfectly honest, if I were to make the algorithm handle directed graphs, I would probably rewrite it from scratch.
Almost all of the work is done in the C++ library, under the include/find_embedding directory. In there, the "real work" is done in the find_chain function (and its dependencies) in the pathfinder class:
https://github.com/dwavesystems/minorminer/blob/ff4935d5fd7c70e64c2532adb0172f48b15078d6/include/find_embedding/pathfinder.hpp#L345-L371
But before you get there, as you mention, you'll need to add those options to find_embedding. I created a handy checklist for doing just that:
https://github.com/dwavesystems/minorminer/blob/main/parameter_checklist.txt