Animated Wigner function

57 views
Skip to first unread message

Jeremie Guillaud

unread,
Dec 7, 2017, 10:22:54 AM12/7/17
to QuTiP: Quantum Toolbox in Python
Hi everyone,

As this is my first message on the Google group I would like first to congratulate you all for the amazing work you are doing with the QuTiP project !

Now, I write this message as I cannot seem to be able to run correctly one of the examples notebook, the tutorial demonstrating how to plot animate Wigner functions : JC-model-wigner-function.ipynb.

When I run this notebook, I get the error message RuntimeError: The animation function must return a sequence of Artist objects.

Do you know what is going wrong?

Thanks for you help,
Jérémie

Lucas Verney

unread,
Dec 7, 2017, 11:03:31 AM12/7/17
to qu...@googlegroups.com
Hi,

Indeed, it seems there is a missing return instruction
[here](https://github.com/qutip/qutip/blob/master/qutip/ipynbtools.py#L387).

I made a [Pull Request](https://github.com/qutip/qutip/pull/783) with a
fix for this issue. Additionnally, the `plot_animation` function in the
notebook should be updated.

As a temporary fix, here is an updated version of the notebook which
should be working fine:
https://framadrop.org/r/3xIRmQOyEn#rtoJ3lv4WQxMzVaRZFSfAa1yr+yuT3OzO+uX8i7hCis=.

Best,
--
Lucas

Jeremie Guillaud

unread,
Dec 7, 2017, 11:20:18 AM12/7/17
to QuTiP: Quantum Toolbox in Python
Hi Lucas, 

Thank you for your swift and accurate answer ! Indeed it seems to work fine now.

Jérémie

Lucas Verney

unread,
Dec 7, 2017, 11:31:07 AM12/7/17
to qu...@googlegroups.com
My bad, actually there was a small typo (ax instead of axes at some
point). Here is a fixed version that should work out of the box:
https://framadrop.org/r/wscy1a7Dzy#ubKqBbsV2rJQKy+A9F5uNna06kXiRq8pBi2cUBW64I8=.

Best,
--
Lucas
Reply all
Reply to author
Forward
0 new messages