See here for examples which runs on the latest version of QDK (Quantum Development Kit).
(This example uses QDK and standard libraries old version, v0.6.)
- This code is written straight forward in order to help you understand the logic flow. (For instance, so many QFTs are called inside my function.) When you have learned core essence in this code, please proceed to optimize this code.
- It won't work for a large number N. (Since it needs so many qubits in parallel.)
See my post "Programming Quantum Period Finding (Shor's Algorithm)" for the background of this sample code.
Tsuyoshi Matsuzaki @ Microsoft