Skip to content

Error in "HEOM 1d: Spin-Bath model, fitting of spectrum and correlation functions" tutorial notebook #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Vanshaj0429 opened this issue Apr 7, 2025 · 1 comment

Comments

@Vanshaj0429
Copy link

Issue Description

When running the "HEOM 1d: Spin-Bath model, fitting of spectrum and correlation functions" tutorial on https://qutip.org/try-qutip/, it fails with the following error:

ModuleNotFoundError: No module named 'mpmath'

The error occurs because the notebook attempts to import the mpmath module, which is not available in the environment. It leads to further errors in the notebook (attached screenshot)

Details

  • QuTiP version: 5.1.1
  • Error triggered by: from mpmath import mp

Reproduction Steps

  1. Go to https://qutip.org/try-qutip/
  2. Open the "HEOM 1d: Spin-Bath model, fitting of spectrum and correlation functions" tutorial
  3. Run the notebook
  4. Error occurs in the setup section

I'm seeking guidance on the best approach to fix this issue:

  1. Should I modify the notebook to work without mpmath?
  2. Would it be possible to add mpmath to the environment?

I noticed in the try-qutip repository that there are environment configuration files (try-qutip-env.yaml, try-basic-env.yaml). It appears that the dependancy for mpmath is not included in this environment configuration, which would explain the import error when running the HEOM 1d notebook.

Can you add this dependancy or I am happy to add it. @Ericgig

Image Image
@hodgestar
Copy link
Contributor

Thanks for reporting this @Vanshaj0429! I needed to redeploy try-qutip to add the new qutip-qip release, so I added mpmath at the same time. Fortunately is a pure Python package so this was easy.

If you would like something to work on I created #8 which is about make the builds of try-qutip a bit more reproducible by adding lock files for the dependencies. It's not trivial work but you're welcome to take it on and open an pull request if you feel up to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants