Skip to content

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

Merged
MoritzWillmann merged 53 commits intosQUlearn:developfrom
RobertoFlorez:QKODE_develop
Nov 14, 2025
Merged

Add differential equation solver (High level QKODE) for Quantum Kernels#317
MoritzWillmann merged 53 commits intosQUlearn:developfrom
RobertoFlorez:QKODE_develop

Conversation

@RobertoFlorez
Copy link
Contributor

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 RobertoFlorez marked this pull request as draft February 6, 2025 14:25
@RobertoFlorez RobertoFlorez marked this pull request as ready for review March 6, 2025 12:13
Copy link
Collaborator

@David-Kreplin David-Kreplin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much, good progress so far!

I added QKODE and ODE_loss to the documentation. Unfortunately, this causes many errors when building the documentation.

The ode_solver.ipynb notebook needs to be restarted. I reduced the number of iterations to 3 to check if the documentation works. It looks fine, but the original cumbersome optimization needs to be restarted. Somehow, the original one has not been run either which caused a problem in the documentation build.

Unfortunately, example_qkode seems broken. VS Code can only display the text version, but not the notebook.

The programming code itself looks fine :).

@RobertoFlorez
Copy link
Contributor Author

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

@MoritzWillmann MoritzWillmann self-requested a review October 17, 2025 08:10
@MoritzWillmann MoritzWillmann self-assigned this Nov 13, 2025
@MoritzWillmann MoritzWillmann dismissed David-Kreplin’s stale review November 14, 2025 10:00

Everything has been fixed, no need for David to do a re-review

@MoritzWillmann
Copy link
Collaborator

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

@MoritzWillmann MoritzWillmann merged commit c830afe into sQUlearn:develop Nov 14, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants