# Mean value of a discrete operator

Given an orthonormal basis $$\{|i\rangle\}$$, I am dealing with an operator that looks like this: $$L=\sum_{j=1}^N|j\rangle\langle j|+\sum_{j\ne k}|j\rangle\langle k|.$$ I would like to calculate its mean value for a generic mixed state $$\rho=\sum_m p_m|\psi_m\rangle\langle\psi_m|$$. I can write $$\text{Tr}(\rho L)=\sum_{i=1}^N\langle i|\left( \left( \sum_{m=1}^N p_m|\psi_m\rangle\langle\psi_m|\right)\left(\sum_{j=1}^N|j\rangle\langle j|+\sum_{j\ne k}|j\rangle\langle k|\right)\right)|i\rangle;$$ focusing on the first term and using the expansion $$|\psi_m\rangle=\sum_l c_l^m|l\rangle$$, I get $$\sum_{i=1}^N\langle i| \left( \sum_{m,j,l,l'}^Np_mc_l^m\bar c_{l'}^m|l\rangle\langle l'|j\rangle\langle j|\right) |i\rangle=\sum_{i=1}^N\langle i| \left( \sum_{m,j,l}^Np_mc_l^m\bar c_{j}^m|l\rangle\langle j|\right) |i\rangle=\sum_{i,m,j,l}^Np_mc_l^m\bar c_j^m\langle i|l\rangle\langle j|i\rangle=\sum_{i,m,j,l}^Np_mc_l^m\bar c_j^m {\delta_{il}\delta_{ji}}=\sum_{m,j}p_m|c_j^m|^2=1;$$ [similar calculations for the second term yield a zero. Therefore, I can write $$\langle L\rangle=1$$.] (Edit: As pointed out in the comment, this is wrong. What I get after reviewing is $$\sum_{i=1}^N \sum_{m,l,l'}^N \sum_{j\ne k}^N p_m c_l^m \bar c_{l'}^m \langle i|l\rangle \langle l'|j\rangle\langle k |i\rangle=\sum_m\sum_{j\ne k} p_m c_k^m \bar c_j^m=\sum_m\sum_{j\ne k}\langle k|p_m|\psi_m\rangle\langle \psi_m|j\rangle=\sum_{j\ne k}\langle k|\rho|j\rangle,$$ that is the sum of the off-diagonal elements of the density matrix.)

My question is: does everything I have written make sense? In particular, I am unsure about the final step as the expansion coefficients depend on both $$m$$ and $$j$$.

• In general nothing can be said since you don't have a specific state. However note that your operator $L$ is proportional to a rank one projector. This leads to some simplification.
Surely the intuitive answer is $$\langle L\rangle = \sum_m p_m\langle\psi_m\vert L\vert \psi_m\rangle$$ i.e. the average of $$\hat L$$ is the weight average of $$\hat L$$ in every component of the mixture. It’s then a job of writing \begin{align} \vert\psi_m\rangle &= \sum_i c_{mi}\vert i\rangle\, ,\\ \langle \psi_m\vert \rho\vert\psi_m\rangle&=\sum_{ab}c_{ma}c_{mb}^* \langle b\vert \rho\vert a\rangle \end{align} and finish the calculation from there.