I have installed Strawberry fields library on Python 3.9.X and I tried loading the below code:
import strawberryfields as sf
from strawberryfields.ops import *
And it is taking forever to load the library. It’s been 30 minutes and still loading on Jupyter Notebook cell and on pure python (.py) it is equally slow. Can someone help me to fix this?
Hi @sleepingcat4 ,
Did you create a virtual environment for this? I would recommend following these steps:
- Install Miniconda following the instructions here.
- Open your terminal (mac) or command line (Windows).
- Create a new Conda environment with: conda create --name
<name_of_your_environment> python=3.10
- Activate the environment with: conda activate <name_of_your_environment>
- Install Strawberry Fields with: python -m pip install strawberryfields
- Install other useful packages such as jupyter with: python -m pip install jupyter
Note that where it says <name_of_your_environment> you can choose any name that you want.
If this doesn’t work you can try using Strawberry Fields on Google Colab. I hope this helps!