Skip to content
This repository has been 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

Open
tcNickolas opened this issue Sep 28, 2022 · 0 comments
Labels
bug Something isn't working needs triage An initial review by a maintainer is needed tracking

Comments

@tcNickolas
Copy link
Member

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.

@tcNickolas tcNickolas added bug Something isn't working needs triage An initial review by a maintainer is needed tracking labels Sep 28, 2022
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 tracking
Projects
None yet
Development

No branches or pull requests

1 participant