Hello.
I am doing a simulation on atom-photon interaction and I tried entropy_vn() to check the correlation between particles and modes.
I assumed that if an atom and two light modes are in a pure state, von neumann entorpy of the state would be zero, but the number I got
was negative number.
Foe example, when I tried
max_n=25
mode1=2.3
mode2=2.3
psi0 = tensor(basis(4,0), coherent(max_n, mode1),coherent(max_n,mode2))
, the von Neumann entropy of psi0
entropy_vn(psi0)
was around -660125.
It seems that this problem happens only when the number of particles and modes are larger than 3.
I wonder how I can fix this problem.