0

As per the documentation provided by Microsoft Azure Quantum at this link , I followed the steps given and installed Q# with Jupyter Notebook, using Anaconda.

I then wrote the following Q# program in a Jupyter Notebook (IQ# kernel) using the code taken from here.

(I am currently using Google Chrome)

open Microsoft.Quantum.Diagnostics;

operation MultiQubitDumpMachineDemo() : Unit {
       
       use qubit = Qubit();
       
       H(qubit);
       
       DumpMachine();
       
       Reset(qubit);

   }

When I used the magic commands such as %simulate and %trace, the program executed normally. The DumpMachine result clearly shows the qubit in a superposition of |0> and |1> (measurement probability is 50%), and the trace command printed out the quantum circuit.

%simulate Result

%trace Result

However, when I run the %debug command, the interactive HTML display does not work. The debug control button can display the circuit but, the controls for the chart options do not display the amplitudes, probabilities, or real/imaginary co-efficients.

When I opened the console, I observed the following error, every time I clicked the chart options controls:

Couldn't process kernel message TypeError: state.getDenseAmplitudes is not a function
    at fitChart (bundle.js?v=20221015232727:292:32)
    at Object.updateChart (bundle.js?v=20221015232727:277:9)
    at update (bundle.js?v=20221015232727:811:32)
    at bundle.js?v=20221015232727:850:17
    at Kernel._handle_iopub_message (main.min.js?v=a4e125c812cb3975203ae429a5b40d180b59b8e4602fcc78390ef4f0dd4d14ac3559189f65f23cd50fd971f98f5842b7746f4182babd20b7ca84e52314bcd4ac:63064:20)
    at Kernel._finish_ws_message (main.min.js?v=a4e125c812cb3975203ae429a5b40d180b59b8e4602fcc78390ef4f0dd4d14ac3559189f65f23cd50fd971f98f5842b7746f4182babd20b7ca84e52314bcd4ac:62843:29)
    at main.min.js?v=a4e125c812cb3975203ae429a5b40d180b59b8e4602fcc78390ef4f0dd4d14ac3559189f65f23cd50fd971f98f5842b7746f4182babd20b7ca84e52314bcd4ac:62834:44

Error Message

Unfortunately, I am not familiar with this type of error or its possible solutions, so I didn't try anything more than updating the 'iqsharp' package.

Can anyone explain why I'm getting this error, and, if possible, provide with me a solution for the same? Thanks in advance!

0 Answers0