Open DanieleCucurachi opened 2 months ago
Thanks for finding this @DanieleCucurachi. As discussed, I believe the issue is in the serialization of the optimizer's state_dict
, as the QNG's state_dict
holds a quantum circuit. We probably need to add some logic to correctly serialize it. I will take a look into it
Description
QNG has been recently added to
qinfo_tools
. While it works smoothly with simple training loops, as shown here, it is not compatible withtrain()
, function defined inqadence
to automate the definition of the training process with gradient-based optimizers.In particular, the error seems to be related to Python's pickle module having trouble pickling a local object: