# Expectation value of number operator $\hat{n}$

I'm studying for my quantum mechanics test and I've stumbled on this problem. They want the expectation value of $\hat{n}$, $\langle \hat{n} \rangle$, with this given $\psi$ at $t=0$: $$\lvert \psi(t=0) \rangle = \frac{1}{\sqrt{2}} (\lvert n \rangle + e^{i\phi} \lvert n+1 \rangle).$$ I know that I have to use $\langle \psi \vert \hat{n} \vert \psi \rangle$ but I'm not sure how to work with the $\lvert n \rangle$ bra's in the integral. How do they conjugate and can I write the $n$ in the middle as $\lvert n \rangle$?

## 1 Answer

Think of $\lvert \psi \rangle$ as being written $a \lvert n \rangle + b \lvert n{+}1 \rangle$ -- it is just a linear combination of $\lvert n \rangle$ and $\lvert n{+}1 \rangle$ with (possibly complex) coefficients $a$ and $b$. Converting from a ket to a bra (i.e., finding the dual) distributes over addition and scalar multiplication, and it complex-conjugates scalars. For example, $\lvert \psi \rangle = \lvert n \rangle \to \langle n \rvert = \langle \psi \rvert$ and $\lvert \psi \rangle = a \lvert n{+}1 \rangle \to a^* \langle n{+}1 \rvert = \langle \psi \rvert$.

Now one confusing point is that the index (or sometimes scalar) $n$ is different from the vector $\lvert n \rangle$ which is different from the operator $\hat{n}$. (Some authors omit that hat, possibly leading to more confusion.) $\hat{n}$ has as its eigenstates $\lvert k \rangle$ (switching to $k$ to avoid confusion), with eigenvalues $k$. That is, $\hat{n} \lvert k \rangle = k \lvert k \rangle$.

By the way, there's no actual integration required. When you evaluate things like $\langle n \vert \hat{n} \vert n{+}1 \rangle$, you're just finding the inner product of $\lvert n \rangle$ and $\hat{n} \lvert n{+}1 \rangle$, which, conveniently, involves no antidifferentiation at all. Sometimes you do things in the position or momentum basis, and only then do you have to resort to integrals.

• But where do the bra's come from? I only have ket's now – Coolcrab Sep 20 '14 at 20:29
• @Coolcrab By definition a bra is the conjugate transpose of a ket. – Bubble Sep 20 '14 at 20:34
• So if $\hat{n} = aa^{+}$ (Lowering and raising operator) it comes out $n + \frac{3}{2}$? – Coolcrab Sep 20 '14 at 20:41