Undergraduate QM with QuTiP

640 views
Skip to first unread message

Andrew Dawes

unread,
Jan 8, 2020, 11:22:18 AM1/8/20
to QuTiP: Quantum Toolbox in Python
I have a manuscript on teaching undergraduate QM with QuTiP. It is aimed to be a gentle introduction to qutip as well as a map between textbook notation, and the operators/functions available in the library. I hope it is of use to folks interested in adding computational QM to their courses. It's posted to the arXiv and I'm happy to hear any suggestions on what to do with it.


AJP and IEEE-CiSE both rejected it as out of scope. I'm really not worried about publishing so much as making it available to people who would benefit from the info.

Best,
Andy

Tarun Raheja

unread,
Jan 8, 2020, 11:43:41 AM1/8/20
to QuTiP: Quantum Toolbox in Python
Hi,

I am an active contributor to QuTiP. Being a (recent) CS graduate, I recently posted to Reddit looking for any courses that taught undergraduate Quantum Mechanics through code, as I think the code makes it easier to grok math. I didn't really get any promising replies.

I really appreciate this being done, and would love to be able to help in some way. Maybe we could gradually set up an entire self-sufficient undergrad QM course on GitHub, with pedagogical lecture notes? I know that sounds somewhat ambitious, but we could use something like Jupyter Notebooks or Google's Colab for the code, and inline the beautifully typeset lectures. I am happy to contribute as much code as I can.

Regards,
Tarun,

Muhammad Saad

unread,
Jan 8, 2020, 3:48:25 PM1/8/20
to qu...@googlegroups.com
A self-sufficient course sounds really cool. May be I can help a little too.

--
You received this message because you are subscribed to the Google Groups "QuTiP: Quantum Toolbox in Python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qutip+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qutip/0dd18c3a-bb26-481a-948f-0d04767b7e7c%40googlegroups.com.

QD_NA

unread,
Jan 8, 2020, 3:56:04 PM1/8/20
to QuTiP: Quantum Toolbox in Python
This is a very beautiful effort. Thank you very much.
I am a PhD student working in Quantum Optics. Though I am new to python and mostly work with MATLAB, Qutip tutorial and this new Introductory undergraduate level treatment makes things less complicated. 
I have collected and written a considerable number (400+)  MATLAB codes from undergraduate and graduate level Quantum Mechanical problems. I would be very curious to know if there can be a possibility to convert those scripts to Qutip based python equivalent scripts. Since i am new to python, however, I need support on this.

Andrew Dawes

unread,
Jan 8, 2020, 4:51:06 PM1/8/20
to QuTiP: Quantum Toolbox in Python
Thank you all for these suggestions and comments. I would be interested in turning this into a self-contained course if there is sufficient interest in such a thing. I do have a set of notebooks that I use for my own course, these are posted here: https://github.com/amcdawes/QMlabs please feel free to take a look.

As for converting MATLAB code to QuTiP, that is likely doable, and in fact would be a good way to learn how to use qutip. Often there are convenient ways to do things in qutip that may require more low-level work in matlab (depending on what framework you use or not). QuTip itself began as a python version of the quantum optics toolbox for matlab. Do you have any matlab code posted? I'm happy to take a look and see about re-implementing in qutip.

To the whole list: perhaps an undergraduate-level section of the qutip documentation would be a nice middle-ground?

Best,
Andy


Nathan Shammah

unread,
Jan 8, 2020, 6:23:04 PM1/8/20
to qu...@googlegroups.com
Dear Andrew,

This looks great. I would be happy to contribute. By the time I was drafting a reply, three different persons commenting the post. This is clearly interesting to many people.  

I had opened an enhancement issue on QuTiP’s GitHub page, exactly along these lines: "ENH: quantum optics "book" with `jupyter-book`". This could be additionally to a tex's pdf file. 

My proposal was to frame it as an html-based resource. The recently developed jupyter-book tool has been devised for this to add some features that are not supported in jupyter notebooks. The folks at IBM have also used this for a quantum computing book, leveraging Jupyter-book to showcase Qiskit capabilities and engaging their community.

