Hello
I am trying to run a Circuit on Xanadu’s " simulon_gaussian" backend via the strawberry fields pennylane plugin. Unfortunately, when trying to initialise the device with
dev = qml.device('strawberryfields.remote', backend='simulon_gaussian', wires=['0','1','2'], cutoff_dim=10)
I receive in return the error message
ValueError: Device has a fixed number of {'pnr_max': 20, 'homodyne_max': 1000, 'heterodyne_max': 1000} modes and cannot be created with 3 wires.
When I leave out the wires
keyword argument I instead receive the error message
`TypeError: ‘dict’ object cannot be interpreted as an integer.
When I look at the source code
self.backend = backend
self.cutoff = cutoff_dim
eng = sf.RemoteEngine(self.backend)
self.num_wires = eng.device.modes
if wires is None:
# infer the number of modes from the device specs
# and use consecutive integer wire labels
wires = range(self.num_wires)
if isinstance(wires, int):
raise ValueError(
f"Device has a fixed number of {self.num_wires} modes. The wires argument can "
f"only be used to specify an iterable of wire labels."
)
if self.num_wires != len(wires):
raise ValueError(
f"Device has a fixed number of {self.num_wires} modes and "
f"cannot be created with {len(wires)} wires."
)
the problem seems to me that
sf.RemoteEngine( 'simulon_gaussian').device.modes
returns the dictionary
{'pnr_max': 20, 'homodyne_max': 1000, 'heterodyne_max': 1000}
while pennylane expects an integer.
Is this a bug or did I do something wrong in my setup?
Note:
I am using pennylane 0.24.0, pennylane-sf 0.20.1 and strawberryfields 0.23.0