Skip to content

Evolve the statevector with cusvaer #160

Answered by ymagchi
hthayko asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for sharing the targeting problem.
Current cusvaer doesn't have the functionality to return the state vector directly to GPU.

If the circuit fits into single GPU, it may be possible to split the simulation into its common section and post-processing:

  1. use cusvaer with the initial circuit and get the resulting state vector on host.
  2. copy state vector from host to device.
  3. use cuquantum.custatevec.apply_matrix to apply one gate, which can be computed on device. (cuquantum.custatevec.apply_matrix for reference)
  4. compute dot products using the state vector on device.
  5. reset the state vector on device and return to 3.

Will the above approach work in your case?

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@hthayko
Comment options

@ymagchi
Comment options

Answer selected by hthayko
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants