mit-han-lab / torchquantum

A PyTorch-based framework for Quantum Classical Simulation, Quantum Machine Learning, Quantum Neural Networks, Parameterized Quantum Circuits with support for easy deployments on real quantum computers.
https://torchquantum.org
MIT License
1.24k stars 184 forks source link

Run example of QuantumNAS with error "no nodule namsed 'torchquantum.super_layers'" #250

Open Holmes-Alan opened 3 months ago

Holmes-Alan commented 3 months ago

I tried the example of QuantumNAS with the above error when running "from torchquantum.super_layers import super_layer_name_dict". I think that the super_layers is changed other place?

GenericP3rson commented 3 months ago

Hi, thanks for opening the issue! As mentioned in Slack, this is on my radar and should deep dive this by Saturday. Sorry about the inconvenience!

Holmes-Alan commented 3 months ago

Thank you in advance!

GenericP3rson commented 3 months ago

So, like you mentioned, it looks like the location just changed. The quick fix is replacing the import with:

from torchquantum.algorithm.quantumnas.super_layers import super_layer_name_dict

But looking through the code, I think some other parts are outdated, am currently working on trying to get it up to date (then will PR the updates).