qutip / qutip-tutorials

QuTiP Tutorials
BSD 3-Clause "New" or "Revised" License
32 stars 34 forks source link

Tutorial on quasi-steady state for QuTiP 5 #95

Closed marcogobbo closed 4 weeks ago

marcogobbo commented 1 month ago

Hi everyone! I am participating in UnitaryHack2024, and I found issue #93. I made this first draft to understand if what I have done matches the requirements of the issue and also the code style matches the notebooks for the tutorial for v5.

Let me know if I need to be more descriptive in the various cell blocks or provide more example cases.

marcogobbo commented 1 month ago

I think I have completed the PR, I have described a little better the various methods with which the steady-states are calculated in such a way as to highlight the differences. @hodgestar let me know if you have any particular requests, otherwise, we can move on to activating the CI job and the final review again! :)

marcogobbo commented 1 month ago

Now the 021_quasi-steadystate-driven-system.md should pass the CI job since there was an error name for the kernel. I also adopted the temporary solution for the JAX_backend.md as already discussed in #98 to keep the compatibility. There is something related to the CI for the v4 which finds a dead link (https://opus4.kobv.de/opus4-fau/files/10984/DissertationChristianSchinabeck.pdf) without ever touching the folder tutorials-v4. Running this CI on my fork there is no problem.

marcogobbo commented 1 month ago

Now I see that the CI job for v4 passes the tests, without touching anything. Instead for the CI job for v5, the tests break 013_nonmarkovian_monte_carlo.ipynb

AssertionError: 
Not equal to tolerance rtol=0.25, atol=0

Mismatched elements: 4 / 101 (3.96%)
Max absolute difference: 0.28756196
Max relative difference: 0.28756196

It is a bit curious since the forked repository passes the CI job for v4 and v5 again. Have you ever encountered this instability of passing or non-passing tests?

marcogobbo commented 1 month ago

Now I see that the CI job for v4 passes the tests, without touching anything. Instead for the CI job for v5, the tests break 013_nonmarkovian_monte_carlo.ipynb

AssertionError: 
Not equal to tolerance rtol=0.25, atol=0

Mismatched elements: 4 / 101 (3.96%)
Max absolute difference: 0.28756196
Max relative difference: 0.28756196

It is a bit curious since the forked repository passes the CI job for v4 and v5 again. Have you ever encountered this instability of passing or non-passing tests?

@hodgestar I saw in #97 that a possible solution is to increase ntraj from 5000 to 5500. Should I fix that test with that?