  Machine learning, a branch of artificial intelligence, learns from previous
experience to optimize performance, which is ubiquitous in various fields such
as computer sciences, financial analysis, robotics, and bioinformatics. A
challenge is that machine learning with the rapidly growing "big data" could
become intractable for classical computers. Recently, quantum machine learning
algorithms [Lloyd, Mohseni, and Rebentrost, arXiv.1307.0411] was proposed which
could offer an exponential speedup over classical algorithms. Here, we report
the first experimental entanglement-based classification of 2-, 4-, and
8-dimensional vectors to different clusters using a small-scale photonic
quantum computer, which is then used to implement supervised and unsupervised
machine learning. The results demonstrate the working principle of using
quantum computers to manipulate and classify high-dimensional vectors, the core
mathematical routine in machine learning. The method can in principle be scaled
to a larger number of qubits, and may provide a new route to accelerate machine
learning.
