def gen_ref(): lambda_0 = 0.05 # reorganization energy (dimensionless) omega_0 = 1.0 # vibrational frequency (dimensionless) zeta = 0.5 # damping constant (dimensionless) max_tier = 5 J = pyheom.Brownian(lambda_0, zeta, omega_0) corr_dict = pyheom.noise_decomposition( J, T = 1, # temperature (dimensionless) type_LTC = 'PSD', n_PSD = 1, type_PSD = 'N-1/N' ) n_state = 2 omega_1 = np.sqrt(omega_0**2 - zeta**2 * 0.25) H = np.array([[omega_1, 0], [0, 0]]) V = np.array([[0, 1], [1, 0]]) noises = [ dict(V=V, C=corr_dict) ] h = pyheom.HEOM( H, noises, max_tier=max_tier, matrix_type='dense', hierarchy_connection='loop', ) dt__unit = 5.0e-3 rho_0 = np.zeros((n_state,n_state)) rho_0[0, 0] = 1 h.set_rho(rho_0) callback_interval = 5 count = 10000 ref = [] def callback(t, rho): flat_data = [t] + list(np.reshape(rho, -1)) ref.append(flat_data) h.time_evolution(dt__unit, count, callback, callback_interval) return np.array(ref)
def gen_ref(): noises = [dict(V=V, C=corr_dict)] h = pyheom.HEOM( H, noises, max_tier=max_tier, matrix_type='dense', hierarchy_connection='loop', ) h.set_rho(rho_0) ref = [] def callback(t, rho): flat_data = [t] + list(np.reshape(rho, -1)) ref.append(flat_data) h.time_evolution(dt_unit, count, callback, callback_interval) return np.array(ref)