How do I compute the partial trace of $\sqrt{p}|0\rangle_a|0\rangle_b+\sqrt{1-p}|1\rangle_a |1\rangle_b$? Here I have a two pure state system composed from systems A and B:
$$\Psi_{ab} = \sqrt{p}\, |0\rangle_a |0\rangle_b + \sqrt{1-p}\, |1\rangle_a |1\rangle_b $$
How do I extract system A in matrix form using trace?
My attempt:
$$ \hat A = \mathrm{Tr}_b\,( |\Psi_{ab} \rangle \langle \Psi_{ab}|) = \sum_N \langle n_b| \Psi_{ab} \rangle \langle
 \Psi_{ab}| n_b \rangle $$
which makes
$$
   \hat A = \left(\begin{matrix}
    p & 0 \\
    0 & 1-p
    \end{matrix}\right)
$$
however, my confusion is that if I were to look for the operator of B then I would also get the same answer. Is my understanding of Trace for a Hilbert space (A or B) incorrect?
Any help would be most appreciated. Thanks.
 A: Let me illustrate this from a more general perspective: For a pure state of a bipartite system, the corresponding reduced density matrices have the same non-zero eigenvalues.
To see this, consider a Hilbert space $\mathscr{H} = \mathscr{H}_1 \otimes \mathscr{H}_2$ and let $\{|a_i\rangle\}_i$ and $\{|b_j\rangle\}_j $ denote complete and orthonormal bases sets in $\mathscr{H}_1$ and $\mathscr{H}_2$, respectively. Then a generic state $|\psi\rangle \in \mathscr{H}$ can be expanded as follows:
$$ |\psi\rangle = \sum\limits_{ij}c_{ij}\,|a_i\rangle \otimes |b_j\rangle  \quad .$$
However, using the Schmidt decomposition, we can also write this state as
$$|\psi\rangle = \sum\limits_{\alpha} \sigma_{\alpha} \,|A_\alpha\rangle \otimes  |B_\alpha\rangle \quad,  $$
with $\sigma_\alpha >0$, $\sum\limits_{\alpha} \sigma_{\alpha}^2 = 1$ and $\{|A_{\alpha}\rangle\}_{\alpha}$ as well as $\{|B_{\alpha}\rangle\}_{\alpha}$ denoting complete orthonormal sets in $\mathscr{H}_1$ and $\mathscr{H}_2$, respectively.
Defining the density operator $\rho_{\psi} \equiv |\psi\rangle\langle\psi|$, we can compute its reduced density matrices $\rho_1\equiv \mathrm{Tr}_2 \,\rho_{\psi}$ and $\rho_2\equiv \mathrm{Tr}_1\,\rho_{\psi}$ in a straightforward manner and find that they have the same non-zero eigenvalues, namely $\sigma_{\alpha}^2$:
\begin{align}
\rho_1 &= \sum\limits_\alpha \sigma_{\alpha}^2 \, |A_{\alpha}\rangle \langle A_{\alpha}| \\
\rho_2 &= \sum\limits_\alpha \sigma_{\alpha}^2 \, |B_{\alpha}\rangle \langle B_{\alpha}|  \quad .
\end{align}

In conclusion, your result perfectly fits in this scheme, as the wave function you have given is already in its Schmidt decomposition.
A more detailed treatment of this should be given in any textbook on quantum information theory.
