dakk / qlasskit

A python-to-quantum compiler
https://dakk.github.io/qlasskit/
Apache License 2.0
56 stars 11 forks source link

Request for algorithms! #32

Closed dakk closed 3 months ago

dakk commented 6 months ago

The code of the pull request should include:

Please read CONTRIBUTING.md before contributing.

AbdullahKazi500 commented 4 months ago

Hi @dakk I have done a QPE Algo

dakk commented 4 months ago

Hi @AbdullahKazi500 , thank you for your contribution. Can you show me an example of use-case for the algo using a qlasskit function?

Anyway, the algorithm should be implemented in the algorithms module; the notebook is only a showcase of the algorithm. Before writing more code, please answer the question above.

AbdullahKazi500 commented 4 months ago

hi @dakk I can possibly try but since QPE is an advance and complex algo I dont know if we can extend it to a use case given qlasskit is in a beta stage do you want me to try it out

AbdullahKazi500 commented 4 months ago

in my notebook I have given a basic demo of the QPE circuit using qlasskit function

dakk commented 4 months ago

hi @dakk I can possibly try but since QPE is an advance and complex algo I dont know if we can extend it to a use case given qlasskit is in a beta stage do you want me to try it out

Yes, try it out.

in my notebook I have given a basic demo of the QPE circuit using qlasskit function

In your notebook you just the QAlgorithm of QPE, you're not using it. You should instead put the QAlgorithm implementation in a proper file in the algorithms module, while put a demo in the notebook.

But before writing more code, please show me an example of use-case for the algo using a qlasskit function, so I can determine in the algorithm you proposed is suitable for qlasskit.

AbdullahKazi500 commented 4 months ago

ok Suppose we have a simple quantum circuit that applies a single-qubit gate U to an ancillary qubit in the state ∣+⟩, where U is a phase gate with an unknown phase θ. We want to estimate this phase θ. this is a basic use case @dakk

dakk commented 4 months ago

ok Suppose we have a simple quantum circuit that applies a single-qubit gate U to an ancillary qubit in the state ∣+⟩, where U is a phase gate with an unknown phase θ. We want to estimate this phase θ. this is a basic use case @dakk

Ok thanks; I'm sorry but I don't think QPE meets the issue requirements. Thank you for the proposal anyway!

AbdullahKazi500 commented 4 months ago

so can I Add my algorithm in the algorithm module and will it be considered for a bounty @dakk I can experiment with other advance algorithms as well if Have some time

dakk commented 4 months ago

No, I'm sorry but the requirements should be met in order to solve the issue. Anyway, if you have any other proposal let me know!

AbdullahKazi500 commented 4 months ago

ok @dakk you need a use case right ?

dakk commented 4 months ago

Yes, like I did for Grover search; in the use case, I used Grover implemented inside qlasskit, in order to search for a solution of an oracle. This oracle is built using qlasskit, for example searching for a sudoku puzzle solution.

https://dakk.github.io/qlasskit/example_grover_sudoku.html

Like I did for Grover, the final work of the issue should include:

divshacker commented 3 months ago

Hey, I have made a PR and it got successfully merged.

dakk commented 3 months ago

Thank you divshacker for the contribution!