Microsoft Q # .Net Compatibility?

Q # is an interesting new language from Microsoft dedicated to quantum computing.

Does it compile a .net library that can be referenced from C # or any other .net language .Net Framework and / or .Net Core Framework (possibly .NET standard)?

If not, how can it be included in classic applications?

If it can be, then what will be a quantum computer? Will it allow you to run the full .net architecture plus a quantum as a coprocessor (something like GPU programming) or how will it look like this?

+4
source share
2 answers

Yes, Q # is even translated into C # and then compiled as a regular .Net assembly.

( ), : https://docs.microsoft.com/en-us/quantum/quantum-writeaquantumprogram. Q # # ( ). Q # .qs.cs( obj\qsharp\src).

+1

# . , Q # #. , :

https://docs.microsoft.com/en-us/quantum/quantum-writeaquantumprogram?view=qsharp-preview

Q #:

namespace Quantum.Bell
{
    open Microsoft.Quantum.Primitive;
    open Microsoft.Quantum.Canon;

    operation Set (desired: Result, q1: Qubit) : ()
    {
        body
        {
             //set operations here
        }
    }

    operation BellTest (count : Int, initial: Result) : (Int,Int)
    {
        body
        {
            //quantum operations here
        }
    }
}

#:

using Microsoft.Quantum.Simulation.Core;
using Microsoft.Quantum.Simulation.Simulators;

namespace Quantum.Bell
{
    class Driver
    {
        static void Main(string[] args)
        {
            //call BellTest methods and other logic here
        }
    }
}

, . .

+3

Source: https://habr.com/ru/post/1693706/


All Articles