Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

DumpMachine() raise Unhandled exception #1146

Open
lmarangio opened this issue May 29, 2023 · 0 comments
Open

DumpMachine() raise Unhandled exception #1146

lmarangio opened this issue May 29, 2023 · 0 comments
Labels
bug Something isn't working needs triage An initial review by a maintainer is needed

Comments

@lmarangio
Copy link

Describe the bug

I am trying to run the code reported here: https://learn.microsoft.com/en-gb/training/modules/qsharp-explore-key-concepts-quantum-computing/3-explore-superposition-qsharp

When I run it, I see this in the terminal:
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Quantum.Simulation.Extensions.Reverse(String s) at Microsoft.Quantum.Simulation.Simulators.CommonNativeSimulator.DisplayableState.BasisStateLabelToBigInt(String str) at Microsoft.Quantum.Simulation.Simulators.CommonNativeSimulator.DisplayableStateDumper.Callback(String idx, Double real, Double img)

To Reproduce

Just copy and paste the code from here: https://learn.microsoft.com/en-gb/training/modules/qsharp-explore-key-concepts-quantum-computing/3-explore-superposition-qsharp

I tried to use DumpMachine() in other scripts, but I received the same error.

Expected behavior

We expect DumpMachine() to work fine.

System information

Remark: to run Q# and QDK on ARM64, I am using this workaround: https://www.strathweb.com/2022/07/running-q-and-qdk-on-arm64-mac/

  • OS: macOS Ventura 13.4

  • .NET Core Version: 6.0.408

@lmarangio lmarangio added bug Something isn't working needs triage An initial review by a maintainer is needed labels May 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working needs triage An initial review by a maintainer is needed
Projects
None yet
Development

No branches or pull requests

1 participant