Skip to content

ImportError: cannot import name 'simps' from 'scipy.integrate' #750

@wangqiuoe

Description

@wangqiuoe

Before posting a bug report

  • I have searched exisisting GitHub issues to make sure the issue does not already exist.

Expected behavior

import pacakage successfully

Actual behavior

After installation, when doing
from strawberryfields.apps import points, plot,
it reports the import error.

I've checked scipy.integrate, and the current version has simpson instead of simps method

Reproduces how often

100%

System information

File /[python enviroment]/strawberryfields/apps/__init__.py:36
     [34](https://file+.vscode-resource.vscode-cdn.net/opt/miniconda3/envs/py312/lib/python3.12/site-packages/strawberryfields/apps/__init__.py:34) import strawberryfields.apps.plot
     [35](https://file+.vscode-resource.vscode-cdn.net/opt/miniconda3/envs/py312/lib/python3.12/site-packages/strawberryfields/apps/__init__.py:35) import strawberryfields.apps.points
...
---> [27](https://file+.vscode-resource.vscode-cdn.net/opt/miniconda3/envs/py312/lib/python3.12/site-packages/strawberryfields/backends/states.py:27) from scipy.integrate import simps
     [29](https://file+.vscode-resource.vscode-cdn.net/opt/miniconda3/envs/py312/lib/python3.12/site-packages/strawberryfields/backends/states.py:29) from thewalrus.symplectic import rotation as _R
     [30](https://file+.vscode-resource.vscode-cdn.net/opt/miniconda3/envs/py312/lib/python3.12/site-packages/strawberryfields/backends/states.py:30) from thewalrus.symplectic import xpxp_to_xxpp

ImportError: cannot import name 'simps' from 'scipy.integrate'

Source code

No response

Tracebacks

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions