HI,
I am trying to scale the number of qubits for my experiments using Quantum GANs — PennyLane documentation . But when I run the script with num_qubits of more than 5, then the script fails with error -
Traceback (most recent call last):
File “qgan.py”, line 225, in
outD_fake = discriminator(fake_data.detach()).view(-1)
File “/home/exouser/.local/lib/python3.8/site-packages/torch/nn/modules/module.py”, line 1501, in _call_impl
return forward_call(*args, **kwargs)
File “qgan.py”, line 93, in forward
return self.model(x)
File “/home/exouser/.local/lib/python3.8/site-packages/torch/nn/modules/module.py”, line 1501, in _call_impl
return forward_call(*args, **kwargs)
File “/home/exouser/.local/lib/python3.8/site-packages/torch/nn/modules/container.py”, line 217, in forward
input = module(input)
File “/home/exouser/.local/lib/python3.8/site-packages/torch/nn/modules/module.py”, line 1501, in _call_impl
return forward_call(*args, **kwargs)
File “/home/exouser/.local/lib/python3.8/site-packages/torch/nn/modules/linear.py”, line 114, in forward
return F.linear(input, self.weight, self.bias)
RuntimeError: mat1 and mat2 shapes cannot be multiplied (1x128 and 64x64)
Any thoughts on how we can make the script more generic, and pass the qubits as parameters? Is there any other channel, where we can ask these kind of questions and get quick answers?
Thanks