QuantumBFS / Yao.jl

Extensible, Efficient Quantum Algorithm Design for Humans.
https://yaoquantum.org
Other
924 stars 123 forks source link

cannot install CuYao and YaoExtensions #326

Closed HamidArianZad closed 2 years ago

HamidArianZad commented 2 years ago

Hello,

I tried to run the code: Listing 12: CUDA register, noted in source paper: Quantum 2020-09-29. I got some errors. First, I installed Yao and cuda on Julia v1.6.5 then run the code as follows:

  1. julia> using CuYao
  2. julia> r = ArrayReg(bit"1010") ;
  3. julia> r = cu(r) ; But I get error: syntex: extera token "qubits" after end of expression

YaoExtensions also does not work for me as well. Julia_Error

How can I solve these problems?

Thanks!

GiggleLiu commented 2 years ago

Hi, can you please test if your CUDA works properly? also are you using the latest CuYao? it should be version 0.3.1. To test your CUDA, you can type

julia> using CUDA

julia> CUDA.zeros(3)
HamidArianZad commented 2 years ago

Thank you for your reply. Please find in attachement the version of CuYao that I have installed. Julia_Error

GiggleLiu commented 2 years ago

It looks like your CUDA does not find the correct driver/binary file.

GiggleLiu commented 2 years ago

Also, about YaoExtensions, we are going to retire it gradually. You can use using Yao.EasyBuild to access most of the functionalities.

HamidArianZad commented 2 years ago

It looks like your CUDA does not find the correct driver/binary file.

I get the attached error accordingly. Julia_Error

GiggleLiu commented 2 years ago

Then it is a problem of your CUDA.

First, please make sure you have an Nvidia GPU, and your driver is installed properly. If you are using Linux, you should be more careful about the driver you use. If you are using Mac, you probably do not have a Nvidia GPU.

HamidArianZad commented 2 years ago

Then it is a problem of your CUDA.

First, please make sure you have an Nvidia GPU, and your driver is installed properly. If you are using Linux, you should be more careful about the driver you use. If you are using Mac, you probably do not have a Nvidia GPU.

OK, thank you very much for your help. I use Radeon graphic card.

Roger-luo commented 2 years ago

If you wish to use the GPU functionality I think only CUDA is supported, otherwise please just use Yao instead of CuYao. The rest should be the same. Please feel free to open other issues if you have other problems.