Skip to content

Tutorial for the ODE QNN Regressor #307

Merged
David-Kreplin merged 20 commits intosQUlearn:developfrom
RobertoFlorez:ODE_QNN_regressor_tutorial_develop
Dec 20, 2024
Merged

Tutorial for the ODE QNN Regressor #307
David-Kreplin merged 20 commits intosQUlearn:developfrom
RobertoFlorez:ODE_QNN_regressor_tutorial_develop

Conversation

@RobertoFlorez
Copy link
Contributor

Hi!

In this PR, I made a tutorial for the QNN ODE solver.

The logistic differential equation, a special case of the Bernoulli Differential Equation, is solved and compared to its analytical solution.

If this example is too trivial, I can search for another one.

To include the tutorial, I also:
- Created docs/examples/example_quantum_bayesian_optimization.nblink (which I think it was necessary but I am not sure)
- Included --ignore=examples/tutorials/qnn_ode_solver.ipynb, in pyproject.toml so that it is not checked by pychecks (as the solution takes a long time)

Furthermore:
- I fixed one small typo in examples/tutorials/quantum_bayesian_optimization.ipynb, "structre->structure"
- I fixed a small bug in the KyriienkoEncodingCircuit for the chebyshev_product

Feel free to let me know what should I improve or change. Thankss!

Roberto

@David-Kreplin David-Kreplin self-requested a review December 10, 2024 08:41
@David-Kreplin
Copy link
Collaborator

David-Kreplin commented Dec 10, 2024

After our conversiation, here the are todos summerized:

  • setting x0
  • check eq 6
  • check reference of eq 6 (wrongly ref as eq.1)
  • use Differential Equations instead of DE
  • remove \bm
  • fix documentation test

@RobertoFlorez
Copy link
Contributor Author

RobertoFlorez commented Dec 18, 2024

Hi!

I implemented all the suggested changes:

  • setting x0
  • check eq 6
  • check reference of eq 6 (wrongly ref as eq.1)
  • use Differential Equations instead of DE
  • remove \bm
  • fix documentation test

Thus, I believe is ready to be checked again @David-Kreplin.

Thank you very much !

Any other feedback, I am happy to help :)

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.

There are a few rendering errors left:

  • For the logistic differential equation, we take $ Q(x) = P(x) = -6 $ and $ n = 2$ in the Eq.
  • This is, $:nbsphinx-math:mathcal{L}{:nbsphinx-math:theta} = :nbsphinx-math:mathcal{L}{\theta}(dy/dx, y, x) + \eta :nbsphinx-math:left(y(x_0) - u_0 \right)^2 $, where

The problem is that you probably have no possibility to look at the final rendered HTML file; the notebook looks fine, on the other hand.

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.

Loos great now, thank you!

@David-Kreplin David-Kreplin merged commit f3b9561 into sQUlearn:develop Dec 20, 2024
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.

2 participants