Quantum machines learn