qutip / qutip-tutorials

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

Port single-photon-interference tutorial #79

Closed rochisha0 closed 3 months ago

rochisha0 commented 5 months ago

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:

Ericgig commented 5 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...

rochisha0 commented 5 months ago

@Ericgig Thank you for the comment. It is one of the notebooks suggested to port (4th one) by @hodgestar in the issue #18

hodgestar commented 5 months ago

@Ericgig: This notebook was the result of an undergraduate student project that I supervised.

hodgestar commented 5 months ago

@rochisha0 Thank you for opening the PR. It looks good, but there are a few things we need to sort out:

rochisha0 commented 5 months ago

@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.

rochisha0 commented 5 months ago

@hodgestar How does physics tutorials sound for the folder name?

hodgestar commented 5 months ago

@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.

hodgestar commented 5 months ago

It looks like there is still one linting error:

notebooks/miscellaneous/single-photon-interference.ipynb:cell_2:1:1: F821 undefined name 'Image'
rochisha0 commented 5 months ago

@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.

christian512 commented 3 months ago

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! :)

hodgestar commented 3 months ago

Thanks @christian512. I don't know why the CI didn't run, but let me merge this and see what happens.

hodgestar commented 3 months ago

@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?

rochisha0 commented 3 months ago

@hodgestar Yes, I'll take this up.

hodgestar commented 3 months ago

Thanks, @rochisha0!