Solution (source code)

= Solution

With $\hbar=1$, the free propagator is $U_0=\operatorname{diag}(e^{i\omega_1t},1,e^{i\omega_2t})$. If $E_j$ are its <Quantum Hamiltonian> <eigenvalues>, conjugation multiplies the $jk$ matrix element of $H_1$ by $e^{i(E_j-E_k)t}$. Therefore the <interaction picture> <Quantum Hamiltonian> is
$$
\boxed{H_I(t)=\begin{pmatrix}
0&d_1e^{-i\omega_1t}&0\\
d_1e^{i\omega_1t}&0&d_2e^{i\omega_2t}\\
0&d_2e^{-i\omega_2t}&0
\end{pmatrix}.}
$$
Opposite off-diagonal phases are complex conjugates, as required by Hermiticity. The upper $2$–$3$ element has the opposite phase sign to the upper $1$–$2$ element because the middle level lies above both outer levels.