Hello everyone,
I am having problems using the funciton entropy_vn_dicke.
I attach here a specific example where I compute the steady-state of a spin system for a given value of parameter such that I known that the steady-state is almost a pure state (very low entropy). The function entropy_vn_dicke gives me -Inf and it does that for a wide range of values of g where indeed the state is very pure. If instead I pay the 2^N overheads the standard "entropy_vn" gives the correct results (see
https://nbviewer.org/github/qutip/qutip-notebooks/blob/master/examples/piqs-entropy_purity.ipynb). When g is large both the methods work well and give the same result. Any idea to fix this issue?
Thanks in advance for your help !
"""
Created on Thu May 19 10:29:10 2022
@author: albertobiella
"""
from qutip import *
from qutip.piqs import *
import numpy as np
import numpy.random
from scipy.linalg import eig
from scipy.sparse import block_diag
N = 10
system = Dicke(N)
[jx, jy, jz] = jspin(N,basis="dicke")
jx=jx*2
jy=jy*2
jz=jz*2
V=3
g=1
system.emission = 1
system.hamiltonian = V/(2*(N-1)) * jz*jz + g/2 * jx
D_tls = system.liouvillian()
#calculating the steady state
rho_ss = steadystate(D_tls,method='eigen',)
#calculating vn entropy in the Dicke basis
vn_dicke=entropy_vn_dicke(rho_ss)
#calculating vn entropy in the Dicke basis (with overhead)
vn_dicke_over=entropy_vn(Qobj(block_diag(dicke_blocks_full(rho_ss))))
print(vn_dicke,vn_dicke_over)