QuantumBFS / CuYao.jl

CUDA extension for Yao.jl
https://yaoquantum.org
Other
35 stars 8 forks source link

Problems with `Measure` #16

Closed frankwswang closed 5 years ago

frankwswang commented 5 years ago

MWE:

julia> using CuYao
[ Info: Precompiling CuYao [b48ca7a8-dd42-11e8-2b8e-1b7706800275]

julia> reg =  rand_state(3, nbatch=1000) |> cu
ArrayReg{1000, Complex{Float64}, CuArray...}
    active qubits: 3/3

julia> c = Measure(3, locs=(1:2), collapseto=0)
Measure(3;locs=(1, 2), collapseto=000 ₍₂₎)

julia> reg |> c
[ Info: Building the CUDAnative run-time library for your sm_50 device, this might take a while...
ERROR: scalar getindex is disallowed
GiggleLiu commented 5 years ago

close for already fixed in master.