  We present a quantum algorithm for data classification based on the
nearest-neighbor learning algorithm. The classification algorithm is divided
into two steps: Firstly, data in the same class is divided into smaller groups
with sublabels assisting building boundaries between data with different
labels. Secondly we construct a quantum circuit for classification that
contains multi control gates. The algorithm is easy to implement and efficient
in predicting the labels of test data. To illustrate the power and efficiency
of this approach, we construct the phase transition diagram for the
metal-insulator transition of $VO_2$, using limited trained experimental data,
where $VO_2$ is a typical strongly correlated electron materials, and the
metallic-insulating phase transition has drawn much attention in condensed
matter physics. Moreover, we demonstrate our algorithm on the classification of
randomly generated data and the classification of entanglement for various
Werner states, where the training sets can not be divided by a single curve,
instead, more than one curves are required to separate them apart perfectly.
Our preliminary result shows considerable potential for various classification
problems, particularly for constructing different phases in materials.
