  In this work, we present a quantum neighborhood preserving embedding and a
quantum local discriminant embedding for dimensionality reduction and
classification. We demonstrate that these two algorithms have an exponential
speedup over their respectively classical counterparts. Along the way, we
propose a variational quantum generalized eigenvalue solver that finds the
generalized eigenvalues and eigenstates of a matrix pencil
$(\mathcal{G},\mathcal{S})$. As a proof-of-principle, we implement our
algorithm to solve $2^5\times2^5$ generalized eigenvalue problems. Finally, our
results offer two optional outputs with quantum or classical form, which can be
directly applied in another quantum or classical machine learning process.
