but i was getting error in Quantum Circuit part of this code
# select a device
dev = qml.device("strawberryfields.fock", wires=num_modes, cutoff_dim=num_basis)
here the error comes like
---------------------------------------------------------------------------
DeviceError Traceback (most recent call last)
<ipython-input-19-4b62c45398d1> in <module>()
3
4 # select a devide
----> 5 dev = qml.device("strawberryfields.fock", wires=num_modes, cutoff_dim=num_basis)
6
7 @qml.qnode(dev, interface="tf")
/usr/local/lib/python3.7/dist-packages/pennylane/__init__.py in device(name, *args, **kwargs)
303 return dev
304
--> 305 raise DeviceError("Device does not exist. Make sure the required plugin is installed.")
306
307
DeviceError: Device does not exist. Make sure the required plugin is installed.
Hi @JEEVARATHINAM from what I see in the error, your data is a different type from what the code says it is. Notice how in the code you’re specifying that your data is of type “float32” but apparently it’s not. I’d try converting your data or changing the type specified in the code.
Also, try to run the demo exactly as it is with the dataset provided. If you run into issues in that case then the problem might be different.
Hi @JEEVARATHINAM, I’m able to reproduce your error. It’s strange because this demo run perfectly when it was submitted. You should create a new virtual environment with the same versions as specified on the top of the notebook. This should make the demo work again.
Hi @JEEVARATHINAM; if you install an external plugin device on Colab, you will need to restart the runtime ( Runtime → Restart Runtime ) before the newly installed PennyLane devices are available.
Hi @JEEVARATHINAM, unfortunately we cannot connect through a google meet. I will keep looking onto how this problem can be fixed and if you want we can meet at the PennyLane community calls which we hold on Thursdays at 11am ET on the Unitary Fund Discord (in the community-call voice channel).
Hi @JEEVARATHINAM, can you please share your code and the error you’re getting when saving the model? If it’s a databricks issue then it’s best to ask them directly. If it’s a PennyLane issue then we can help.