Skip to content

Conversation

@hodgestar
Copy link
Contributor

I've moved the try-qutip repository to https://github.com/qutip/try-qutip/ and it's now available at https://qutip.org/try-qutip/.

This PR adds a description of what try-qutip is and links to that description from the navigation bar.

Copy link
Member

@AGaliciaMartinez AGaliciaMartinez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I read the html document and really nice work. Very well explained! I would say it is ready to be merged.

I was looking to compile the webpage locally to review it formatted but I do not seem to find any documentation for it. Do we have it somewhere by any chance? I am not very familiar with working with webpages.

@hodgestar
Copy link
Contributor Author

Jake gave a nice explanation of how to view this on your own GitHub pages -- #67 (comment). One can also build locally by installing and running Jekyll.

@hodgestar
Copy link
Contributor Author

Thanks for taking a look, Asier!

Copy link
Member

@nathanshammah nathanshammah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @hodgestar.

  1. It could be nice to land to the summary index.ipynb notebook that we (once) had when clicking on Try qutip. If there is a way to do it, it would be great.
  2. When I tried to run a notebook, it did not work

qutip-qip-error-try-qutip

:

@hodgestar
Copy link
Contributor Author

I should add qutip_qip to what's installed! Doh. :)

@hodgestar
Copy link
Contributor Author

Thank you for looking Nathan. It would be nice to land on a summary notebook. Will try add.

@hodgestar hodgestar requested review from Ericgig and pmenczel April 1, 2025 22:31
@hodgestar
Copy link
Contributor Author

I updated try-qutip to QuTiP 5.1.1 and now the quantum circuits render beautifully.

@Ericgig @ajgpitch @nwlambert @pmenczel -- would some of you mind giving it another whirl just to make sure it works for people other than me?

I'd like to merge these even if there are some outstanding issues & then keep track of the known issues in the GitHub issues for the repository.

@pmenczel
Copy link
Member

pmenczel commented Apr 2, 2025

Seems to be working pretty well, and I think it is really cool and useful! Some comments:

  • How automatic are things? Do notebooks and package versions have to be updated manually? Is @hodgestar the only one who is able to do that?
  • I came across a HEOM notebook importing ipywidgets which is not available
  • The user experience is not very great if we want it to be as accessible as possible for complete beginners. I could imagine >50% will not even find the tutorial notebooks and just quit. Of course this is just the default jupyter stuff, but I wonder if some things can be changed.

@hodgestar
Copy link
Contributor Author

Thanks for taking a look @pmenczel.

Seems to be working pretty well, and I think it is really cool and useful! Some comments:

Yay!

* How automatic are things? Do notebooks and package versions have to be updated manually? Is @hodgestar the only one who is able to do that?

Building and deploying is completely automated in a GitHub workflow, so pushing a commit to master or pressing the right button in GitHub Actions will do everything.

The tricky part is that the whole jupyterlite and emscripten-forge ecosystem is still evolving rapidly, so there are regularly big changes that need to be figured out. E.g. Currently we need to deploy from a dev emscripten-forge repository (see https://github.com/qutip/try-qutip/blob/5e2f773bff768d4b425134c18e4868159bfb9773/lite/try-qutip-env.yaml#L4).

* I came across a HEOM notebook importing `ipywidgets` which is not available

Let me add ipywidgets to what's installed and see what happens.

* The user experience is not very great if we want it to be as accessible as possible for complete beginners. I could imagine >50% will not even find the tutorial notebooks and just quit. Of course this is just the default jupyter stuff, but I wonder if some things can be changed.

It would be nice to create a landing page. Not quite sure how to do that yet.

@hodgestar
Copy link
Contributor Author

I added ipywidgets and now https://qutip.org/try-qutip/lab/index.html?path=tutorials%2Fheom%2Fheom-3-quantum-heat-transport.ipynb runs correctly. The IntProgress bar doesn't seem to really rendering anything, but I think that is okay for now.

@Ericgig
Copy link
Member

Ericgig commented Apr 2, 2025

It works in general, but there are quite a few errors and warnings:
Using parallel_map causes:

NotImplementedError: This Python build lacks multiprocessing.synchronize, usually due to named semaphores being unavailable on this platform.

The animation in block-sphere-animation fails:
ValueError: unknown file extension: .mp4

And there is:
FutureWarning: e_ops will be keyword only from qutip 5.3 for all solver
UserWarning: `cython`, `setuptools` and `filelock` are required for compilation of string coefficents. Falling back on `eval`.
...

Any plan for automated action running all notebook in this environment?
Then we could fix the notebooks to run well online.

@hodgestar
Copy link
Contributor Author

@Ericgig Thank you for taking a look:

  • I added issues for parallel_map and bloch sphere animation.
  • The Cython issue is already mentioned here.

The error FutureWarning: e_ops will be keyword only from qutip 5.3 for all solver sounds like a bug in the tutorial.

Any plan for automated action running all notebook in this environment?

This is an interesting idea, but it automating running Firefox or Chrome headless in GitHub CI with all of the browser control needed to launch notebooks and read results from them sounds painful.

None of these seem like show stoppers to me.

@hodgestar
Copy link
Contributor Author

@pmenczel I'll try to find some time to generate an index by borrowing some of the logic from the tutorials generation.

@hodgestar
Copy link
Contributor Author

I added a script for generating a Markdown index for the tutorials to qutip/qutip-tutorials#90. Once its reviewed and merged, I can use if from the try-qutip site.

@hodgestar
Copy link
Contributor Author

The script has been merged and the generated README.md now appears on https://qutip.org/try-qutip/.

I'm not year sure how to get an .md file to be displayed by the Markdown Preview by default though, so currently one has to right-click on the file and select Open With > Markdown Preview if one wants clickable links.

There is an extension that allows opening URLs from the web in Jupyterlite by appending fromURL=... to the URL. This would allow one to open arbitrary notebooks in ones own browser using try-qutip. It seems quite useful, so I'll add it.

@hodgestar
Copy link
Contributor Author

The fromURL=... feature has been activated. One can now open a notebook using, e.g.,

https://qutip.org/try-qutip/lab?fromURL=https://qutip.org/qutip-tutorials/tutorials-v5/heom/heom-1a-spin-bath-model-basic.ipynb

The URL after fromURL need not be a QuTiP tutorial -- it point to any file that JupyterLab can open.

Copy link
Member

@pmenczel pmenczel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, the fromURL is useful and it's good to have the readme!

Sorry for not being very clear earlier, my user experience complaints were mostly about that "launcher". Most of the content in there is useless and/or lacks clear description, and it would be good to have a link to the notebooks or the readme there as well.

However, that is something that could be changed later, if it is possible to be changed at all.

@hodgestar
Copy link
Contributor Author

@pmenczel The launcher can be configured. I created an issue for doing so at qutip/try-qutip#6 but I'll leave doing the work for later. Any concrete suggestions about what should be in the launcher welcomed.

@hodgestar hodgestar merged commit e31c90e into master Apr 5, 2025
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

Successfully merging this pull request may close these issues.

6 participants