If I am given a density matrix $\rho$ that I know corresponds to a pure state (i.e., $\rho = |\psi\rangle\langle\psi|$ for some $|\psi\rangle$), then is it possible for me to infer the state $|\psi\rangle$?
My intuition says yes; for example, if we let $|\psi\rangle=\sum_i \alpha_i |a_i\rangle$ for some orthonormal basis $\{|a_i\rangle\}$, then we know that $\rho = \sum_{ij} \alpha_i\alpha_j^* |a_i\rangle\langle a_j|$. By orthonormality, the matrix element $\rho_{ij} = \alpha_i\alpha_j^*$.
If this is indeed the case, then why can't we simply use the oracle from Grover's algorithm to reconstruct the solution? Let $x^*$ be the solution to some search problem. In class, we learned that it is easy to implement an operator $\mathcal{O}_{x^*}$ such that $\mathcal{O}_{x^*}|x^*\rangle = - |x^*\rangle$ and $\mathcal{O}_{x^*}|x\rangle = - |x\rangle$. Then, we can rewrite $\mathcal{O}_{x^*}$ as follows:
$$\mathcal{O}_{x^*} = I - |x^*\rangle\langle x^*|$$
Rearranging, we get $|x^*\rangle\langle x^*| = I - \mathcal{O}_{x^*}$. This, to me, looks like an expression for a density matrix. So if we can easily construct $\mathcal{O}_{x^*}$, as claimed, then it seems like we should also be able to infer $|x^*\rangle$. I know I must have some sort of logical flaw in my argument (perhaps relating to what we know/ assumptions we make about the basis?) but I can't quite pin it down. Thanks for the help!