Discrete Optimization in Quantum Unsupervised Learning