ProjectQ-Framework / FermiLib

FermiLib: Open source software for analyzing fermionic quantum simulation algorithms
https://projectq.ch/
Apache License 2.0
87 stars 39 forks source link

Tests for ipython notebooks #81

Open babbush opened 7 years ago

babbush commented 7 years ago

We've had a few problems with people submitting pull requests that break the demo file. The demo is quite important because it is likely the first thing that new users will read. However, we currently have no method to test whether it runs without errors. Such a test would save us a lot of trouble!

babbush commented 7 years ago

To illustrate the importance of this: I think @idk3 recent changes which moved the UCC code into the circuits folder (which I merged) may have broken the demo. @idk3 can you please fix the demo? I think getting tests for the demo in place should really be a priority.

idk3 commented 7 years ago

Yep, I'm on it now.

idk3 commented 7 years ago

Fixing the imports was not enough, there's a deeper problem somewhere in the call to energy_objective. I'll continue to look at this.

babbush commented 7 years ago

👍

idk3 commented 7 years ago

OK, I have a fix. The problem was pretty subtle and is not related to my changes, though in retrospect I should've thought of it earlier. I'll send a PR soon.

idk3 commented 7 years ago

https://github.com/ProjectQ-Framework/FermiLib/pull/138

babbush commented 7 years ago

Thanks. @damiansteiger are these tests for the demo ipython notebook (just something to make sure the notebook can run without errors) something you can help us with in the next couple weeks? It is really bad that we keep breaking the demo and I frankly don't really know how to write such tests myself. You had once mentioned to me that it could be done.