Quantum sample project run crashes with "exited with code 134"
maxim-shaw opened this issue · 1 comments
Following learning path guide from MS Learn/Training/Browse/Quantum computing foundations
https://learn.microsoft.com/en-us/training/modules/qsharp-create-first-quantum-development-kit
Fresh installation of .Net SDK and QDK on MacBook Pro M2
mshaw@Maxims-MBP quantum % ls /usr/local/share/dotnet/host/fxr
6.0.22
mshaw@Maxims-MBP quantum % dotnet --list-sdks
6.0.414 [/usr/local/share/dotnet/sdk]
mshaw@Maxims-MBP quantum % dotnet --list-runtimes
Microsoft.AspNetCore.App 6.0.22 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.22 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Creating a template of a sample application HelloQuantum with:
Command Palette > Q#: Install command line project templates
Command Palette > Q#: Create new project
new project's code:
namespace HelloQuantum {
open Microsoft.Quantum.Canon;
open Microsoft.Quantum.Intrinsic;
@EntryPoint()
operation SayHello() : Unit {
Message("Hello quantum world!");
}
}
mshaw@Maxims-MBP quantum % cd HelloQuantum
mshaw@Maxims-MBP HelloQuantum % dotnet run
/Users/mshaw/.nuget/packages/microsoft.quantum.sdk/0.28.302812/Sdk/Sdk.targets(68,5): error MSB3073: The command "dotnet "/Users/mshaw/.nuget/packages/microsoft.quantum.sdk/0.28.302812/DefaultItems/../tools/utils/Microsoft.Quantum.Sdk.BuildConfiguration.dll" -v Normal --output "obj/qsharp/config/qsc.config" --QscReferences "(/Users/mshaw/.nuget/packages/microsoft.quantum.csharpgeneration/0.28.302812/build//../lib/net6.0/Microsoft.Quantum.CSharpGeneration.dll, -1)"" exited with code 134. [/Users/mshaw/projects/defence/quantum/HelloQuantum/HelloQuantum.csproj]
The build failed. Fix the build errors and run again.
System information
-
OS: [MacOS: Ventura 13.4.1]
-
IQ# Version [iqsharp is not a part of the setup guide]
mshaw@Maxims-MBP HelloQuantum % dotnet iqsharp --version
Could not execute because the specified command or file was not found.
Possible reasons for this include:- You misspelled a built-in dotnet command.
- You intended to execute a .NET program, but dotnet-iqsharp does not exist.
- You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
Unfortunately Arm Macs are not supported. See this thread for discussion and one possible workaround microsoft/qsharp-compiler#1362 (comment)