PennyLaneAI / pennylane

PennyLane is a cross-platform Python library for quantum computing, quantum machine learning, and quantum chemistry. Train a quantum computer the same way as a neural network.
https://pennylane.ai
Apache License 2.0
2.25k stars 584 forks source link

Simulated Annealing #2689

Closed maxwell04-wq closed 9 months ago

maxwell04-wq commented 2 years ago

Feature details

I would like to contribute a tutorial on simulated annealing using PennyLane. If needed, I can work on making a module on simulated annealing. This will allow a method for finding global optima.

Implementation

I have already implemented it for a hobbyist project on a simple quantum circuit. I have hardcoded the entire algorithm of simulated annealing to optimize a quantum circuit.

How important would you say this feature is?

2: Somewhat important. Needed this quarter.

Additional information

I am participating in UnitaryHack 2022 and would like to claim a bounty. Is it possible to make this contribution as a part of UnitaryHack?

CatalinaAlbornoz commented 2 years ago

Hi @maxwell04-wq, thank you for opening this issue! You're welcome to contribute a tutorial to our qml repo! However this repo is not participating in UnitaryHACK. We may be able to send you a Xanadu swag package though so be sure to contribute the tutorial!

If you want to contribute your module to PennyLane and participate in UnitaryHACK you can submit a PR in this repo. Note that you need to be signed up for the hack and your PR should be accepted by June 17th. Sometimes your contribution may not align with PennyLane's roadmap so I would encourage you to submit the tutorial first and then we can understand if your module can align well with PennyLane or not.

maxwell04-wq commented 2 years ago

Thanks @CatalinaAlbornoz! I have made a pull request with the Python code for simulated annealing algorithm. Please let me know if you'd like to move forward with it as a module or as a tutorial (or both).

CatalinaAlbornoz commented 2 years ago

Hi @maxwell04-wq, thank you! I just found this PR for the code. Did you make a separate one for the tutorial?

In this case the best option is that you submit the tutorial as an issue here. You should host your code on one of your repositories or another publicly accessible link. It would be best if you could include a link to a paper or another source of information where someone can learn more about simulated annealing. Finally, at the beginning of your code it's important to state the version of PennyLane and Python that you're using.

You can find examples of other community demos here.

Let me know if you have any further questions!

maxwell04-wq commented 2 years ago

Hi @CatalinaAlbornoz,

I noticed that the link you shared for submitting the tutorial is of the qml repo and not the pennylane one. Will the tutorial still be considered for UnitaryHack?

CatalinaAlbornoz commented 2 years ago

Hi @maxwell04-wq, as you noticed our repo for tutorials is different from the PennyLane repo. Officially it would be outside of UnitaryHack but we can send you a swag pack directly from Xanadu (not from the Unitary Fund) as a special-occasion gift.

trbromley commented 9 months ago

Thanks @maxwell04-wq for the great demo on this: https://github.com/maxwell04-wq/simulated-annealing-pennylane/blob/main/Simulated_Annealing_Tutorial_Pennylane.ipynb

I will close this issue.