# What's the difference between $p(i|m)$ and $p(m|i)$ in measurement?

Suppose we perform a measurement described by measurement operators $$M_m$$. If the initial state is $$|{\psi_i}\rangle$$, then the probability of getting result $$m$$ is \begin{align} p(m|i)=\| M_m|\psi_i\rangle \|^2 = \langle\psi_i|M_m^\dagger M_m|\psi_i\rangle =tr(M_m^\dagger M_m|\psi_i\rangle\langle\psi_i|). \end{align} After a measurement that yields the result $$m$$, we have an ensemble of states $$|\psi_i^m\rangle$$ with respective probabilities $$p(i|m)$$. The corresponding density operator $$\rho_m$$ is therefore

\begin{align} \rho_m = \sum_ip(i|m)|\psi_i^m\rangle\langle\psi_i^m|. \end{align}

I'm wondering whether $$p(i|m)$$ and $$p(m|i)$$ refer to the inverse procedure? How are those two procedures connected? Is $$|\psi_i^m\rangle$$ a subset of the initial ensemble $$|\psi_i\rangle$$? Can I rewrite $$\rho_m$$ as

\begin{align} \rho_m = \sum_{ij}p(j|m)p(m|i)|\psi_{ij}^m\rangle\langle\psi_{ij}^m| \end{align} ?

• $|\psi_i^m \rangle$ is the collapsed state after making measurement with operator $M_m$ on the state $|\psi_i\rangle$. Here $|\psi_i\rangle$ is the ensemble of states that made up the density operator $\rho$. And $p(i|m)$ should correspond to $\langle \psi_i^m| M_m M_m^\dagger | \psi_i^m \rangle$ Jan 18 at 22:11
• @KAJ226 Thanks!! Then can I rewrite $\rho_m$ as the updated notation in the question? :-)
– ZR-
Jan 18 at 22:21

These are classical conditional probabilities used extensively in Bayesian probability.

Suppose Alice can prepare any of a number of pure states $$|\psi_i\rangle$$. She chooses $$i$$ randomly from distribution $$p(i)$$, prepares a system in state $$|\psi_i\rangle$$ and gives it to Bob without telling him the random choice $$i$$. Suppose also that Bob knows the distribution $$p(i)$$ and the pure states $$|\psi_i\rangle$$. Thus, in Bob's description the system is in state

$$\rho = \sum_i p(i)|\psi_i\rangle\langle \psi_i|.$$

Bob performs a measurement described by operators $$M_k$$ and obtains the result $$m$$. He does not tell Alice the result $$m$$, but Alice does know the measurement operators $$M_m$$ that Bob uses.

$$p(i|m)$$: What Bob learns about preparation $$i$$ from measurement outcome $$m$$

Notice that the outcome $$m$$ may be more likely in some states $$|\psi_i\rangle$$ than in others. Learning the measurement outcome $$m$$ alters Bob's knowledge of the original state: before the measurement he assigns probability $$p(i)$$ to Alice having selected $$i$$, but after the measurement he assigns $$i$$ the probability

$$p(i|m) = \frac{p(i, m)}{p(m)}\tag1$$

where $$p(i, m)$$ is the joint probability of $$i$$ and $$m$$. An extreme case of this occurs if the states $$|\psi_i\rangle$$ form an orthonormal basis and $$M_k = |\psi_k\rangle\langle\psi_k|$$ are the associated projectors. In this case, Bob can identify $$i = m$$ with certainty.

$$p(m|i)$$: What Alice predicts about measurement outcome $$m$$ from her knowledge of preparation $$i$$

Before performing the measurement, Bob assigns to each outcome $$m$$ probability

$$p(m) = \mathrm{tr}(M_m^\dagger M_m \rho).$$

However, Alice knows $$i$$ and assigns different probabilities to each outcome $$m$$

$$p(m|i) = \langle\psi_i|M_m^\dagger M_m|\psi_i\rangle = \frac{p(i, m)}{p(i)}.\tag2$$

Once again, an extreme case occurs if the states $$|\psi_i\rangle$$ form an orthonormal basis and $$M_k = |\psi_k\rangle\langle\psi_k|$$ are the associated projectors. In this case, Alice can predict measurement outcome $$m = i$$ with certainty.

Connection between $$p(i|m)$$ and $$p(m|i)$$

Thus, the two quantities do not refer to inverse procedures. Instead, they refer to the same procedure, but describe knowledge about one uncertain variable provided by the knowledge of another. Namely, $$p(m|i)$$ captures the knowledge about the measurement result of someone who knows the preparation while $$p(i|m)$$ captures the knowledge inferred about the preparation of someone who knows the measurement result.

Mathematically, the connection between the two conditional probabilities is given by the Bayes' theorem

$$p(i|m) \, p(m) = p(m|i) \, p(i).$$

Post-measurement state

The last equality in the question is not correct. In particular, it is not clear what multiplying the two conditional probabilities means since they are normalized to different events (c.f. denominators in $$(1)$$ and $$(2)$$). Also, it is not clear what the double subscript in $$|\psi_{ij}^m\rangle$$ indicates.

The correct formula for post-measurement state from the perspective of Alice who knows preparation $$i$$ but does not know measurement outcome is

$$\rho_i = \sum_m p(m|i)|\psi_i^m\rangle\langle\psi_i^m|$$

whereas from the perspective of Bob who knows measurement outcome $$m$$ but does not know preparation $$i$$ is

$$\rho_m = \sum_i p(i|m)|\psi_i^m\rangle\langle\psi_i^m|$$

where $$|\psi_i^m\rangle=\frac{M_m|\psi_i\rangle}{\|M_m|\psi_i\rangle\|}$$ is the post-measurement state associated with outcome $$m$$ and the pure state $$|\psi_i\rangle$$. In particular, $$|\psi_i^m\rangle$$ is not in general a member of the initial ensemble $$|\psi_i\rangle$$. Compare the last equation to $$(2.145)$$ in Nielsen & Chuang.

• Thanks so much for the comprehensive answer! I'm a little bit confused with the extreme cases in two scenarios, does that imply that $\rho_i$ or $\rho_m$ are density matrices for pure states if the pre-measurement states $|\psi_i\rangle$ form an orthogonal basis?
– ZR-
Jan 21 at 21:27
• Yes. Note that this is really one and the same case that serves as an extreme one for both Alice's and Bob's perspective. In this case, $p(m|i) = 1$ iff $i=m$ and $p(m|i)=0$ otherwise, so $\rho_i = |\psi_i^i\rangle\langle\psi_i^i|$ is a pure state. Moreover, $|\psi_i^i\rangle = |\psi_i\rangle$, so it is in fact the same pure state that Alice prepared. Similarly, $p(i|m) = 1$ iff $m=i$ and $p(i|m) = 0$ otherwise, so $\rho_m = |\psi_m^m\rangle\langle\psi_m^m|$ and again $|\psi_m^m\rangle = |\psi_m\rangle$ is the pure state that Alice prepared. Jan 21 at 21:58
• Note also that the conditions that define this extreme case fix both the preparation ($|\psi_i\rangle$ are orthonormal) and the measurement ($M_m = |\psi_m\rangle\langle\psi_m|$). Jan 21 at 22:01
• Thanks, that's really helpful! What's the difference between $|\psi_i^m\rangle$ and $|\psi_m^m\rangle$?
– ZR-
Jan 21 at 22:50
• They are the same. I wrote $|\psi_m^m\rangle$ for $|\psi_i^m\rangle$ in the case where we know that $i=m$. Jan 21 at 23:53