# Tutorial for Gaussian Boson Sampling - Sample code

**URL:** <https://discuss.pennylane.ai/t/tutorial-for-gaussian-boson-sampling-sample-code/728>\
**Category:** PennyLane Development\
**Created:** [December 17, 2020, 3:31pm UTC](https://discuss.pennylane.ai/t/tutorial-for-gaussian-boson-sampling-sample-code/728 "2020-12-17T15:31:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![falbriard](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/falbriard/32/399_2.png) [@falbriard](https://discuss.pennylane.ai/u/falbriard)\
**Post date:** [December 17, 2020, 3:31pm UTC](https://discuss.pennylane.ai/t/tutorial-for-gaussian-boson-sampling-sample-code/728/1 "2020-12-17T15:31:54Z")

</div>

Trying to Follow the tutorial steps of article:  
[[https://pennylane.ai/qml/demos/tutorial\_gbs.html](https://pennylane.ai/qml/demos/tutorial_gbs.html) ]

My qml packet version of pennylane (upgraded today via pip) is: 0.13.0

Error at statement:  
dev = qml.device(“strawberryfields.gaussian”, wires=n\_wires, cutoff\_dim=cutoff)

Throws error message:  
TypeError: **init** () got an unexpected keyword argument ‘cutoff\_dim’

Could you please assist. Thanks in advance.  
Claude

---

<div class="post-metadata">

**Author:** ![nathan](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/nathan/32/85_2.png) [@nathan](https://discuss.pennylane.ai/u/nathan)\
**Post date:** [December 17, 2020, 8:44pm UTC](https://discuss.pennylane.ai/t/tutorial-for-gaussian-boson-sampling-sample-code/728/2 "2020-12-17T20:44:38Z")

</div>

Hi @falbriard,

At first glance, it might be that you have an older version of Strawberry Fields (which performs the underlying GBS simulations) installed. Could you try upgrading `strawberryfields` and `pennylane-sf` via pip and see if the problem remains?

---

<div class="post-metadata">

**Author:** ![falbriard](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/falbriard/32/399_2.png) [@falbriard](https://discuss.pennylane.ai/u/falbriard)\
**Post date:** [December 18, 2020, 12:18pm UTC](https://discuss.pennylane.ai/t/tutorial-for-gaussian-boson-sampling-sample-code/728/3 "2020-12-18T12:18:24Z")

</div>

Dear colleagues. Thanks for the reply. The solution worked like a charm  
by updating the package “pennylane-sf” and its dependency, the package “numba”. I’ve tested the code posted in the article and it worked OK.
