microsoft / Quantum

Microsoft Quantum Development Kit Samples
https://docs.microsoft.com/quantum
MIT License
3.88k stars 919 forks source link

"Intro to QSharp" samples #422

Open guenp opened 4 years ago

guenp commented 4 years ago

While the samples serve the purpose of demonstrating the usage of the language, it would be useful to have samples that explicitly demonstrate commonly used QSharp syntax, or even demonstrate more advanced syntax examples, without necessarily producing a useful algorithm. The goal is to make it easy for developers who learn by reading other code to pick up the language quickly.

Some examples:

Based on contributor discussion.

ycechungAI commented 3 years ago

I would like to work on this for hacktoberfest if I can get more info on the various examples I am looking at the docs on Microsoft https://docs.microsoft.com/en-ca/azure/quantum/user-guide/language/programstructure/ so u want example programs for within, partial application, ajoint, controlled, applytoeach, ... etc I kind of only understand arrays and math for now in Quantum

msoeken commented 3 years ago

@ycechungAI Thanks for your interest in the issue and your comment. I think it's okay to pick a subset of examples from the issue description. With regard to the non-quantum and more math examples one could get inspiration from Rosetta Code.