eclipse-qrisp / Qrisp

Qrisp - a framework for high-level programming of Quantum computers
https://www.qrisp.eu/
Eclipse Public License 2.0
93 stars 26 forks source link

Bug: loading QAOABenchmark #83

Open renezander90 opened 1 month ago

renezander90 commented 1 month ago

An instance of QAOABenchmark contains the classical cost function as a Python function. The .save method uses dill to save the QAOABenchmark instance including the cost_function into a .qaoa file. The resulting .qaoa file can only be loaded on the same system (and at the same place) where it has been created due to dependencies on the local environment.

Possible solution: Instead of saving the cost function, save an additional dictionary of measurement outcomes and their cost values.