We introduce a quantum Lernmatrix based on the Monte Carlo Lernmatrix in whichnunits are stored in the quantum superposition oflog2(n)units representingOn2log(n)2binary sparse coded patterns. During the retrieval phase, quantum counting of ones based on Euler’s formula is used for the pattern recovery as proposed by Trugenberger. We demonstrate the quantum Lernmatrix by experiments usingqiskit. We indicate why the assumption proposed by Trugenberger, the lower the parameter temperaturet; the better the identification of the correct answers; is not correct. Instead, we introduce a tree-like structure that increases the measured value of correct answers. We show that the cost of loadingLsparse patterns into quantum states of a quantum Lernmatrix are much lower than storing individually the patterns in superposition. During the active phase, the quantum Lernmatrices are queried and the results are estimated efficiently. The required time is much lower compared with the conventional approach or the of Grover’s algorithm.