# Error trying to acess 'simulon\_gausian' in pennylane

**URL:** <https://discuss.pennylane.ai/t/error-trying-to-acess-simulon-gausian-in-pennylane/2063>\
**Category:** PennyLane Strawberry Fields\
**Created:** [July 25, 2022, 12:15pm UTC](https://discuss.pennylane.ai/t/error-trying-to-acess-simulon-gausian-in-pennylane/2063 "2022-07-25T12:15:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![PhilippHS](https://avatars.discourse-cdn.com/v4/letter/p/7ab992/32.png) [@PhilippHS](https://discuss.pennylane.ai/u/PhilippHS)\
**Post date:** [July 25, 2022, 12:15pm UTC](https://discuss.pennylane.ai/t/error-trying-to-acess-simulon-gausian-in-pennylane/2063/1 "2022-07-25T12:15:33Z")

</div>

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](https://pennylane-sf.readthedocs.io/en/latest/_modules/pennylane_sf/remote.html)

```
    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

---

<div class="post-metadata">

**Author:** ![CatalinaAlbornoz](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/catalinaalbornoz/32/1196_2.png) [@CatalinaAlbornoz](https://discuss.pennylane.ai/u/CatalinaAlbornoz)\
**Post date:** [July 26, 2022, 9:40pm UTC](https://discuss.pennylane.ai/t/error-trying-to-acess-simulon-gausian-in-pennylane/2063/2 "2022-07-26T21:40:52Z")

</div>

Hi @PhilippHS,

This does look like a bug. Thank you for creating an [issue](https://github.com/PennyLaneAI/pennylane-sf/issues/113) for it.

We will look at fixing this. In the meantime you can try using our `default.gaussian` simulator.

Eg:  
`dev = qml.device('default.gaussian', wires=3)`

Please let me know if this solves your immediate problem and we will let you know when we have a fix.

---

<div class="post-metadata">

**Author:** ![PhilippHS](https://avatars.discourse-cdn.com/v4/letter/p/7ab992/32.png) [@PhilippHS](https://discuss.pennylane.ai/u/PhilippHS)\
**Post date:** [July 27, 2022, 12:25pm UTC](https://discuss.pennylane.ai/t/error-trying-to-acess-simulon-gausian-in-pennylane/2063/3 "2022-07-27T12:25:13Z")

</div>

Hi @CatalinaAlbornoz,

thank you very much for your answer. I mainly wanted to use the `simulon_gaussian` to test running algorithms on devices in the and cloud so the `default.gaussian` does not really help. But I can work on something else mean while.

---

<div class="post-metadata">

**Author:** ![isaacdevlugt](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/isaacdevlugt/32/1159_2.png) [@isaacdevlugt](https://discuss.pennylane.ai/u/isaacdevlugt)\
**Post date:** [July 29, 2022, 1:49pm UTC](https://discuss.pennylane.ai/t/error-trying-to-acess-simulon-gausian-in-pennylane/2063/4 "2022-07-29T13:49:07Z")

</div>

> [@PhilippHS](#):
>
> dev = qml.device(‘strawberryfields.remote’, backend=‘simulon\_gaussian’, wires=[‘0’,‘1’,‘2’], cutoff\_dim=10)

Hey @PhilippHS! From what I understand, we never purposefully supported `simulon_gaussian` in the pennylane-sf plugin. This feature would have to be added! I see that you’ve already created a GitHub issue, so thank you!

---

<div class="post-metadata">

**Author:** ![PhilippHS](https://avatars.discourse-cdn.com/v4/letter/p/7ab992/32.png) [@PhilippHS](https://discuss.pennylane.ai/u/PhilippHS)\
**Post date:** [July 29, 2022, 5:07pm UTC](https://discuss.pennylane.ai/t/error-trying-to-acess-simulon-gausian-in-pennylane/2063/5 "2022-07-29T17:07:42Z")

</div>

Hi @isaacdevlugt ,  
thank you very much for your answer. If it is just for me there is no urgency in implementing this feature. As I said I wanted to use it mainly for testing. But I can also send stuff straight to the X8\_01 device if this works better.

---

<div class="post-metadata">

**Author:** ![isaacdevlugt](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/isaacdevlugt/32/1159_2.png) [@isaacdevlugt](https://discuss.pennylane.ai/u/isaacdevlugt)\
**Post date:** [July 29, 2022, 9:04pm UTC](https://discuss.pennylane.ai/t/error-trying-to-acess-simulon-gausian-in-pennylane/2063/6 "2022-07-29T21:04:26Z")

</div>

Definitely! We encourage you to use the hardware whenever it’s available 🙂
