  Artificial neural networks are the heart of machine learning algorithms and
artificial intelligence protocols. Historically, the simplest implementation of
an artificial neuron traces back to the classical Rosenblatt's `perceptron',
but its long term practical applications may be hindered by the fast scaling up
of computational complexity, especially relevant for the training of
multilayered perceptron networks. Here we introduce a quantum information-based
algorithm implementing the quantum computer version of a perceptron, which
shows exponential advantage in encoding resources over alternative
realizations. We experimentally test a few qubits version of this model on an
actual small-scale quantum processor, which gives remarkably good answers
against the expected results. We show that this quantum model of a perceptron
can be used as an elementary nonlinear classifier of simple patterns, as a
first step towards practical training of artificial quantum neural networks to
be efficiently implemented on near-term quantum processing hardware.
