q#

Building and modifying Q# Libraries

巧了我就是萌 提交于 2021-02-10 17:54:28
问题 How can the libraries (https://github.com/microsoft/QuantumLibraries) be modified locally? For example, creating references to the Quantum Chemistry library only uses the prebuilt DLL. Is there a way to reference the local Quantum Chem library, make edits to that code, and see those changes reflected? Thanks. 回答1: The Quantum Development Kit uses the .NET Core SDK to find and link together the various Q# libraries, in particular through C# project files ( *.csproj ). Within a C# project file,

Building and modifying Q# Libraries

倾然丶 夕夏残阳落幕 提交于 2021-02-10 17:50:31
问题 How can the libraries (https://github.com/microsoft/QuantumLibraries) be modified locally? For example, creating references to the Quantum Chemistry library only uses the prebuilt DLL. Is there a way to reference the local Quantum Chem library, make edits to that code, and see those changes reflected? Thanks. 回答1: The Quantum Development Kit uses the .NET Core SDK to find and link together the various Q# libraries, in particular through C# project files ( *.csproj ). Within a C# project file,

“jupyter-kernelspec” not found while installing iqsharp however it exists on PATH

房东的猫 提交于 2020-04-18 05:45:47
问题 While installing QDK for use with python as described in this guide, on executing dotnet iqsharp install I get the following exception Traceback (most recent call last): File "c:\users\hp\appdata\local\programs\python\python36\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "c:\users\hp\appdata\local\programs\python\python36\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\hp\AppData\Local\Programs\Python\Python36\Scripts\jupyter.exe\_

Resource estimation for Trotterisation always outputs a 0 T-gate cost?

Deadly 提交于 2020-03-26 03:50:30
问题 I have been working with q# for a couple weeks now, and I'm interested in resource estimation for quantum chemistry. Using the example programs provided, such as "GetGateCount" on a variety of molecules (also provided by the examples) I always get a 0 T gate count for Trotterisation. Qubitization and Optimized Qubitization seem to be working fine. This was also the case when I added resource estimation to a different example program provided, "MolecularHydrogenGUI" with the info provided here

How to write C# implementation for a Q# operation with intrinsic body?

守給你的承諾、 提交于 2020-01-06 08:13:00
问题 I have created a library in C# to be used in Q# programs. The library has two scripts, a C# class library called "Class1.cs" and a matching Q# script called "Util.qs", I share the code snippet of each here: Class1.cs: using System; using Microsoft.Quantum.Simulation.Common; using Microsoft.Quantum.Simulation.Core; using Microsoft.Quantum.Simulation.Simulators; namespace MyLibrary { class Class1 : QuantumSimulator { static void Method_1 (string str) { ... } . . . } } Util.qs: namespace

Is it possible to use Q# to control my own quantum computer?

北战南征 提交于 2019-12-21 07:49:07
问题 In short: If I have access to a real quantum computer, is there a possibility to control it using Q#? Before you downvote this into nirvana because "there's no quantum computer available yet": I'm a physicist and our group is able to do real gates on real world qubits. I also have some background in programming (mostly C++). So for the sake of this question, let's pretend someone has access to a real world device which is able to perform certain quantum operations on a number of qubits.

Q# Intellisense Errors

醉酒当歌 提交于 2019-12-13 17:46:21
问题 I can build my Q# projects fine, but VS 2017 (v. 15.9.4) has the Intellisense errors code QS6103 of "No namespace with that name exists." for my first two "open" statements shown below. I have tried with both the "0.3.1811.1501" and "0.3.1811.2802" versions of the SDK and Canon. namespace Quantum.QSharpApplication1 { open Microsoft.Quantum.Primitive; open Microsoft.Quantum.Canon; operation HelloQ () : Unit { Message("Hello quantum world!"); } } 回答1: What version of .NET Core do you have

Quantum Program The name 'BellTest' does not exist in the current context

妖精的绣舞 提交于 2019-12-10 13:34:58
问题 This is my first Q# program and i'm following this getting started link.https://docs.microsoft.com/en-us/quantum/quantum-writeaquantumprogram?view=qsharp-preview Error is The name 'BellTest' does not exist in the current context but its defined in the Bell.cs I followed the steps and when building its having errors. I'm not sure how to import the operations from .qs file to driver c# file as this error looks like it can't find that operation. Any help is really appreciated Here is the code

Is it possible to use Q# to control my own quantum computer?

萝らか妹 提交于 2019-12-04 00:19:23
In short: If I have access to a real quantum computer, is there a possibility to control it using Q#? Before you downvote this into nirvana because "there's no quantum computer available yet": I'm a physicist and our group is able to do real gates on real world qubits. I also have some background in programming (mostly C++). So for the sake of this question, let's pretend someone has access to a real world device which is able to perform certain quantum operations on a number of qubits. Obviously the number of qubits might be limited and so might be the possible operations. Let's also say

Unable to load DLL 'Microsoft.Quantum.Simulator.Runtime.dll'

落爺英雄遲暮 提交于 2019-12-02 14:28:03
问题 Getting Unable to load DLL 'Microsoft.Quantum.Simulator.Runtime.dll' error while trying to validate my Q# environment by running the teleport sample program. dotnet build dotnet run platform windows 7 64 bit with AVX enabled. vscode with .NET Core SDK 2.0 Unhandled Exception: System.DllNotFoundException: Unable to load DLL 'Microsoft.Quantum.Simulator.Runtime.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) at Microsoft.Quantum.Simulation.Simulators