Hello,
I will be thankful in advance if you help me find the problem. between two discrete probability distributions D(p||q)=sum_k(p_k log(p_k/q_k) ) or D(p(t+ delta t)||p(t))=sum_k( (d/ dt p_k) /p_k )(delta t)^2 that delta t is very small. ia have a density matrix from the master equation, p and q are population and HS is the Hamiltonian of the system. I write a code for that but I don't know what is the problem in the code that the result I_E for the initial and separate initial state is the same.
evecs = HS.eigenstates() P_k = projectors(HS) delta_t = tlist[1] - tlist[0]
for i in range(len(tlist) - 1): rho_t = result.states[i] rho_t_plus_dt = result.states[i + 1]
p_k_t = probabilities(rho_t, P_k)
p_k_t_plus_dt = probabilities(rho_t_plus_dt, P_k)
log_probabilities = np.log2(p_k_t/ p_k_t_plus_dt)
d_log_probabilities_dt = np.gradient(log_probabilities, tlist, axis=0)
I_E_t = np.sum((d_log_probabilities_dt ** 2) * probabilities_t, axis=1)