4

enter image description hereI have followed all steps described in https://docs.microsoft.com/en-us/quantum/install-guide/qjupyter

But I am unable to get through part 3. It is showing syntax error in Python terminal in Jupyter notebook. I am not seeing Q# terminal in jupyter notebook (New) folder

Now after so many attempts its showingenter image description here I am done with this. I think its better to switch to Qiskit.

enter image description here

quanity
  • 149
  • 3
  • Hi and welcome to Quatum Computing SE. Could you please add screenshot of the error? – Martin Vesely Mar 25 '20 at 15:14
  • 1
    It sounds like you may have created a Python-language notebook instead of a Q#-language notebook. In the upper-right hand side of the notebook (right next to the "Logout" button), there should be an icon telling you what language your notebook is currently using; for a Python notebook, that should be two interlocking snakes, while for a Q# notebook, it should show a blue and purpse Möbius strip icon. You can select a language for each new Notebook from the "New ↓" menu. – Chris Granade Mar 25 '20 at 16:15
  • @ChrisGranade I I don't see the option to start a Q# kernel (only Python 3) – quanity Mar 26 '20 at 03:28
  • 2
    Looks like a problem with you dotnet installation. What happens when you run dotnet --version? I recommend trying to close/reopen the command window. – El capi Mar 26 '20 at 08:10
  • This might be related: https://quantumcomputing.stackexchange.com/questions/9567/problems-with-q-installing?rq=1 – El capi Mar 26 '20 at 08:13
  • Out of curiosity, what folder is dotnet.exe installed in to? You can check by running Get-Command dotnet. It sounds like your dotnet.exe command may not be in the default location that the IQ# global tool is looking for, in which case you can add the DOTNET_ROOT environment variable suggested by the error message that you quoted. – Chris Granade Mar 27 '20 at 17:19
  • I also just happened to notice that you may be using the x86 version of the .NET Core SDK; can you try with the 64-bit version? You should be able to download from https://download.visualstudio.microsoft.com/download/pr/56131147-65ea-47d6-a945-b0296c86e510/44b43b7cb27d55081e650b9a4188a419/dotnet-sdk-3.1.201-win-x64.exe. Thanks for your patience! – Chris Granade Mar 27 '20 at 17:20
  • @ChrisGranade I am using Microsoft .NET Core SDK 3.1.201 (x64) – quanity Mar 28 '20 at 04:07
  • @quanity: Hm, I'm not sure why the screenshot you posted would be showing x86-specific environment variables, then. Would you be willing to share the output of Get-Command dotnet.exe and dotnet --info to help diagnose? Thanks! – Chris Granade Mar 29 '20 at 05:29
  • @quanity same issue I just use it on qbraid now – Jay Muntz Feb 05 '22 at 16:43

1 Answers1

1

As @el-capi and @chris-granade mentioned in comments, this looks like a problem with your .NET Core installation. Try the following to get yourself unblocked:

  • Remove any existing installation of .NET Core SDK or .NET Core Runtime.
  • Install .NET Core 3.1 SDK (x64 or x86 to match your Windows installation) using the links here: https://docs.microsoft.com/en-us/dotnet/core/install/sdk?pivots=os-windows

    In PowerShell, you can run [System.Environment]::Is64BitOperatingSystem to see whether you are running 64-bit Windows.

  • Open a new command prompt and reinstall the latest version of IQSharp by running:
    dotnet tool uninstall -g Microsoft.Quantum.IQSharp
    dotnet tool install -g Microsoft.Quantum.IQSharp
    dotnet iqsharp install
    
Ryan Shaffer
  • 548
  • 3
  • 8