无法加载DLL'Microsoft.Quantum.Simulator.Runtime.dll' [英] Unable to load DLL 'Microsoft.Quantum.Simulator.Runtime.dll'

查看:152
本文介绍了无法加载DLL'Microsoft.Quantum.Simulator.Runtime.dll'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在尝试通过运行传送示例程序来验证我的Q#环境时,无法加载DLL 'Microsoft.Quantum.Simulator.Runtime.dll'错误.

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.QuantumSimulator.Init()
   at Microsoft.Quantum.Simulation.Simulators.QuantumSimulator..ctor(Boolean throwOnReleasingQubitsNotInZeroState, Nullable`1 randomNumberGeneratorSeed, Boolean disableBorrowing)
   at Microsoft.Quantum.Examples.Teleportation.Program.Main(String[] args) in C:\opt\workspace\quantum\Quantum\Samples\Teleportation\Program.cs:line 13

推荐答案

C:\Users\{user}\.nuget\packages\microsoft.quantum.development.kit\0.2.1802.2202-preview\runtimes\win10-x64C:\Users\{user}\.nuget\packages\microsoft.quantum.development.kit\0.2.1802.2202-preview\lib\netstandard2.0.尽管我没有使用较旧的Microsoft Quantum Development Kit版本进行测试,但是0.2.1802.2202版本似乎存在问题.确保检查AVX是否可用,可以使用CPU-Z工具在说明部分中进行检查.

copy the Microsoft.Quantum.Simulator.Runtime.dll from C:\Users\{user}\.nuget\packages\microsoft.quantum.development.kit\0.2.1802.2202-preview\runtimes\win10-x64 to C:\Users\{user}\.nuget\packages\microsoft.quantum.development.kit\0.2.1802.2202-preview\lib\netstandard2.0. Although I have not tested this with the older Microsoft Quantum Development Kit version, there seems to be problem with the 0.2.1802.2202 version. Make sure to check if AVX is avaialble, you can use CPU-Z tool to check that in instructions section.

然后运行dotnet run,这将导致

Round 0:        Sent False,     got False.
Teleportation successful!!

Round 1:        Sent True,      got True.
Teleportation successful!!

Round 2:        Sent False,     got False.
Teleportation successful!!

Round 3:        Sent False,     got False.
Teleportation successful!!

Round 4:        Sent False,     got False.
Teleportation successful!!

Round 5:        Sent False,     got False.
Teleportation successful!!

Round 6:        Sent False,     got False.
Teleportation successful!!

Round 7:        Sent True,      got True.
Teleportation successful!!



Press Enter to continue...

这篇关于无法加载DLL'Microsoft.Quantum.Simulator.Runtime.dll'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