QuantumBFS / Yao.jl

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

Make CuYao an extension #494

Closed GiggleLiu closed 4 months ago

GiggleLiu commented 4 months ago

Instead of installing CuYao, the CUDA extension can be access by typing

julia> using Yao, CUDA

julia> reg = rand_state(5) |> cu
ArrayReg{2, ComplexF64, CuArray...}
    active qubits: 5/5
    nlevel: 2

To test the CUDA extension, please run

$ make test-CuYao

Some extra make targets are added:

Maybe we can remove .ci in the future.

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 88.75%. Comparing base (e17a32b) to head (ac15ea8). Report is 3 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #494 +/- ## ========================================== - Coverage 89.03% 88.75% -0.29% ========================================== Files 83 87 +4 Lines 4835 5264 +429 ========================================== + Hits 4305 4672 +367 - Misses 530 592 +62 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

GiggleLiu commented 4 months ago

@Roger-luo all tests pass except the nightly.

GiggleLiu commented 4 months ago

how is CUDA current being tested in CI? I don't see any test being setup in the CI?

I haven't setup the CI yet, we need to test locally. We do not have tests for CuYao for long time.