Monday, February 26, 2018

Quantum Computing with Microsoft & Mac

$ dotnet new -i "Microsoft.Quantum.ProjectTemplates::0.2-*"

Templates                                         Short Name       Language              Tags               
------------------------------------------------------------------------------------------------------------
Console Application                               console          [C#], F#, Q#, VB      Common/Console     
Class library                                     classlib         [C#], F#, Q#, VB      Common/Library     
Unit Test Project                                 mstest           [C#], F#, VB          Test/MSTest        
xUnit Test Project                                xunit            [C#], F#, Q#, VB      Test/xUnit         
ASP.NET Core Empty                                web              [C#], F#              Web/Empty          
ASP.NET Core Web App (Model-View-Controller)      mvc              [C#], F#              Web/MVC            
ASP.NET Core Web App                              razor            [C#]                  Web/MVC/Razor Pages
ASP.NET Core with Angular                         angular          [C#]                  Web/MVC/SPA        
ASP.NET Core with React.js                        react            [C#]                  Web/MVC/SPA        
ASP.NET Core with React.js and Redux              reactredux       [C#]                  Web/MVC/SPA        
ASP.NET Core Web API                              webapi           [C#], F#              Web/WebAPI         
global.json file                                  globaljson                             Config             
NuGet Config                                      nugetconfig                            Config             
Web Config                                        webconfig                              Config             
Solution File                                     sln                                    Solution           
Razor Page                                        page                                   Web/ASP.NET        
MVC ViewImports                                   viewimports                            Web/ASP.NET        
MVC ViewStart                                     viewstart                              Web/ASP.NET        

Examples:
    dotnet new mvc --auth Individual
    dotnet new classlib --framework netcoreapp2.0
    dotnet new --help


$ dotnet new console -lang Q# --output Bell
The template "Console Application" was created successfully.

$ cd Bell
$ code .
$ dotnet run
Init:Zero 0s=1000 1s=0   
Init:One  0s=0    1s=1000
Press any key to continue...

$ dotnet run
Init:Zero 0s=0    1s=1000
Init:One  0s=1000 1s=0   
Press any key to continue...

$ dotnet run
Init:Zero 0s=481  1s=519 
Init:One  0s=518  1s=482 
Press any key to continue...