niazalikhan87 / qutip

Automatically exported from code.google.com/p/qutip
2 stars 1 forks source link

ekets from eigenstates() can be numpy float #13

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
checkout svn version of qutip, execute ex_ultrastrong_coupling.py
1. ekets, evals = H.eigenstates() 
2. psi_gnd = ekets[0]
3. ket2dm(psi_gnd)

What is the expected output? density matrix of psi_gnd

What do you see instead? psi_gnd is not a QObj and has therefore no type, error

What version of the product are you using? svn

On what operating system? mac

Original issue reported on code.google.com by wolfgang...@gmail.com on 30 Mar 2012 at 3:30

GoogleCodeExporter commented 8 years ago
Hi

If you are using the code from SVN you need to change the order of ekets and 
evals, like this:

evals,ekets = H.eigenstates() 

The order "evals,ekets" is going to be the used from qutip 2.0 and forward. We 
changed the order to make it consistent with for example scipy eigs function.

Original comment by jrjohans...@gmail.com on 1 Apr 2012 at 8:13