When I try to run the following piece of code:
dev = qml.device('strawberryfields.tf', wires=6, cutoff_dim=3)
I get the error:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-5-a9c3d55d3613> in <module>
----> 1 dev = qml.device('strawberryfields.tf', wires=6, cutoff_dim=3)
C:\ProgramData\Anaconda3\envs\Pennylane14TF\lib\site-packages\pennylane\__init__.py in device(name, *args, **kwargs)
251
252 # load device
--> 253 return plugin_device_class(*args, **options)
254
255 raise DeviceError("Device does not exist. Make sure the required plugin is installed.")
C:\ProgramData\Anaconda3\envs\Pennylane14TF\lib\site-packages\pennylane_sf\tf.py in __init__(self, wires, cutoff_dim, analytic, shots, hbar)
191
192 def __init__(self, wires, *, cutoff_dim, analytic=True, shots=1000, hbar=2):
--> 193 super().__init__(wires, analytic=analytic, shots=shots, hbar=hbar)
194 self.cutoff = cutoff_dim
195 self.params = dict()
C:\ProgramData\Anaconda3\envs\Pennylane14TF\lib\site-packages\pennylane_sf\simulator.py in __init__(self, wires, analytic, shots, hbar)
82 self.state = None
83 self.samples = None
---> 84 self.analytic = analytic
85
86 def execution_context(self):
AttributeError: can't set attribute
This code worked fine with Pennylane v0.13.0, but in the new version of Pennylane (v0.15.1) it gives the error I reported above.
Do I need to change the parameters I pass to the qml.device function, or is it a bug?