In the Quantum Operations section in Nielsen and Chuang, (page 358 in the 2002 edition), they have the following equation: $$\mathcal E(\rho) = \mathrm{Tr}_{env} [U(\rho \otimes \rho_{env})U^\dagger]$$
They show an example with $\rho_{env} = |0\rangle \langle0|$ and $U = \mathrm{CNOT}$, and claim that the final solution is: $$P_0\rho P_0 + P_1\rho P_1,$$ where $P_0=|0\rangle \langle0|$ and $P_1=|1\rangle \langle 1|$.
These are my steps so far to get this, but I don't know how to trace out the environment after this:
Let $\rho$ be $|\psi \rangle \langle \psi |$, so that $\rho \otimes \rho_{env} = |\psi, 0\rangle \langle \psi, 0|$.
Applying the unitary $U$, we have
$$ |00 \rangle \langle 00| \psi, 0 \rangle \langle \psi, 0 | 00 \rangle \langle 00 | + |00 \rangle \langle 00| \psi 0 \rangle \langle \psi 0 | 10 \rangle \langle 11 | \\ + |11 \rangle \langle 10| \psi 0 \rangle \langle \psi 0 | 00 \rangle \langle 00 | + |11 \rangle \langle 10| \psi 0 \rangle \langle \psi 0 | 10 \rangle \langle 11 |. $$
I don't know how to trace out the environment in the above state.
Also, I realize that I have considered only a pure state, if anyone can show it for a general state that would be great.