def floquet_master_equation_rates(f_modes_0, f_energies, c_op, H, T, args, J_cb, w_th, kmax=5, f_modes_table_t=None): """ Calculate the rates and matrix elements for the Floquet-Markov master equation. Parameters ---------- f_modes_0 : list of :class:`qutip.qobj` (kets) A list of initial Floquet modes. f_energies : array The Floquet energies. c_op : :class:`qutip.qobj` The collapse operators describing the dissipation. H : :class:`qutip.qobj` System Hamiltonian, time-dependent with period `T`. T : float The period of the time-dependence of the hamiltonian. args : dictionary Dictionary with variables required to evaluate H. J_cb : callback functions A callback function that computes the noise power spectrum, as a function of frequency, associated with the collapse operator `c_op`. w_th : float The temperature in units of frequency. k_max : int The truncation of the number of sidebands (default 5). f_modes_table_t : nested list of :class:`qutip.qobj` (kets) A lookup-table of Floquet modes at times precalculated by :func:`qutip.floquet.floquet_modes_table` (optional). Returns ------- output : list A list (Delta, X, Gamma, A) containing the matrices Delta, X, Gamma and A used in the construction of the Floquet-Markov master equation. """ N = len(f_energies) M = 2 * kmax + 1 omega = (2 * pi) / T Delta = np.zeros((N, N, M)) X = np.zeros((N, N, M), dtype=complex) Gamma = np.zeros((N, N, M)) A = np.zeros((N, N)) nT = 100 dT = T / nT tlist = np.arange(dT, T + dT / 2, dT) if f_modes_table_t is None: f_modes_table_t = floquet_modes_table(f_modes_0, f_energies, np.linspace(0, T, nT + 1), H, T, args) for t in tlist: # TODO: repeated invocations of floquet_modes_t is # inefficient... make a and b outer loops and use the mesolve # instead of the propagator. # f_modes_t = floquet_modes_t(f_modes_0, f_energies, t, H, T, args) f_modes_t = floquet_modes_t_lookup(f_modes_table_t, t, T) for a in range(N): for b in range(N): k_idx = 0 for k in range(-kmax, kmax + 1, 1): X[a, b, k_idx] += (dT / T) * exp(-1j * k * omega * t) * \ (f_modes_t[a].dag() * c_op * f_modes_t[b])[0, 0] k_idx += 1 Heaviside = lambda x: ((np.sign(x) + 1) / 2.0) for a in range(N): for b in range(N): k_idx = 0 for k in range(-kmax, kmax + 1, 1): Delta[a, b, k_idx] = f_energies[a] - f_energies[b] + k * omega Gamma[a, b, k_idx] = 2 * pi * Heaviside(Delta[a, b, k_idx]) * \ J_cb(Delta[a, b, k_idx]) * abs(X[a, b, k_idx]) ** 2 k_idx += 1 for a in range(N): for b in range(N): for k in range(-kmax, kmax + 1, 1): k1_idx = k + kmax k2_idx = -k + kmax A[a, b] += Gamma[a, b, k1_idx] + \ n_thermal(abs(Delta[a, b, k1_idx]), w_th) * \ (Gamma[a, b, k1_idx] + Gamma[b, a, k2_idx]) return Delta, X, Gamma, A