# How to compute the partial trace on the first register of the state $|\chi\rangle=\frac{1}{||A||}\sum_{i=0}^{m-1}||A_i|||A_i\rangle|i\rangle$?

Given the quantum state $$|\chi\rangle=\dfrac{1}{||A||}\sum_{i=0}^{m-1}||A_i|||A_i\rangle|i\rangle,$$ how can we obtain the partial trace operation on the first register, i.e., \begin{align}\text{tr}_1(|\chi\rangle\langle\chi|)=&\dfrac{1}{||A||^2}\sum_{i,j=0}^{m-1}||A_i||\cdot||A_j|| \langle A_j|A_i\rangle|i\rangle\langle j|,\\\underbrace{=}_{??}&\dfrac{A^TA}{\text{tr}(A^TA)}\end{align}

As I understand, we have $$\sum_{i,j=0}^{m-1}||A_i||\cdot||A_j|| \langle A_j|A_i\rangle|i\rangle\langle j|=\sum_{i,j=0}^{m-1}c_{ij}|i\rangle\langle j|=C,$$ where $$C=[c_{ij}]$$ is the matrix whose elements are $$c_{ij}$$. So, I have to show that the elements of the matrix $$(A^TA)_{ij}$$ is equal to $$||A_i||\cdot||A_j||\langle A_j|A_i\rangle$$? Is this correct? How to do this?

You don't state this explicitly, but I'm guessing this is the crucial part: How do $$|A_i\rangle$$ relate to $$A$$?
I assume that $$|A_i\rangle$$ correspond to normalized rows, $$i$$ of matrix $$A$$, while $$\|A_i\|$$ is the weight of the row $$i$$ such that $$\|A_i\||A_i\rangle$$ would have all the elements corresponding to the $$i^{th}$$ row of matrix $$A$$.
In other words, $$|A_i\rangle=\frac{1}{\|A_i\|}\sum_jA_{ij}|j\rangle.$$ Now, let's consider your specific calculation $$\sum_{i,j}\|A_i\|\|A_j\|\langle A_j|A_i\rangle|i\rangle\langle j|=\sum_{i,j}\sum_kA_{ik}A_{jk}^*|i\rangle\langle j|=\sum_{i,j}\langle i|A A^\dagger|j\rangle|i\rangle\langle j|=AA^\dagger$$
If you want the outcome to be $$A^\dagger A$$, you might want to carefully check my assumption about the definition of $$|A_i\rangle$$. If your matrix $$A$$ is real, the hermitian conjugate becomes a transpose.