There are a couple of directions this could take:

1) I've been wondering whether there was a necessity for this, given Rob Johansson’s lectures on quantum mechanics and quantum optics and whether there is really a case for this. Of course, different authors can make different books (I really like your manuscript, I skimmed through it, and will read it carefully in the next weeks). 

Beyond style differences, I am wondering what different take this could be. Personally, I find those lectures great, yet as Tarun was mentioning, I have seen students asking also for other, maybe more accessible material. I actually find the lectures great. It may be that even the simple fact that the lectures are divided in different files, can prompt students and readers to see them as independent (technically they are). So, maybe, one needs to build a stronger narrative around them.

2) Collaboration. I’ve thought about something going even a bit more advanced in topics and techniques that an undergraduate book (I share my thoughts here although these may very well be two different , and in that case I thought that different chapters may be done by different authors, with one or two editors organizing it all as in collected works. This option could be nice for outsourcing the work but can become longer in time as one needs to find and iterate with the different authors. I know for sure at least a couple of professors that use qutip for their lectures. Some for quantum optics, some even for advanced topics as quantum machine learning. I think that, maybe together with the book effort, increasing the visibility of educational material on the qutip website would be great. (The first thing would be to make these courses emerge on the surface; I gave a short such course recently.) 

3) Publish. I see the point about publishing this too. I am sorry to hear of those rejections. This is a field with very new stuff: open source software, collaborative and interactive notebooks and I feel like academic opportunities are still catching up. At the same time, this field is very lively, as Shahnawaz and I tried to picture it recently here.  A list of journals especially suited for open-source software-based works in quantum optics can be found here. While it may be still difficult to apply for a textbook, I think that SciPost Physics is exploring contributions that go beyond original results articles. We could always ask, and I could check with Prof. Franco Nori.

In any case, one could always upload a version of the book to Zenodo. This project is mainly for hosting and preserving in unchanged form datasets and software accompanying publications. But the good thing is that it provides, immediately, a DOI reference, which makes at least the work citable and trackable with usual metrics tools (WoS, Scopus, etc.) 
At level zero, we could immediately add a link to the arxiv in the QuTiP tutorials page. You can open a pull request here (I will be happy to help too).  

5) Organization and communication. All in all, happy to help in any capacity; I wonder which way is best to continue the discussion/interaction with interested people; there is a QuTiP Gitter channel; it hasn't been very active so far, but it allows to create rooms for specific topics and with some integration with Github. More generally, I recently posted some projects on QuTiP's github, asking whether we would need a qutip/qutip-community space, since the projects are set only by the GH organization members. 

Many of the things I mentioned may apply, independently on your choices for the arxiv manuscript, in case they look too far from your ideas. I think it's great to have this conversation started. 

Best wishes, 

Nathan 

Dr. Nathan Shammah
Postdoctoral Research Scientist
Theoretical Quantum Physics Laboratory
RIKEN, Wako, Saitama, Japan


--
You received this message because you are subscribed to the Google Groups "QuTiP: Quantum Toolbox in Python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qutip+un...@googlegroups.com.

Tarun Raheja

unread,
Jan 8, 2020, 11:31:16 PM1/8/20
to QuTiP: Quantum Toolbox in Python
Dear Andrew and others,

Does this basic Quantum Information course sound like the kind of thing that we're looking to accomplish (but with a more Physics-heavy approach, and with undergraduate QM course material instead)?
Also, as Nathan pointed out should we create a Gitter channel, or something else to discuss more? We can just contribute PRs to the repository Andrew maintains. 

Regards,
Tarun.

Paul Nation

unread,
Jan 9, 2020, 6:02:21 AM1/9/20
to QuTiP Group
So this is something that I wanted to do for some time as well.  I have also been rejected many a time by journals who do not understand things, PRA being a prime example.

Jupyter book is a neat tool, and makes playing around with things fairly easy.  The Qiskit textbook can be used as an example, but I would not use it as a guide for what to do.  To be honest it has not been given the attention it deserves, and we need to fix that in the near term.

