How to extract scalar out of quantum object?

13 views
Skip to first unread message

Ka Wa Yip

unread,
Apr 6, 2015, 6:24:16 PM4/6/15
to qu...@googlegroups.com

For example I have the following quantum object:

Quantum object: dims = [[1], [1]], shape = [1, 1], type = oper, isherm = True
Qobj data =
[[ 0.]]



How to extract 0 (the scalar) out of this quantum object?

Thanks!

Paul Nation

unread,
Apr 6, 2015, 11:18:06 PM4/6/15
to qu...@googlegroups.com
q.full()[0][0] or q[0][0][0] is the easiest in the case of a single number.

--
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.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages