Matrix element from eigenvectors

36 views
Skip to first unread message

vali...@gmail.com

unread,
Jul 3, 2015, 1:19:04 PM7/3/15
to qu...@googlegroups.com
Hello,

This may be a very easy question to answer, but I can't find any example in the documentation of QuTiP.
I am trying to calculate the expectation value of a certain operator Q with the eigenvectors of a Hamiltonian H. I do

evals, evecs = H.eigenstates()

How can I use the function Q.matrix_elements(bra, ket) from evecs? Basically I don't know how to select a given eigenvector from evecs and transpose it. My attempts so far failed.

Thanks a lot for the help!

Best,

Pol

Morgan Hedges

unread,
Jul 6, 2015, 8:40:13 AM7/6/15
to qu...@googlegroups.com, vali...@gmail.com
Hi Pol,

you take the Hermitian adjoint of a ket using it's "dag" method.

To calculate the matrix element between the 5th eigenvector  and some ket "K", you can do

    Q.matrix_element(evecs[4].dag(), K)

Is that what you had in mind?

Morgan
Reply all
Reply to author
Forward
0 new messages