# Unitary operator acting to transform Hamiltonian

I am working with the atom-light interaction, where the atom is considered a two-level system and the total Hamiltonian is given by $$H = H_A + H_{AL} = \hbar\omega_0\hat\sigma_{ee} + \frac{\hbar\Omega}{2}(\hat\sigma_{ge}e^{i\omega t} + \hat\sigma_{eg}e^{-i\omega t})$$ where $$\hat\sigma_{ab} = |a\rangle\langle b|$$ and $$\omega_0,\omega$$ correspond to the atomic transition frequency and laser frequency respectively. I would like to transform this into the rotating frame, as seen [here][1], by the unitary transform $$U = e^{i\omega t |e\rangle\langle e|}$$.

I believe that, for a time-dependant unitary transform, the Hamiltonian transforms as $$\tilde{H} = UHU^\dagger + i\hbar\left(\frac{\partial}{\partial t}U\right)U^\dagger$$

My question is probably rather basic, but I am unsure of how the exponential operator would act on the Hamiltonian. For example, what does $$(e^{i\omega t |e\rangle\langle e|})(\hbar\omega_0|e\rangle\langle e|)(e^{-i\omega t |e\rangle\langle e|})$$ become? My question is essentially how do the bras and kets in the exponential act on the bras and kets that are not in an exponential?

Exponentials of operators are defined by their power series. $$\exp(\hat{O}) = \sum_{n=0}^{\infty} \frac{\hat{O}^n}{n!}$$ So your question boils down to: what are the exponentials of a projection operator?

We immediately see that $$(i\omega t |e\rangle\langle e|)^n = (i\omega t |e\rangle\langle e|)\cdot(i\omega t |e\rangle\langle e|)\dots = (i\omega t)^n|e\rangle\langle e|$$ and therefore $$e^{i\omega t |e\rangle\langle e|} = e^{i\omega t} |e\rangle\langle e|$$.