$$\rho_{m}=\sum_{i} p(i \mid m)\left|\psi_{i}^{m}\right\rangle\left\langle\psi_{i}^{m}\right|=\sum_{i} p(i \mid m) \frac{M_{m}\left|\psi_{i}\right\rangle\left\langle\psi_{i}\right| M_{m}^{\dagger}}{\left\langle\psi_{i}\left|M_{m}^{\dagger} M_{m}\right| \psi_{i}\right\rangle}$$

\begin{aligned} 00:|\psi\rangle & \rightarrow \frac{|00\rangle+|11\rangle}{\sqrt{2}} \\ 01:|\psi\rangle & \rightarrow \frac{|00\rangle-|11\rangle}{\sqrt{2}} \\ 10:|\psi\rangle & \rightarrow \frac{|10\rangle+|01\rangle}{\sqrt{2}} \\ 11:|\psi\rangle & \rightarrow \frac{|01\rangle-|10\rangle}{\sqrt{2}} \end{aligned}

\begin{aligned}\langle v \mid w\rangle &=\left(\sum_{i} v_{i}|i\rangle, \sum_{j} w_{j}|j\rangle\right)=\sum_{i j} v_{i}^{*} w_{j} \delta_{i j}=\sum_{i} v_{i}^{*} w_{i} \\ &=\left[v_{1}^{*} \ldots v_{n}^{*}\right]\left[\begin{array}{c}w_{1} \\ \vdots \\ w_{n}\end{array}\right] . \end{aligned} $$\left(\sum_{i} a_{i}\left|v_{i}\right\rangle \otimes\left|w_{i}\right\rangle, \sum_{j} b_{j}\left|v_{j}^{\prime}\right\rangle \otimes\left|w_{j}^{\prime}\right\rangle\right) \equiv \sum_{i j} a_{i}^{*} b_{j}\left\langle v_{i} \mid v_{j}^{\prime}\right\rangle\left\langle w_{i} \mid w_{j}^{\prime}\right\rangle$$ \begin{aligned}\left\langle\varphi\left|\left\langle 0\left|U^{\dagger} U\right| \psi\right\rangle\right| 0\right\rangle &=\sum_{m, m^{\prime}}\left\langle\varphi\left|M_{m}^{\dagger} M_{m^{\prime}}\right| \psi\right\rangle\left\langle m \mid m^{\prime}\right\rangle \\ &=\sum_{m}\left\langle\varphi\left|M_{m}^{\dagger} M_{m}\right| \psi\right\rangle \\ &=\langle\varphi \mid \psi\rangle . \end{aligned} \begin{aligned} p(m) &=\left\langle\psi\left|\left\langle 0\left|U^{\dagger} P_{m} U\right| \psi\right\rangle\right| 0\right\rangle \\ &=\sum_{m^{\prime}, m^{\prime \prime}}\left\langle\psi\left|M_{m^{\prime}}^{\dagger}\left\langle m^{\prime}\left|\left(I_{Q} \otimes|m\rangle\langle m|\right) M_{m^{\prime \prime}}\right| \psi\right\rangle\right| m^{\prime \prime}\right\rangle \\ &=\left\langle\psi\left|M_{m}^{\dagger} M_{m}\right| \psi\right\rangle \end{aligned}
##### $Exercise 2.2:$

(Matrix representations: example)

Suppose $V$ is a vector space with basis vectors $|0\rangle$ and $|1\rangle$, and $A$ is a linear operator from $V$ to $V$ such that $A|0\rangle=|1\rangle$ and $A|1\rangle=|0\rangle$. Give a matrix representation for $A$, with respect to the input basis $|0\rangle , |1\rangle$ , and the output basis$|0\rangle,|1\rangle$. Find input and output bases which give rise to a different matrix representation of $A$.

###### 解答

\begin{array}{l} A|0\rangle=0|0\rangle+1|1\rangle \ A|1\rangle=1|0\rangle+0|1\rangle \end{array}

$$\left[\begin{array}{ll}0 & 1 \\ 1 & 0\end{array}\right]$$

$$\left[\begin{array}{ll}a & b \\ c & d\end{array}\right]$$