Quantum state learning