added qsharp

This commit is contained in:
electr0sheep 2018-02-26 17:26:22 -07:00
parent cd59bd06fa
commit 9f0d2abe53
No known key found for this signature in database
GPG Key ID: 981E1D96282F7140
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) * [Q](q/q.q)
* [Qbasic](q/Qbasic.bas) * [Qbasic](q/Qbasic.bas)
* [Qore](q/qore.q) * [Qore](q/qore.q)
* [Qsharp](q/qsharp)
* [Qu](q/qu.qu) * [Qu](q/qu.qu)
* [Quakec](q/QuakeC.qc) * [Quakec](q/QuakeC.qc)
* [Quartzcomposer](q/QuartzComposer.qtz) * [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!");
}
}
}