qmlcode / qml

QML: Quantum Machine Learning
MIT License
197 stars 84 forks source link

Issue when giving integer values to fchl kernel functions #110

Open larsbratholm opened 5 years ago

larsbratholm commented 5 years ago

There's a bug in the fchl kernel functions if some parameters are integers. E.g. https://github.com/qmlcode/qml/blob/develop/qml/fchl/fchl_kernel_functions.py#L38

The numpy array will be an integer array and the subsequent transformations will be rounded to integer values. To fix, the line above should explicitely have dtype=float added. There might be more similar cases in the file.