A simple example of a quantum algorithm written in Q# is a quantum random number generator. This algorithm leverages the nature of quantum mechanics to produce a random number.
- The Microsoft Quantum Development Kit.
- Create a Q# project for either a Q# application, with a Python host program, or a C# host program.
In VS Code, build the Program.qs the first time by typing the below in the terminal:
dotnet build
For subsequent runs, there is no need to build it again. To run it, type the following command and press enter:
dotnet run --no-build
More information https://docs.microsoft.com/en-us/quantum/tutorials/quantum-random-number-generator?tabs=tabid-qsharp.