Printing format of Qobject in Google Colab

108 views
Skip to first unread message

Omid Hassasfar

unread,
Oct 26, 2023, 8:19:56 AM10/26/23
to QuTiP: Quantum Toolbox in Python
Hi everyone,

I was trying to use QuTiP in Google Colab, but I could not see the Quantum Object (Vectors and Matrices) as I can see in the Jupyter Notebook. Do I need to install another package(s)
alone with QuTiP in Colab?

I have attached 2 photos to clarify what I mean.
Jupyter notebook.png
Colab .png

Nathan Shammah

unread,
Oct 26, 2023, 8:49:50 AM10/26/23
to qu...@googlegroups.com
Hi Omid, 

I faced the same problem. As a side note, following guidelines from qutip-qip or from stack overflow did not help.

Bests, 
Nathan

--
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/3923aa17-b201-408b-b770-0a86140a1e2en%40googlegroups.com.


--
Dr. Nathan Shammah

Omid Hassasfar

unread,
Oct 26, 2023, 9:20:35 AM10/26/23
to QuTiP: Quantum Toolbox in Python
For online coding I recently used https://anaconda.cloud/ and it worked but I do not know why in Colab it does not work, and what package is preinstalled in Anaconda-cloud which is not in Colab!

ROHIT ROY

unread,
Oct 26, 2023, 10:40:36 AM10/26/23
to qu...@googlegroups.com
Hi Omid, 

A working shortcut can be found with print() function in python. Although, this is not giving answer to your question, I think it will be helpful for you. As the attachment shows, it is not as nicely formatted as jupyter output but gives a working situation. Down side is you need to call print function everytime when Qobj() print is required in the output. (If you have already tried this idea then please ignore this message) 

Thanks and best regards, 
Rohit


--
Screenshot_2023-10-26-19-44-58-549_com.android.chrome-edit.jpg
Reply all
Reply to author
Forward
0 new messages