Skip to content
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

Check out dimod AdjVectorBQM #17

Open
arcondello opened this issue Nov 17, 2020 · 3 comments
Open

Check out dimod AdjVectorBQM #17

arcondello opened this issue Nov 17, 2020 · 3 comments

Comments

@arcondello
Copy link

Hey folks, awesome project!

Have you had a chance to check out the c++ bqms introduced in dimod 0.9.0?

I reran the benchmark in the README using the AdjVectorBQM as a third option and got the following results:

N t_dimod t_cimod t_dimod_cpp
25 0.020157337188720703 0.0018649101257324219 0.0015666484832763672
50 0.06899404525756836 0.0029358863830566406 0.0020656585693359375
100 0.264096736907959 0.008856534957885742 0.003901958465576172
200 1.6795814037322998 0.036122798919677734 0.017549514770507812
300 3.6162827014923096 0.06078672409057617 0.032536983489990234
400 5.6712517738342285 0.10113716125488281 0.04827380180358887
600 11.07354474067688 0.26193881034851074 0.07327771186828613
800 18.849993467330933 0.5112695693969727 0.1237478256225586
1000 28.324119806289673 0.8851237297058105 0.19241881370544434
1600 71.51328182220459 2.7170562744140625 0.521592378616333
2000 109.51392722129822 4.897304534912109 0.8010129928588867
3200 279.1616187095642 15.554394483566284 2.06180739402771
5000 683.7101364135742 52.369715213775635 5.278014421463013

They are also header-only though right now the API is not considered stable (see dwavesystems/dimod#756).

I'd love to talk more about it and see if there are ideas from both that can be combined to make a best-of-both worlds implementation.

@j-i-k-o
Copy link
Contributor

j-i-k-o commented Feb 12, 2021

@arcondello Thanks for the interesting issue and sorry for the late reply (I've just missed the issue for a long time.)
I would like to understand the details of your benchmark. Does the column t_dimod_cpp show the data with pure C++?

@arcondello
Copy link
Author

arcondello commented Mar 24, 2021

No, they are all run from python. I used the same benchmark code from the README and just added a third BQM type.

@j-i-k-o
Copy link
Contributor

j-i-k-o commented Mar 24, 2021

Thanks for the reply! The result is quite interesting!
I"m wondering if the difference between the AdjVectorBQM version of dimod and the previous one is just the structure of adjacency elements (i.e. storing adjacency elements as vector array)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants