Error using Strawberry Fields in the M1 Mac environment

I’m trying to do it while looking at this page, but it doesn’t work. I’ve already issued the API token.


When I run the following in Jupyter notebook, I am forced to run “dead kernel” as follows.

import strawberryfields as sf 
from strawberryfields.ops import * 

And

$ sf configure --token AUTHENTICATION_TOKEN

when I try to register the API token in the VScode terminal, I get the following

zsh: illegal hardware instruction sf configure --token

Hi @zkmi2v thank you for posting. Could you please provide us more information, like what error you get specifically and during what part of the process this is happening?

1 Like

Thanks for the advice. I’ve added an addendum.

Hi @zkmi2v I was not able to replicate either of those error messages on an M1 and with VScode. Could you let us know if you are leveraging the ARM or x86 version of python and what version number that is?

1 Like
% uname -m
arm64

% python -V
Python 3.7.6

The python environment is inherited from the Anaconda environment on the Intel chip, so that may be the cause.

Hi @zkmi2v Can you try this with the x86 version instead of arm? Can you also try reinstalling python and your environment from scratch?