Text this: Quantum key distribution as a quantum machine learning task