Tutorial for Gaussian Boson Sampling - Sample code

Trying to Follow the tutorial steps of article:
[ 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

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?

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.

2 Likes