A question on partial trace and density matrix computation Consider a Pure state of a two dimensional system $|\psi\rangle={1\over\sqrt{2}}(|e_1\rangle|e_1\rangle+|e_2\rangle|e_2\rangle)$ where $\{|e_i\rangle\}$ is an orthonormal basis.
Could any one just confirm me whether the corresponding density matrix $\rho$ is defined as $|\psi\rangle\otimes |\psi\rangle$? If I am misunderstood  could anyone tell me  what will be the density matrix?
also how to find the partial trace of $\rho$? 
I am bit lost to find the partial trace from the formuale $\sum_{i=1,2} (I\otimes\langle e_i|)\rho(I\times\langle e_i|)$
is $I$ a $2\times 2$ Identity matrix?
Thanks for the help.
Source: Quantum Computing:From Linear Algebra to Physical Realizations, Page-45
 A: The density matrix for a pure state $|\psi\rangle$ is $\rho=|\psi\rangle\langle\psi|$. Note that this is a matrix in the sense that it takes some vector $|\phi\rangle$ to the vector $\rho|\phi\rangle=|\psi\rangle\langle\psi|\phi\rangle$. It has components $$\rho_{ij}=\langle e_i|\rho|e_j\rangle=\langle e_i|\psi\rangle\langle\psi|e_j\rangle=\psi_i \bar{\psi_j}$$.
The partial trace of $\rho$ must be a partial trace over some part of a splitting of the Hilbert space. If $\mathcal{H}=\mathcal{H_1}\otimes\mathcal{H_2}$, you take the partial trace over $\mathcal{H}_2$ to get the reduced density matrix $\rho_1$, which is an operator on $\mathcal{H}_1$. If $\{e_i\}$ is an orthonormal basis for $\mathcal{H}_2$, and $I_1$ the identity operator on $\mathcal{H}_1$, this is:
$$
\rho_1=\mathrm{tr}_2(\rho)=\sum_i(I_1\otimes\langle e_i|)\rho(I_1\otimes|e_i\rangle )
$$
or just $\sum_i\langle e_i|\rho|e_i\rangle$ for short, with the understanding that the $e_i$ do nothing to the $\mathcal{H}_1$ part of the matrix. If it helps, $\rho$ 'has indicies' for both halves of the Hilbert space decomposition, and we sum over only one half of the indicies.
If your original Hilbert space is two-dimensional, there is no nontrivial way of splitting it in two, so none of this will do anything. Try it instead for a tensor product of a pair of 2-state systems.
