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

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

Open
vs4503 opened this issue Oct 16, 2022 · 1 comment
Open

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

vs4503 opened this issue Oct 16, 2022 · 1 comment
Labels

Comments

@vs4503
Copy link

vs4503 commented Oct 16, 2022

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
@vs4503 vs4503 added the bug label Oct 16, 2022
@xinyi-joffre
Copy link
Contributor

Unfortunately, %debug and %trace are not supported today in the Azure Portal's hosted notebooks interface or in VSCode notebooks. This is due to the extensibility mechanism being different for these clients.

It is still supported in Jupyter Notebook classic interface if running a Jupyter server locally or using MyBinder.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants