Merge pull request #445 from electr0sheep/master

added qsharp
This commit is contained in:
Mike Donaghy
2018-03-04 06:31:09 -06:00
committed by GitHub
3 changed files with 30 additions and 0 deletions

View File

@@ -388,6 +388,7 @@ Meet [FizzBuzz](https://github.com/zenware/FizzBuzz), the evolution of [hello-wo
* [Q](q/q.q)
* [Qbasic](q/Qbasic.bas)
* [Qore](q/qore.q)
* [Qsharp](q/qsharp)
* [Qu](q/qu.qu)
* [Quakec](q/QuakeC.qc)
* [Quartzcomposer](q/QuartzComposer.qtz)

19
q/qsharp/Driver.cs Normal file
View File

@@ -0,0 +1,19 @@
using Microsoft.Quantum.Simulation.Simulators;
namespace Quantum.HelloWorld
{
class Driver
{
static void Main(string[] args)
{
using (var sim = new QuantumSimulator())
{
var res = HelloWorld.Run(sim).Result;
System.Console.WriteLine(
$"{res}");
}
System.Console.WriteLine("Press any key to continue...");
System.Console.ReadKey();
}
}
}

10
q/qsharp/qsharp.qs Normal file
View File

@@ -0,0 +1,10 @@
namespace Quantum.HelloWorld
{
operation HelloWorld () : (String)
{
body
{
return ("Hello, World!");
}
}
}