Closed rochisha0 closed 3 months ago
Thank you for your interest in contributing to qutip.
Where does this example comes from? From a quick look, it does not seems use qutip feature that much...
@Ericgig Thank you for the comment. It is one of the notebooks suggested to port (4th one) by @hodgestar in the issue #18
@Ericgig: This notebook was the result of an undergraduate student project that I supervised.
@rochisha0 Thank you for opening the PR. It looks good, but there are a few things we need to sort out:
The notebooks currently fail the isort and black formatting checks. Could you run isort and black on them and push the changes to this PR? You'll be able to see whether they pass the checks by looking at the results of the builds linked to from the PR page. If you need help using black
and isort
on notebooks, there are instructions in the README.
Currently the tests fail, probably because of some issue with recent Cython or SciPy changes. I'll restart the test runs now and if they fail @Ericgig or I can try sort those out separately.
Good idea putting the notebook in its own new folder. We still need to add the new folder to the web page that lists the tutorials. You can find the Jinja template and scripts that generate that in the website
folder. We should also probably choose a better folder name than miscellaneous
but I haven't thought of a good one yet. I will try come up with a good name (suggestions welcomed).
@hodgestar Thank you for the feedback. I have made the changes to the formatting style of the notebook. I hope it works. I will make the changes to the website template once we figure out a good folder name.
@hodgestar How does physics tutorials sound for the folder name?
@rochisha0 On second thoughts, let's stick with miscellaneous
. At least it will give us somewhere to put this and other once-off tutorials until we see a pattern emerging.
It looks like there is still one linting error:
notebooks/miscellaneous/single-photon-interference.ipynb:cell_2:1:1: F821 undefined name 'Image'
@hodgestar Looks like there were some manual changes to be made regarding comments
and images
in the notebooks that were not supported by black
and isort
. I have made the necessary changes to the template, but I cannot find any build information to cross-check that.
I can not trigger a workflow (guess I'm missing some permission). But I have checked your notebooks using flake8 --max-line-length=88
(as in our linting checks) and it all seems good!
@hodgestar I think this is ready for merging! :)
Thanks @christian512. I don't know why the CI didn't run, but let me merge this and see what happens.
@rochisha0 The ported tutorial is now published at http://qutip.org/qutip-tutorials/ -- thank you!
I noticed that there are few minor things that need fixing on the published page that are related to this PR:
Would you be up to making a new PR to address these?
@hodgestar Yes, I'll take this up.
Thanks, @rochisha0!
Pull Request Description
What does this PR do?
This PR ports a new tutorial on single photon interference for both v4 and v5
Related Issues: