In an article Towards Pricing Financial Derivatives with an IBM Quantum Computer PCA is implemented in a practical way with an example.

Operator $U_{prep}$ is realized with $\mathrm{U3}$ gates but parameters for some gates presented in the article seems wrong (maybe typo). See this thread for more information, correct $\mathrm{U3}$ parameters values and a way how to implement PCA on IBM Q.

**EDIT:** *How to find parameters $\theta$, $\phi$ and $\lambda$ for implementation of $U_{prep}$ with $\mathrm{U3}$ gate.*

$\mathrm{U3}$ gate has this form:

$$
\mathrm{U3}=
\begin{pmatrix}
\cos(\theta/2) & -\mathrm{e}^{i\lambda}\sin(\theta/2) \\
\mathrm{e}^{i\phi}\sin(\theta/2) & \mathrm{e}^{i(\phi+\lambda)}\cos(\theta/2)
\end{pmatrix}.
$$

Firstly, you have to factor out some complex number (denote $c$) from $U_{prep}$ in order to have a real number on position $u_{11}$. After that you can easily calculate $\theta$ from $\cos(\theta/2)$. Then, it is not problem to find $\phi$ from $\mathrm{e}^{i\phi}\sin(\theta/2)$ and finnaly $\lambda$ from $\mathrm{e}^{i(\phi+\lambda)}\cos(\theta/2)$.

The number $c$ factored out in the first step is a global phase. It is not important in case $\mathrm{U3}$ is used in its single qubit form. But if the gate is used as controlled one, the global phase cannot be neglected. So, you will have controlled $\mathrm{U3}$ and controlled global phase gate.

if you are referring to the description given in pag.46, it says "*In the first step, one’s classical computer converts the raw data vectors into a covariance matrix Σ, then normalizes this matrix to form ρ = Σ/Tr(Σ),

then purifies it to make a pure state |ψi$\rangle$, and finally computes the unitary Uprep needed to prepare |ψi from a pair of qubits each initially in the |0i state.*". So are you asking what does it mean to purity a state? – glS – 2020-01-31T10:00:09.943yeah exactly, I thought it would be something like amplitude-encoding so that $\rho_{11} = \alpha_{11}$ for Quantum state $| 00 \rangle$ and so on. But I think this is wrong. So I need a bit help here. – rexrayne – 2020-01-31T15:46:02.503

you can try to have a look at the Wikipedia page to know what purification means. In a few words, it means to find a pure state whose reduced density matrix equals your $\rho$.

– glS – 2020-01-31T16:35:06.470