# Probability of finding harmonic state in a coherent state

A coherent state $|\alpha\rangle$ is defined as $D(\alpha)|\alpha\rangle = \exp(\alpha a^{\dagger}-\alpha^{*}a)|\alpha\rangle$ so that

$$\displaystyle{\langle\hat{n}\rangle \equiv \sum\limits_{n}n\ P(n)= \sum\limits_{n}n\ |\langle n|\alpha\rangle|^{2}}$$

In a coherent state $|\alpha\rangle$, letting $P(n)$ denote the probability of finding $n^{\text{th}}$ harmonic oscillator state. How can you prove the following relation?

$$\displaystyle{\langle\hat{n}\rangle \equiv \sum\limits_{n}n\ P(n)=|\alpha|^{2}}$$

Let me start off anyway:

$$\displaystyle{|\alpha\rangle = \exp\ (\alpha a^{\dagger}-\alpha^{*}a)|0\rangle}$$

$$\displaystyle{|\alpha\rangle = \exp (-|\alpha|^{2}/2) \exp\ (-\alpha^{*}a) \exp\ (\alpha a^{\dagger})|0\rangle}$$

$$\displaystyle{|\alpha\rangle = \exp (-|\alpha|^{2}/2) \exp\ (-\alpha^{*}a) \bigg(\sum\limits_{n'=0}^{\infty} \frac{\alpha^{n'}}{n'!}(a^{\dagger})^{n'}|0\rangle}\bigg)$$

$$\displaystyle{|\alpha\rangle = \exp (-|\alpha|^{2}/2) \exp\ (-\alpha^{*}a) \bigg(\sum\limits_{n'=0}^{\infty} \frac{\alpha^{n'}}{\sqrt{n'!}}|n'\rangle}\bigg)$$

$$\displaystyle{\langle n|\alpha\rangle = \langle n|\left(\exp (-|\alpha|^{2}/2) \exp\ (-\alpha^{*}a) \sum\limits_{n'=0}^{\infty} \frac{\alpha^{n'}}{\sqrt{n'!}}\right) |n'\rangle}.$$

How do you proceed next?

$$\langle {\hat n} \rangle = \langle \alpha | a^\dagger a | \alpha \rangle = \langle 0| D^\dagger(\alpha) \;a^\dagger a\; D(\alpha) |0 \rangle = \\ = \langle 0| \left[ D^\dagger(\alpha) \;a^\dagger\; D(\alpha)\right] \; \left[ D^\dagger(\alpha)\; a \; D(\alpha)\right] |0 \rangle = \\ = \langle 0| \left[ \;a^\dagger + \alpha^* \right] \; \left[ a \; + \alpha\;\right] |0 \rangle = |\alpha|^2$$ where use was made of the unitarity of $D(\alpha)$, $D(\alpha) D^\dagger(\alpha) = I$, and $$D^\dagger(\alpha)\; a \; D(\alpha) = a + \alpha\;\; \;\;\;\text{(and h.c.)}$$ follows straightforwardly from the Baker–Campbell–Hausdorff formula.