From 9f0d2abe53e64e8740fd378974935e47b8fd0839 Mon Sep 17 00:00:00 2001 From: electr0sheep Date: Mon, 26 Feb 2018 17:26:22 -0700 Subject: [PATCH] added qsharp --- README.md | 1 + q/qsharp/Driver.cs | 19 +++++++++++++++++++ q/qsharp/qsharp.qs | 10 ++++++++++ 3 files changed, 30 insertions(+) create mode 100644 q/qsharp/Driver.cs create mode 100644 q/qsharp/qsharp.qs diff --git a/README.md b/README.md index a28740da..777ee758 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/q/qsharp/Driver.cs b/q/qsharp/Driver.cs new file mode 100644 index 00000000..8f9445e7 --- /dev/null +++ b/q/qsharp/Driver.cs @@ -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(); + } + } +} \ No newline at end of file diff --git a/q/qsharp/qsharp.qs b/q/qsharp/qsharp.qs new file mode 100644 index 00000000..7c0ca893 --- /dev/null +++ b/q/qsharp/qsharp.qs @@ -0,0 +1,10 @@ +namespace Quantum.HelloWorld +{ + operation HelloWorld () : (String) + { + body + { + return ("Hello, World!"); + } + } +}