  We consider a quantum version of the famous low-rank approximation problem.
Specifically, we consider the distance $D(\rho,\sigma)$ between two normalized
quantum states, $\rho$ and $\sigma$, where the rank of $\sigma$ is constrained
to be at most $R$. For both the trace distance and Hilbert-Schmidt distance, we
analytically solve for the optimal state $\sigma$ that minimizes this distance.
For the Hilbert-Schmidt distance, the unique optimal state is $\sigma = \tau_R
+N_R$, where $\tau_R = \Pi_R \rho \Pi_R$ is given by projecting $\rho$ onto its
$R$ principal components with projector $\Pi_R$, and $N_R$ is a normalization
factor given by $N_R = \frac{1- \text{Tr}(\tau_R)}{R}\Pi_R$. For the trace
distance, this state is also optimal but not uniquely optimal, and we provide
the full set of states that are optimal. We briefly discuss how our results
have application for performing principal component analysis (PCA) via
variational optimization on quantum computers.
