Closed raffaeleterribile closed 2 years ago
I resolved this issue. My antivirus was blocking the Q# kernel. I reinstalled IQSharp and launched a Jupyter notebook. My antivirs showd this message:
My antivirus is Avast and says that dotnet-iqsharp.exe
is infected by IDC.Generic
virus. But it's a false positive because I've instaled it with the command found on Quantum Development Kit site: dotnet iqsharp install
.
I've added an exception rule in my Antivirus and was able to execute Q# code inside a Jupyter Notebook.
Describe the bug
I've started studying Quantum Computing with Quantum Katas: with the first two notebooks (which uses ONLY Python code) I don't have problems; but with the third notebook (which uses ONLY Q# code) I cannot execute any cell. To investigate the issue I've created a simple Jupyter Notebook with some simple Q# code and have the same issue, so it's not a problem with the Quantum Katas, but some wrong configurations on my PC. When I try to execute the first Q# cell I see this message:
I've tried to execute simple Q# file to verifiy if there is a problem with QDK, but I haven't any problem: seems an error between Jupyter and Q# kernel. I've uninstalled QDK some times, I've created a conda environment for QDK (python 3.9.12) and upgraded all python packages, but I don't think it depends on Python.
To Reproduce
Execute any Q# cell
Expected behavior
Jupyter cell executed
Screenshots
I use a Visual Studio Code localized in Italian
System information
I have Windows 10, Python 3.9.12, last version of Visual Studio Code and last versione of Quantum Development Kit (uninstalled and reinstalled some times). In the Output Windows of Jupyter I've found these logs:
I've noticed in these logs the file "~\AppData\Roaming\jupyter\runtime\kernel-v2-24056MsOISUEkaXaV.json". The contents of this file is:
Additional context
I've activated VS Code Development Tools BEFORE running any cells and then I've tried to execute the first cell: nothing happens. However this is the message in the VS Code Development Tools:
In the language server log found in this messages there are only thisi message:
I think there is some wrong configuration in the Q# kernel registration, but I cannot find what the problem is.
Can you help me?
Thanks in advance