Qiskit / qiskit-tutorials

A collection of Jupyter notebooks showing how to use the Qiskit SDK
Apache License 2.0
2.28k stars 1.28k forks source link

Add a Variational Quantum Time Evolution Tutorial (fixes #1391) #1470

Closed wenxh0718 closed 1 year ago

wenxh0718 commented 1 year ago

Summary

Fixes #1391

Details and comments

In this tutorial, we

This works is done by I-Chi (@ichen17), Kaixin (@huckstar), Wenxiang (@wenxh0718) collaboratively. Special thanks to FinQ Tech (http://finq.tech/) for their support and mentorship, which were instrumental to the successful completion of this quantum computing hackathon project.

review-notebook-app[bot] commented 1 year ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

CLAassistant commented 1 year ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
0 out of 3 committers have signed the CLA.

:x: wenxh0718
:x: huckstar
:x: ichen17
You have signed the CLA already but the status is still pending? Let us recheck it.

woodsp-ibm commented 1 year ago

Thanks for the contribution. Just a couple of quick observations:

The title will end up as the description in the tile here https://qiskit.org/documentation/tutorials.html#algorithms and as such, as it stands, is rather long.

I see there is a UserWarning output from the code when it ran - that ought to be corrected.

/usr/local/lib/python3.10/dist-packages/qiskit/algorithms/time_evolvers/variational/variational_principles/real_mc_lachlan_principle.py:161: UserWarning: A gradient instance with a setting for calculating real part of thegradient was provided. This variational principle requires theimaginary part. The setting to imaginary was changed automatically. warnings.warn(

As far as imports go the preference is to do the import in the first cell of code that needs it. This way when you look at the code you can see where things come from without going back to the top and going through them all. Also keep them specific when it comes to qiskit, ie. avoid wildcards, as most of them are you have.

As to cpu/wallclock time - we don't usually do this. We might note something takes a long time to run, but I think the general expectation is that these should be complete in a minute or two at most - of course it does depend on what its being run on.

I know there are spell checkers you can run for jupyter notebook. Don't know if you have anything installed. If you are able it would help avoid spelling issues such as in this but will sppedup in general)

ElePT commented 1 year ago

And as mentioned in the issue, if the three of you want to be assigned as equal contributors for the Unitary Hack bounty, please comment on #1391 so that I can assign you.

wenxh0718 commented 1 year ago

Thanks @ElePT , Kaixin @huckstar has helped updating the notebook correspondingly. Please let us know if there is any needed from our side. Thanks!

huckstar commented 1 year ago

Hi @ElePT, thanks for all the comments! We have updated the notebook correspondingly.

huckstar commented 1 year ago

Thanks a lot! We really appreciate your help.