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.
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.