# Single-qubit quantum channel from the CNOT gate

I am studying quantum noise, chapter $$8$$ in Nielsen and Chuang. Section $$8.2.2$$ introduces an example for the definition of quantum operations, in particular the CX gate is introduced as an example. I however do not understand this seemingly trivial example. Figure 8.4. and equation $$(8.7)$$. both claim that $$\mathcal{E}(\rho) = P_0 \rho P_0 + P_1 \rho P_1$$ where $$P_k=|k\rangle\langle k|$$. Substituting a general $$\rho = \begin{pmatrix} a & b \\ b^* & c \end{pmatrix}$$ one gets $$\mathcal{E}(\rho) = \begin{pmatrix} a & 0 \\ 0 & c \end{pmatrix}.$$ This seems wrong to me, as a CX gate should leave the control state unaffected. In addition I manually calculated $$CX$$ [$$|0\rangle\langle 0|\otimes \rho$$] $$CX$$. Taking the partial trace of that, I also get $$\mathcal{E}(\rho)$$ = $$\rho$$. Where am I wrong? I have also noticed equations 8.25 and 8.26 showing $$E_i$$ once as a scalar, and once as a matrix. Maybe I am confused about notation somewhere and this also has something to do with it, I don't know.

You calculated $${\rm tr}_1(\mathrm{CX}(|0\rangle\langle 0|\otimes\rho)\mathrm{CX})$$ which—as you correctly observed—is equal to $$\rho$$ because the control qubit is in the $$|0\rangle$$ state so nothing happens. However, comparing with Eq.(8.6) Nielsen and Chuang define the channel induced by $$(\mathrm{CX},|0\rangle\langle 0|)$$ as $$\mathcal E(\rho):={\rm tr}_2(\mathrm{CX}(\rho\otimes|0\rangle\langle 0|)\mathrm{CX}^\dagger)={\rm tr}_2(\mathrm{CX}(\rho\otimes|0\rangle\langle 0|)\mathrm{CX})$$ so not the auxiliary state but the input state acts as the control; hence why $$\mathrm{CX}$$ acts non-trivially. More precisely, $$\mathrm{CX}$$ turns $$\rho\otimes|0\rangle\langle 0|=\begin{pmatrix} \rho_{11} & 0 & \rho_{12} & 0 \\ 0 & 0 & 0 & 0 \\ \rho_{21} & 0 & \rho_{22} & 0 \\ 0 & 0 & 0 & 0 \end{pmatrix}$$ into $$\mathrm{CX}(\rho\otimes|0\rangle\langle 0|)\mathrm{CX}=\begin{pmatrix} \rho_{11} & 0 & 0 & \rho_{12} \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ \rho_{21} & 0 & 0 & \rho_{22} \end{pmatrix}$$ which is why the partial trace only returns the diagonal elements of the input $$\rho$$.
• I did this exact calculation, but performing the partial trace of your last matrix I get $\rho$ because $$\begin{bmatrix} \rho_{11} & 0 & 0 & \rho_{12} \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ \rho_{21} & 0 & 0 & \rho_{22} \end{bmatrix}$$ = $\rho_{11} * \ket{0}\bra{0} \otimes \ket{0}\bra{0} + \rho_{12} * \ket{0}\bra{1} \otimes \ket{0}\bra{1} + \rho_{21} * \ket{1}\bra{0} \otimes \ket{1}\bra{0} + \rho_{22} * \ket{1}\bra{1} \otimes \ket{1}\bra{1}$. Isnt the prtl. trace of that = $\rho_{11} * \ket{0}\bra{0} + \rho_{12} * \ket{0}\bra{1} + \rho_{21} * \ket{1}\bra{0} + \rho_{22} * \ket{1}\bra{1}$? Commented Jul 7 at 8:11
• Recall that the partial trace acts on tensor products as follows: ${\rm tr}_2(A\otimes B)=A{\rm tr}(B)$. Therefore, $${\rm tr}_2(|0\rangle\langle 1|\otimes|0\rangle\langle 1|)=|0\rangle\langle 1|{\rm tr}(|0\rangle\langle 1|)=|0\rangle\langle 1|\,\langle 1|0\rangle=0$$ which is why the $\rho_{12},\rho_{21}$ terms vanish when taking the partial trace Commented Jul 7 at 10:17
First, it is not true that CX leaves the control qubit unaffected. If it did, then it could not create entangled states. In any case, you can convince yourself that the control qubit may be affected by checking that \begin{align} \text{CX}|{+_c}\rangle|{-_t}\rangle=|{-_c}\rangle|{-_t}\rangle.\tag1 \end{align} Second, the calculation corresponding to figure 8.4 does not yield the identity channel, because it is the input/output qubit (in state $$\rho$$), not the environment qubit (in state $$|0\rangle$$), that acts as the control. In other words, \begin{align} \mathcal{E}(\rho)&=\mathrm{tr}_t\left(\text{CX}(\rho_c\otimes|0_t\rangle\langle 0_t|)\text{CX}\right)\tag2 \end{align} but $$\text{CX}=\sum_{k\in\{0,1\}}P_k\otimes X^k$$ where $$P_k=|k\rangle\langle k|$$, so \begin{align} \mathcal{E}(\rho)&=\sum_{i,j\in\{0,1\}}\mathrm{tr}_t(P_i\rho P_j\otimes X^i|0\rangle\langle 0|X^j)=\tag3\\ &=\sum_{i,j\in\{0,1\}}P_i\rho P_j\cdot\mathrm{tr}(|i\rangle\langle j|)=\tag4\\ &=\sum_{k\in\{0,1\}}P_k\rho P_k \end{align} in agreement with equation $$(8.7)$$ in the book.
The easiest way to see it, is to write $$CX$$ as $$|00\rangle\langle00| + |01\rangle\langle01| + |10\rangle\langle11| + |11\rangle\langle10|$$ (I assumed that the first entry is the system and the second is the environment).
Now, the partial trace will give you $$\langle0|U\rho\otimes|0\rangle\langle0|U^\dagger|0\rangle + \langle1|U\rho\otimes|0\rangle\langle0|U^\dagger|1\rangle$$, where the environment in the middle is assumed to be in the state $$|0\rangle\langle0|$$.
So, for the first term only $$|00\rangle\langle00|$$ will survive, because for all other terms the environment has a $$|1\rangle$$ somewhere. After the trace this is reduced to $$|0\rangle\langle0|\rho|0\rangle\langle0|$$. In contrast, for the second term you need something that mixes $$|1\rangle$$ and $$|0\rangle$$, so to the left you have $$|11\rangle\langle10|$$ (which leaves you with $$|1\rangle\langle1|$$), and to the right $$|10\rangle\langle11|$$ (which also leaves you with $$|1\rangle\langle1|$$).