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.

%debug magic command does not display quantum state visualization. #740

Description

Describe the bug
The %debug magic command for Q# in Jupyter Notebook (IQ# Kernel), does not display the bar graphs for amplitudes, probabilities, or real/imaginary co-efficients. The circuit appears, but the corresponding changes in the states of the qubits are not shown.

To Reproduce

  1. Open a new Jupyter Notebook with a Q# Kernel.
  2. In the first cell write a basic Q# program. Ex: In operation 'TestMethod' - create a qubit, apply the Hadamard gate, and measure the qubit.
  3. In the next 2 cells, run %simulate TestMethod then %debug TestMethod.
  4. Debug Controls work fine, but Chart Controls, when clicked, do not display anything.
  5. Open the console (F12 on Windows), and the error "Couldn't process kernel message TypeError: state.getDenseAmplitudes is not a function" is seen.

Expected behavior
The Chart controls of the %debug magic command should display the various states of the qubit as the program executes.

Screenshots
Error Message:
image

%Debug Output Window with no bar graph
image

System information

  • OS: Windows 11 64-bit
  • Browser: Google Chrome
  • Version: Latest

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions