peterwittek / qml-rg

Quantum Machine Learning Reading Group @ ICFO
GNU General Public License v3.0
131 stars 63 forks source link

Implementation of HHL is not perfect #47

Open apozas opened 7 years ago

apozas commented 7 years ago

As a quick summary, some of us are still doing the homework of meeting 7, which consists on implementing a quantum support vector machine following this paper. The implementation needs of a means of inverting matrices, and a quantum way is described in this paper here. We have implemented the algorithm in this last paper, but the results are not quite what we expected. After working quite a bit on it, I have realized that one of the assumptions in the paper is not (even approximately) always satisfied. The assumption in question appears after the third equation of page 3, and is that phase estimation is perfect. This should of course not to be expected to hold perfectly, but it turns out that usually there is not one, but a few of states whose $|\alpha_{k|j}|$ are of comparable size (and much closer to 1 than the rest). This makes the result of dropping out the $|\lambda\rangle$ register a mixed state, instead of a pure one. The way I have thought of circumventing this problem is doing a projection on to the $|\lambda\rangle$ of greatest amplitude before dropping the register. That will undoubtedly bring errors, but up to now I have not come up with other means of obtaining a "reasonable output" from the matrix inversion algorithm.