Entanglement-Based Machine Learning on a Quantum Computer