quantumsim / qsoverlay

An overlay for the quantumsim package developed by Brian Tarasinski (https://github.com/brianzi/quantumsim)
GNU General Public License v3.0
2 stars 4 forks source link

DiCarlo setup load inconsistency #3

Open BorisVarbanov opened 6 years ago

BorisVarbanov commented 6 years ago

Upon loading a setup, if a seed is not specified as an argument, one is instead loaded from the qubit dictionary of the setup seed = list(self.qubit_dic.values())[0]['seed']. However such a seed is not provided in the DiCarlo_setup, resulting in a KeyError (unless the seed is explicitly passed upon initialization). This is encountered in the QSoverlay tutorial notebook. @obriente

obriente commented 6 years ago

Thanks for catching this. Given the issues we have with seeding I think the best situation is to insist that the user provides a state or a seed - will update now.

slavoutich commented 6 years ago

In quantumsim I am throwing a UserWarning if the sees or RNG is not provided, but this solution also makes sense.

slavoutich commented 6 years ago

I believe that setup is still loaded inconsistently, at least every time I run this, I get warnings, that Measurement gates are not initialized with seed. I tried to fix it, but it is tough without an interface getting crazy or not reverse-compatible. I would postpone the actual fix to rewriting the whole thing in Quantumsim.