Skip to content

Paper Implementation Project #801: A Quantum Algorithm for Solving Linear Differential Equations: Theory and Experiment #894

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Barath-T
Copy link

@Barath-T Barath-T commented Mar 27, 2025

A Quantum Algorithm for Linear Differential Equations: Theory and Experiment - Paper Implementation Project.
Closes #801

PR Description

Some notes

  • Please make sure that you placed the files in an appropriate folder

  • And that the files have indicative names.

  • Please note that Classiq runs automatic code linting, which may minorly alter some files.

    • If you're familiar with pre-commit, you may run pre-commit install, and then at each commit, your files will be altered in a similar way

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@Barath-T Barath-T closed this Mar 31, 2025
@Barath-T Barath-T force-pushed the paper-implementation/solving-lde branch from 8b325dc to fb3a264 Compare March 31, 2025 18:59
@Barath-T Barath-T reopened this Mar 31, 2025
@Barath-T
Copy link
Author

@NadavClassiq I've updated the PR according to the new guidelines provided.

@TaliCohn TaliCohn requested a review from NadavClassiq April 1, 2025 10:22
@NadavClassiq NadavClassiq added the Paper Implementation Project Implement a paper using Classiq label Apr 1, 2025
@NadavClassiq
Copy link
Collaborator

Hello @Barath-T!

Thanks for the effort in implementing the paper using Classiq!
I will review the notebook in the next few days.

In the meantime, please see the draft for the updated contribution guidelines here

(a few additional files might be needed, but it only involved adding one line of code, it will be add to the main branch soon)

Thanks again!

I am looking forward to diving into your work! :)

@NadavClassiq
Copy link
Collaborator

Hi @Barath-T!

The .ipynb and .qmod files seem to be missing the timeout value in the tests/resources/timeouts.yaml file.
Please add a value following our contribution guidelines :)
Meanwhile, I'm starting to review the notebook.

Thanks!

@NadavClassiq
Copy link
Collaborator

@Barath-T
Another General comment. Try thinking of someone who didn't read the paper and trying to understand why and how it works. It will make the explanation clearer and more to the point.

Please let me know after accommodating the above notes, and I will re-overview the notebook for final comments :)

Thanks again for the efforts!

@NadavClassiq
Copy link
Collaborator

Hi @Barath-T,

I hope you are well!
How is it going with the update? Do you have any estimated time for adapting the notebook?
Also, whenever you are done, please rebase the branch on top of the main branch (upstream); that would solve the current conflict in the timeouts.

Best luck, and please let me know if we can do anything to support you.

@NadavClassiq NadavClassiq self-assigned this Apr 14, 2025
@Barath-T
Copy link
Author

Thanks @NadavClassiq , Its almost done and will push it in few hours.

@Barath-T Barath-T force-pushed the paper-implementation/solving-lde branch from 2ea7d78 to 20ca3a1 Compare April 14, 2025 17:03
@Barath-T Barath-T requested a review from NadavClassiq April 14, 2025 17:06
@@ -0,0 +1,784 @@
{
Copy link
Collaborator

@NadavClassiq NadavClassiq Apr 20, 2025

Choose a reason for hiding this comment

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

Functionally this works, but you can speed it up with an ExecutionSession so you synthesize once and then just rebind t each run.

See the docs: https://docs.classiq.io/latest/user-guide/execution/ExecutionSession/?h=execution

And the QAOA MaxCut example (same concept): https://github.com/Classiq/classiq-library/blob/main/algorithms/qaoa/maxcut/qaoa_maxcut.ipynb

Also, you’re reusing i in both loops, which makes it hard to follow. After you integrate ExecutionSession, you can pull out the inner loop into its own cell and add a short Markdown explanation.

Seems redundant:

    results = job.result()
    results = job.result_value()


Reply via ReviewNB

Copy link
Author

@Barath-T Barath-T May 3, 2025

Choose a reason for hiding this comment

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

Hi @NadavClassiq ,

Execution parameters can figure in restricted contexts only as rotation angles in gate-level functions and as the exponent value of the power operation.

As we are building unitary i don't think we can get it as parameter.

@NadavClassiq
Copy link
Collaborator

Hello @Barath-T!

Thanks for the updates, excellent work! We’re almost there. I have a few last notes and look forward to the final version.

Once it’s merged, we can discuss sharing this great project with the community :)

Also, this branch has a minor conflict in the timeout file, please rebase to resolve it. While you’re at it, please shorten the timeout now that the performance optimizations are in place (after adapting my new notes, it will improve performance).

Please also press "resolve" after completing each note, or ask questions if needed.

@Barath-T Barath-T force-pushed the paper-implementation/solving-lde branch from 77fb673 to a17fb03 Compare May 3, 2025 11:33
@Barath-T Barath-T requested a review from NadavClassiq May 3, 2025 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Paper Implementation Project Implement a paper using Classiq
Projects
None yet
2 participants