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

DumpMachine() raise Unhandled exception #1146

Open
@lmarangio

Description

@lmarangio

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds triageAn initial review by a maintainer is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions