How does CLR compile Q# code that uses or does not make use of qubits?

62 views Asked by At

If a Q# operation does not use qubits or quatum specific gates, will then the CLR generate bytecode that will be executed by the CPU and not the QPU(quantum processor)?

1

There are 1 answers

1
Alan Geller On BEST ANSWER

Yes, exactly. The Q# compiler translates the purely classical parts of your code into C#, which gets compiled (by the C# compiler) into standard .NET MSIL, JITed by the .NET Core runtime, and executed on a normal CPU.