qiskit-tutorials
qiskit-tutorials copied to clipboard
qgans_for_loading_random_distributions.ipynb legacy tutorial raises UnboundLocalError
Running the tutorial with Qiskit 0.19.6 gives me:
UnboundLocalError: local variable 'd_loss_min' referenced before assignment
Note that I had to drop the number of data samples and epochs by 10x to get it to find this error
@Zoufalc could you please look into this problem?
An error message needs to be added. I will take care of this. What happens is that the number of data samples < batch. This can happen since we need to bin and truncate (remove too large/small values) the input data to map the data points onto basis states.
If the number of data samples is the same as what it was set at before, then the runtime is longer than the 3min / cell limit. This is why I tried to reduce it. I guess there is something in the middle that likely works.
If you reduce the batch size e.g. to 50, it should work.
It is fixed.
This tutorial no longer exists in this repo. (And sounds like it was fixed by @Zoufalc!)