QuCumber icon indicating copy to clipboard operation
QuCumber copied to clipboard

Optimize _rotate_basis_state

Open emerali opened this issue 6 years ago • 1 comments

  • Create cplx-torch version of np.prod to speed up GPU run-time
  • Low prio: turn it into a generator function in order to be able to deal with a larger number of local rotations

emerali avatar Dec 31 '19 05:12 emerali

Tried creating a cplx-torch version of np.prod, didn't actually improve GPU performance (in fact it made it slightly slower)

Implementation of cplx.prod was as so:

  • Calculate arg of every element and add them up
  • Calculate magnitude and multiply them
  • Create complex result using magnitude and arg

There may be a better way to implement it, so I'll leave this issue open for now

emerali avatar Dec 31 '19 23:12 emerali