I am reading "Introductory to Quantum Optics" by Christopher C. Gerry and Peter L. Knight but I don't understand a solution from which you can obtain the matrix elements of an operator in the number basis if you know the diagonal coherent-state matrix elements of that operator.
page 56:
The diagonal elements of an operator $\hat{F}$ in a coherent state basis completely determine the operator. From Eqs. (3.76) and (3.77) we have
$$ \langle\alpha|\hat{F}|\alpha\rangle e^{\alpha^*\alpha} = \sum_n\sum_m \frac{\alpha^{*m}\alpha^n}{\sqrt{m!n!}} \langle m |\hat{F} | n \rangle$$ Treating $\alpha$ and $\alpha^*$ as independent variables it is apparent that
$$ \frac{1}{\sqrt{m!n!}} \left. \left[ \frac{\partial^{n+m} \left( \langle \alpha | \hat{F} | \alpha \rangle e^{\alpha^*\alpha} \right)}{\partial\alpha^{*m}\partial\alpha^n }\right] \right|_{\alpha^*=0 \\ {\alpha=0}} = \langle m | \hat{F} | n \rangle $$
I am a bit confused right now. In the first equation, $n$ and $m$ are just indices but when I take the derivatives in the second equation into account, $n$ and $m$ are both outside of the sum and that doesn't really make sense to me.
$$ \frac{1}{\sqrt{m!n!}} \left. \left[ \frac{\partial^{n+m} \left( \langle \alpha | \hat{F} | \alpha \rangle e^{\alpha^*\alpha} \right)}{\partial\alpha^{*m}\partial\alpha^n }\right] \right|_{\alpha^*=0 \\ {\alpha=0}} = \frac{1}{\sqrt{m!n!}} \left. \left[ \frac{\partial^{n+m}}{\partial\alpha^{*m}\partial\alpha^n} \sum_n\sum_m \frac{\alpha^{*m}\alpha^n}{\sqrt{m!n!}} \langle m |\hat{F} | n \rangle \right] \right|_{\alpha^*=0 \\ {\alpha=0}}$$
As I understood it, $n$ and $m$ only have a real meaning inside of the sums and I don't really know how to apply the derivatives to prove the solution.