Converting from Stinespring form to Krauss form

Suppose that you are given a description of a quantum operation that takes an $n$-qubit state $\rho$ as input and produced an $n'$-qubit state $\sigma$ as output, where the description is of the following form (where $n+m=n'+m'$):
 
  1. Append $m$ quits in the state $\ket{0^m}$ to the end of the input state.
  2. Apply an $(n+m)$-qubit unitary operation $U$.
  3. Trace out the first $m'$ qubits (resulting in an $n'$-qubit output).

Lets show how to implement this in Krauss form as
\[
 \rho\mapsto \SUM{j\in S}{}A_j\rho A^\dagger_j, \ \ \ \text{where} \ \ \ \SUM{j\in S}{}A^\dagger_jA_j=I.
\]

For notational purposes, let $L(\mathcal{H})$ denote the space of linear operators on a some Hilbert space $\mathcal{H}$. Moreover, denote $\mathcal{H}^{2^n}$ as the Hilbert space of dimension $2^n$.

Consider positive integers $n,m,n',m', d$ such that $n+m=n'+m'=d$.

 Now, let $\rho\in L(\mathcal{H}_A^{2^n})$, $\ket{0}\bra{0}\in L(\mathcal{H}_B^{2^m})$ so that $\rho\otimes\ket{0}\bra{0}\in L(\mathcal{H}_A^{2^n}\otimes\mathcal{H}_B^{2^m})$.

  Also, let $\sigma\in L(\mathcal{H}_{B'}^{2^{n'}})$,
 and consider another Hilbert space $\mathcal{H}_{A'}^{2^{m'}}$ so that
\[
 \mathcal{H}_A^{2^n}\otimes\mathcal{H}_B^{2^m}\approx\mathcal{H}_{A'}^{2^{m'}}\otimes\mathcal{H}_{B'}^{2^{n'}}\approx\mathcal{H}^{2^d}.
\]
Then in regards to the larger ambient space $\mathcal{H}^{2^d}$, the previously mentioned operators can be expressed as $\rho\otimes I_{2^m}\in\mathcal{H}^{2^d}$ and $I_{2^n}\otimes\ket{0}\bra{0}\in L(\mathcal{H}^{2^d})$, where $I_{2^m}\in L(\mathcal{H}^{2^m})$ and $I_{2^n}\in L(\mathcal{H}^{2^n})$ are the identity operators acting on their respective spaces.

In this way, observe that
\[\begin{align*}
\rho\otimes\ket{0}\bra{0}=(\rho\otimes I_{2^m})(I_{2^n}\otimes\ket{0}\bra{0})=(I_{2^n}\otimes\ket{0})\rho(I_{2^n}\otimes\bra{0})
\end{align*}\]
This shows that the quantum operation of adding the ancilla $\ket{0}\bra{0}$ to the end of $\rho$ has its own Krauss operator as $(I_{2^n}\otimes\ket{0})$.

Let $\Phi(\rho)=\sigma$ be the quantum operation described in the problem statement, and let $U\in\mathcal{H}^{2^d}$ be the aforementioned unitary operation. Then the Stinespring representation of the operation is given by
\[
\Phi(\rho)=Tr_{A'}(U(\rho\otimes \ket{0}\bra{0})U^\dagger)=\sigma.
\]
The partial trace operation $Tr_{A'}$ over the register consisting of the space $\mathcal{H}_{A'}^{2^{m'}}$ is itself a quantum operation with $m'$ Krauss operators $B_j$ given by
\[
B_j=\bra{j}\otimes I_{2^{n'}},
\]
where $0\leq j\leq m'-1$ and the states $\ket{j}$ form the orthonormal basis of $\mathcal{H}_{A'}^{2^{m'}}$. Therefore, the action of the operation $\Phi$ can be more explicitly represented as
\[\begin{align*}
\Phi(\rho)&=Tr_{A'}(U(\rho\otimes \ket{0}\bra{0})U^\dagger) \\
&=\SUM{j=0}{m'-1}B_j(U(\rho\otimes \ket{0}\bra{0})U^\dagger)B_j^\dagger \\
&=\SUM{j=0}{m'-1}(\bra{j}\otimes I_{2^{n'}})U(\rho\otimes \ket{0}\bra{0})U^\dagger(\ket{j}\otimes I_{2^{n'}}) \\
&=\SUM{j=0}{m'-1}(\bra{j}\otimes I_{2^{n'}})U(I_{2^n}\otimes\ket{0})\rho(I_{2^n}\otimes\bra{0})U^\dagger(\ket{j}\otimes I_{2^{n'}})\\
&=\SUM{j=0}{m'-1}A_j\rho A_j^\dagger,\\
\end{align*}\]
where for $0\leq j\leq m'$,
\[
A_j:=(\bra{j}\otimes I_{2^{n'}})U(I_{2^n}\otimes\ket{0})
\]
 are matrices with dimensions $2^{n'}$-by-$2^{n}$. Now consider the following sum
\[ \begin{align*}
 \SUM{j=0}{m'-1}A_j^\dagger A_j&= \SUM{j=0}{m'-1}\left((\bra{j}\otimes I_{2^{n'}})U(I_{2^n}\otimes\ket{0})\right)^\dagger(\bra{j}\otimes I_{2^{n'}})U(I_{2^n}\otimes\ket{0}) \\
 &= \SUM{j=0}{m'-1}(I_{2^n}\otimes\bra{0})U^\dagger(\ket{j}\otimes I_{2^{n'}})(\bra{j}\otimes I_{2^{n'}})U(I_{2^n}\otimes\ket{0})\\
 &=\SUM{j=0}{m'-1}(I_{2^n}\otimes\bra{0})U^\dagger(\ket{j}\bra{j}\otimes I_{2^{n'}})U(I_{2^n}\otimes\ket{0}) \\
  &=(I_{2^n}\otimes\bra{0})U^\dagger\left(\SUM{j=0}{m'-1}(\ket{j}\bra{j}\otimes I_{2^{n'}})\right)U(I_{2^n}\otimes\ket{0})\\
    &=(I_{2^n}\otimes\bra{0})U^\dagger\left(I_{2^m}\otimes I_{2^{n'}}\right)U(I_{2^n}\otimes\ket{0})\\
&=(I_{2^n}\otimes\bra{0})U^\dagger I_{2^d}U(I_{2^n}\otimes\ket{0})\\
&=(I_{2^n}\otimes\bra{0})U^\dagger U(I_{2^n}\otimes\ket{0})\\
&=(I_{2^n}\otimes\bra{0})(I_{2^n}\otimes\ket{0})\\
&=I_{2^n}\otimes\ip{0}{0}\\
&=I_{2^n}.
 \end{align*}\]

These $m'$ matrices $A_j$ are therefore the Krauss operators that define an operation equivalent to $\Phi$ which was originally given in Stinespring form. That is,
\[
\Phi(\rho)=\SUM{j=0}{m'-1}A_j\rho A_j^\dagger=\sigma.
\]