squlearn icon indicating copy to clipboard operation
squlearn copied to clipboard

Add differential equation solver (High level QKODE) for Quantum Kernels

Open RobertoFlorez opened this issue 1 year ago • 1 comments

Hi!

This is the implementation for the differential equation solver using QK (as done in https://arxiv.org/abs/2203.08884). It should accept linear and non-linear 1st order and 2nd order differential equations that depend on one variable. Furthermore, it should be able to support precomputed kernels (i.e. classical kernels also work for it).

I also created an example (example_kode.ipynb) of how to use the interface, and modified+renamed the previous QNN ODE tutorial to include also QKs.

Overall the implementation is somewhat similar to the QNN ODE solver.

Feel free to give me feedback and let me know what should be improved.

Thank you very much for your help! 🚀 Roberto

RobertoFlorez avatar Feb 06 '25 13:02 RobertoFlorez

Hi David,

Thank you very much for the comments and sorry that it took me so long to answer (no rush to rereview :) ).

I implemented most of your suggestion and left a comment in the ones that were not trivial.

example_qkode appears to be working properly on my computer. Does it still not display okay in your case?

Regarding ode_solver.ipynb, I reran it and pushed it but I still was unable to make it properly work with the documentation building. I think if we are unable to find the issue we could simple use the version that it is currently on the repo tutorials/qnn_ode_solver that does not include anything related to QKs. If you have any hints of where the documentation building problem could be, let me know and I can try to find the bug again. Sorry, that I was unable to find a solution for this.

Thanks again!

Best regards, Roberto

RobertoFlorez avatar May 05 '25 07:05 RobertoFlorez

Looking good, LGTM 😄 Thanks @RobertoFlorez @DennisKleinhans and @David-Kreplin for your contributions

MoritzWillmann avatar Nov 14 '25 10:11 MoritzWillmann