I am working on calculating the interaction between 2-level atoms and an coherent laser field. I can calculate the radiation intensity versus time from the atoms. I want to calculate the spectrum now. I know the spectrum can be calculated as the fourier transform of \(\langle \sigma^\dagger(t)\sigma(t+\tau)\rangle\),where \(\sigma(t)=\lvert 0\rangle \langle 1 \rvert\) is the lower operator of the atom. I am not sure how to calculate the expectation value containing 2 different time. I heard that it is possible to do so by using the quantum regression theorem. But I don't really understand it, could someone tell me how to use quantum regression theorem using computer explicitly? I am using matlab and treating the operators as matrix. Thank you.