I do not think one needs to partition the content into undergrad vs grad etc.  I think one basically starts with the fundamentals, and continues to build up.  Having numerical tools at hand means that you can actually begin to explore advanced topics earlier in the curriculum.  e.g. density matrices, entanglement, noise, etc.  So it would be a disservice to think in terms of what is currently considered undergrad or not. 

Another thing to think about is integration with standard coursebook content.  It is unrealistic, at least in the near term, that an organically grown textbook would replace the standard ones currently in use.  As a stopgap, it is interesting to think about how this textbook can be leveraged as a kind of lab component for the more traditional books.  There are 3-4 chapters in Griffiths for example that can be touched upon.  However, being quantum optics orientated, QuTiP can possibly be leveraged better for a textbook in that direction.



--
You received this message because you are subscribed to the Google Groups "QuTiP: Quantum Toolbox in Python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qutip+un...@googlegroups.com.

Henri Girard

unread,
Jan 9, 2020, 6:15:14 AM1/9/20
to qu...@googlegroups.com

I am trying to use it with sagemath-9.0, it used to work but not more they are some errors, is it possible to get it working with sage ?

Henri Girard

unread,
Jan 9, 2020, 6:20:31 AM1/9/20
to qu...@googlegroups.com

I am trying your notebooks with sagemath the first is working so I will see all the others

Thank you for sharing,

Best

Henri

--
You received this message because you are subscribed to the Google Groups "QuTiP: Quantum Toolbox in Python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qutip+un...@googlegroups.com.

Henri Girard

unread,
Jan 9, 2020, 6:28:34 AM1/9/20
to qu...@googlegroups.com

I tried bloch-redfield with sagemath-9.0 and all works fine...

I use sage because I do a lot with it so I want to keep the same environment as possible, there is no reason why it shouldn't work, maybe I entered datas with errors. For info in sage run sage --sh and after pip install qutip --upgrade --user ( or / and pip3)

Tesfay mariam

unread,
Jan 9, 2020, 7:06:17 AM1/9/20
to qu...@googlegroups.com

I I am trying your  to use the notebooks with  Spyder (Python 3.6),  
with some examples, but  i  cant find. i need your suggestions and comments, to resolve this.   

Yours Sincerely,

Tesfay Gebremariam Tesfahannes (PhD.)

Assistant Professor in Quantum Optics and Information
Department of Physics, College of Natural Sciences
ArbaMinch University, Ethiopia
P.O.BOX; 21 Arba Minch- Ethiopia

Phone: +251-980153914

E-Mail:  tesfaye.g...@amu.edu.et 

                  tesfa...@gmail.com

   ORCID iD:    https://orcid.org/0000-0002-6198-407X



Andrew Dawes

unread,
Jan 9, 2020, 11:24:08 AM1/9/20
to QuTiP: Quantum Toolbox in Python
I agree that there is no particular reason to differentiate undergrad from anything else, I mostly meant that this would be a suitable place for undergrads to start and that it would be designed to interface with typical undergrad textbooks (Griffiths being mentioned already) and Beck (the one I use specifically). Others that start from spin-systems are Townsend and Sakurai.

I do have the framework of a jupyter-book started and I will have some time in the next few weeks to push content from my manuscript into it as a starting point. I will make it available on github and it would be great to see where that leads.

For now, there does seem to be enough interest to launch a room in gitter (I am not able to create a room myself it appears). I'd much prefer that to email as I am likely to lose track of email too easily.
To unsubscribe from this group and stop receiving emails from it, send an email to qu...@googlegroups.com.

Andrew Dawes

unread,
Jan 9, 2020, 11:26:23 AM1/9/20
to QuTiP: Quantum Toolbox in Python
Tesfay and Henri,
Please feel free to email me directly with specific questions, the notebooks I posted work with a stock Jupyter installation but may have some specific dependencies. I'm teaching with them this spring so I will be going through and cleaning up and updating. I'll try to add some clear instructions for how to use them. In the mean time, you can always view them as examples themselves and copy/paste code from them to whatever python interface you prefer.

