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 does not produce console output when running from Q# unit tests #1094

Description

Describe the bug

DumpMachine called from Q# unit test (defined using @Test attribute) does not print program state.

To Reproduce

Superposition kata uses DumpMachine to print expected and actual states for each exercise. You can run dotnet test on that project to see that there are no state dumps after "The desired state" and "The actual state" (https://github.com/microsoft/QuantumKatas/blob/main/Superposition/Tests.qs).

Expected behavior

Program state is printed in the unit tests.

System information

  • OS: Windows 11
  • .NET Core Version: 6.0.401
  • QDK 0.25.228311 and 0.25.218240 (used to work a year ago)

Additional context
When the same code is invoked from Q# Jupyter Notebook frontend, state dumps are produced successfully.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions