QuCumber
QuCumber copied to clipboard
Optimize _rotate_basis_state
- 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
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