Best,
Andy

On Thursday, January 9, 2020 at 4:06:17 AM UTC-8, Tesfay mariam wrote:

I I am trying your  to use the notebooks with  Spyder (Python 3.6),  
with some examples, but  i  cant find. i need your suggestions and comments, to resolve this.   

Yours Sincerely,

Tesfay Gebremariam Tesfahannes (PhD.)

Assistant Professor in Quantum Optics and Information
Department of Physics, College of Natural Sciences
ArbaMinch University, Ethiopia
P.O.BOX; 21 Arba Minch- Ethiopia

Phone: +251-980153914

To unsubscribe from this group and stop receiving emails from it, send an email to qu...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "QuTiP: Quantum Toolbox in Python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qu...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "QuTiP: Quantum Toolbox in Python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qu...@googlegroups.com.

Nathan Shammah

unread,
Jan 9, 2020, 11:58:49 AM1/9/20
to qu...@googlegroups.com
Dear All,

I created a gitter room; email is also fine for me.

Best wishes,

Nathan 

On Thu, 9 Jan 2020 at 17:26, Andrew Dawes <andrew...@gmail.com> wrote:
Tesfay and Henri,
Please feel free to email me directly with specific questions, the notebooks I posted work with a stock Jupyter installation but may have some specific dependencies. I'm teaching with them this spring so I will be going through and cleaning up and updating. I'll try to add some clear instructions for how to use them. In the mean time, you can always view them as examples themselves and copy/paste code from them to whatever python interface you prefer.

Best,
Andy

On Thursday, January 9, 2020 at 4:06:17 AM UTC-8, Tesfay mariam wrote:

I I am trying your  to use the notebooks with  Spyder (Python 3.6),  
with some examples, but  i  cant find. i need your suggestions and comments, to resolve this.   

Yours Sincerely,

Tesfay Gebremariam Tesfahannes (PhD.)

Assistant Professor in Quantum Optics and Information
Department of Physics, College of Natural Sciences
ArbaMinch University, Ethiopia
P.O.BOX; 21 Arba Minch- Ethiopia

Phone: +251-980153914

To unsubscribe from this group and stop receiving emails from it, send an email to qutip+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qutip/1c539c2d-4ccf-4f9a-9fc8-87ec43dac9cc%40googlegroups.com.
--

Nathan Shammah

unread,
Jan 20, 2020, 3:44:36 AM1/20/20
to qu...@googlegroups.com
Hi, 

Let me also mention that QuTiP aims at participating to Google Summer of Code 2020, under NumFOCUS. 
Last year QuTiP got two student projects funded, out of five proposals from mentors, and several applications. 
A project for an excellent, motivated student could be framed along these lines.
 
Additionally, the Google Season of Docs, later in Fall 2020, is another opportunity, but there QuTiP may be outside of NumFOCUS, and thus with lower possibilities. 


Best wishes, 

Nathan 

Dr. Nathan Shammah
Postdoctoral Research Scientist
Theoretical Quantum Physics Laboratory
RIKEN, Wako, Saitama, Japan

Wijdan Mahmoud Al-Khaledy

unread,
Jan 21, 2020, 1:57:17 PM1/21/20
to qu...@googlegroups.com

Good evening, can I ask you for help? If possible, I would like the name of a company that specializes in selling devices and equipment for scientific purposes in the field of quantum communications, as well as lasers, optics, and so on.


--
You received this message because you are subscribed to the Google Groups "QuTiP: Quantum Toolbox in Python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qutip+un...@googlegroups.com.

Wijdan Mahmoud Al-Khaledy

unread,
Jan 21, 2020, 1:58:48 PM1/21/20
to qu...@googlegroups.com

Good evening, can I ask you for help? If possible, I would like the name of a company that specializes in selling devices and equipment for scientific purposes in the field of quantum communications, as well as lasers, optics, and so on.

Reply all
Reply to author
Forward
0 new messages