QuantumBFS / CuYao.jl

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

supports cu(hamiltonian) #71

Closed ywlds closed 3 years ago

ywlds commented 3 years ago

current it seems the cu(state) is ok, but when we want to utilize expect(hamiltonian, cu(reg)) seems the hamilitonian is not supported by the current cu function.

can we add this function to fully use the gpu power for some case, that we need expectation value?

Many thanks,

GiggleLiu commented 3 years ago

What is your hamiltonian like? This expression will just work for most hamiltonians.

ywlds commented 3 years ago

expect(cu(hamiltonian), cu(reg)), the hamiltonian would be a molecule hamiltonian composed of a lot of Pauli terms

ywlds commented 3 years ago

What is your hamiltonian like? This expression will just work for most hamiltonians.

expect(cu(hamiltonian), cu(reg)), the hamiltonian would be a molecule hamiltonian composed of a lot of Pauli terms

GiggleLiu commented 3 years ago

You can not and do not need to do this

cu(hamiltonian)

hamiltonian is a circuit representation, not something can be uploaded to GPU.