-
Notifications
You must be signed in to change notification settings - Fork 92
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
Request for Durr Hoyer Library #1928
Comments
We would love to see this! If you encapsulate the algorithmic logic in a Q# project, we can certainly put together a Q# library for it, and I would be happy to assist you in that! |
FYI if not familiar, here's the docs and creating projects that reference other projects <https://learn.microsoft.com/en-us/azure/quantum/how-to-work-with-qsharp-projects?tabs=tabid-qsharp%2Ctabid-qsharp-run#example-external-project>> |
I created a Github repo with a Q# project. Please advise on next steps to integrate with Q#... should I be cloning Q# and finding a good place for this code? Thank you for your patience. https://github.com/mertall/DurrHoyerLibrary/tree/main EDIT: thinking out loud here. Clone Q#, find a good place (May be best if y'all tell me best place in your opinion), make sure unit tests run with code in Q# repo, and then create PR... |
Nice Addition to Q# library. Please feel free to reach out in case of any further questions.
Finding a good place: As per my current understanding official Q# samples are supposed to be hosted here in this repo. Although, users are welcome to host Q# samples in their own repositories too. This is being tracked currently by #1934
Plan sounds good to me. I had a brief look at the tests in the github repo shared earlier. They are just printing evaluated values to the console. I think you might find the following folders helpful |
@Manvi-Agrawal I have created a branch and have a commit ready, but it is not allowing to me to push anything to my branch giving me access denied. How should I proceed? Edit: is perferred pattern for committing me forking repo and then cloning? |
Yes @mertall , You got this right. This might help: forking a repo and create PR from fork. |
…andomInt(), reference microsoft#1928
Doh! Thanks for reminding me about PRs with forks, totally forgot about that. PR is up for review! Thank you all! Looking forward to the review process :D |
Any thoughts on adding this algorithm as a sample in Q#? |
I think once we have #1932 merged, adding links there for both the library and the sample in your repo would be good. We could even provide the qsharp.json snippets for pulling in the library from a well-known commit that way folks have an easy way to copy-paste and build from your work. I think merging the usage samples into the samples folder under the qsharp repo might be better suited to part of the stabilization process if/when that takes places, so that the samples and code live together. |
thank you for the feedback team! curious, what does the process of stabilization entail? Are there tasks to be checked off? Or certain amount of time to pass?Thanks for your patience while I understand these dev standards. |
Hi @mertall! I apologize for the delayed response here. There's not a particularly formal process (yet) as the Q# ecosystem is nascent. But what we'd like to see is:
Feel free to respond to this issue and I can provide any clarification or help -- we also hang out in the #qdk channel in the Unitary Fund discord, if you'd prefer to chat that way. |
Is your feature request related to a problem? Please describe.
I haven't seen an implementation of Durr Hoyer that is ready to use. I would like to contribute to a Q# Durr Hoyer library.
I started this project as a Junior in Undergrad, almost 4 years ago. Past 4 years have been working on my SWE skills and after continued thought and iteration I came up with a quick and dirty implementation of Durr Hoyer Algorithm to find Min and Max. At the very least I think the logic will be educational for many people, I understood MSB comparison and how it relates to quantum information which for me was really cool to see.
Describe the solution you'd like
Eventually I would like to take this algorithm and also implement finding range, and median of unsorted database. Also do some actual experiments on quantum computer. I already have an idea of the Oracle functions that we would use for range or median. Still need to implement, will work on that next in azure quantum workspace.
Describe alternatives you've considered
I am considering more optimized methods like QESA which increase accuracy to nearly 100%. I replicated the logic for QESA here, which was about 3 years ago. The quantum operations in this repo are correct but I did not understand the quantum information steps to transform lists of numbers to qubits-- as I have in my current implantation in the Jupyter notebook. Also in the QESA, you will notice I have little experience in building unit tests and was still learning about these concepts. I aim to fully flush out the current Jupyter notebook and recognize there are too many hard coded variables that will need to be set as configurable. Ideally I separate most of the quantum logic in Q#, bring up abstraction for steps like calculating Grovers steps and higher level logic in Python, accessing base operations stored in a namespace. For now, I was just trying to get something to go brrr.
Additional context
I have attached my current Jupyter notebook file, which was ran in Azure quantum Workspace
DurrHoyerImplementation.ipynb.zip
The text was updated successfully, but these errors were encountered: