Principal component analysis (PCA) is a dimensionality reduction method in data analysis that involves diagonalizing the covariance matrix of the dataset. Recently, quantum algorithms have been formulated for PCA based on diagonalizing a density matrix. These algorithms assume that the covariance matrix can be encoded in a density matrix, but a concrete protocol for this encoding has been lacking. Our work aims to address this gap. Assuming amplitude encoding of the data, with the data given by the ensemble $\{p_i,| \psi_i \rangle\}$, then one can easily prepare the ensemble average density matrix $\overline{\rho} = \sum_i p_i |\psi_i\rangle \langle \psi_i |$. We first show that $\overline{\rho}$ is precisely the covariance matrix whenever the dataset is centered. For quantum datasets, we exploit global phase symmetry to argue that there always exists a centered dataset consistent with $\overline{\rho}$, and hence $\overline{\rho}$ can always be interpreted as a covariance matrix. This provides a simple means for preparing the covariance matrix for arbitrary quantum datasets or centered classical datasets. For uncentered classical datasets, our method is so-called "PCA without centering", which we interpret as PCA on a symmetrized dataset. We argue that this closely corresponds to standard PCA, and we derive equations and inequalities that bound the deviation of the spectrum obtained with our method from that of standard PCA. We numerically illustrate our method for the MNIST handwritten digit dataset. We also argue that PCA on quantum datasets is natural and meaningful, and we numerically implement our method for molecular ground-state datasets.
翻译:主要元件分析( PCA) 是数据分析的维度递减方法, 其中包括对数据集的共性矩阵进行分解。 最近, 基于密度矩阵的对数矩阵, 为 CPA 制定了量算算法 。 这些算法假设共性矩阵可以在密度矩阵中编码, 但缺少此编码的具体协议 。 我们的工作旨在弥补这一差距 。 假设数据增量编码, 包括由 $ ⁇ p_ i,\\\\ psid_ i\ rangle $提供的数据 。 然后, 人们可以很容易地为 CPA 编制共性平均密度矩阵 $\ overline_ rho} =\ sump_ i p_ psi_ i\rangle\ langle\ plangleangle \ ppsi_ { $. 我们的工作就是在数据集中心的时候, 缩略取数据。 对于量数据集而言, 我们利用全球阶段的对称, 总是存在一个不中值的 中位数据 。 rentral rental distration distryal direal distration distration 。