-
Notifications
You must be signed in to change notification settings - Fork 166
Open
Labels
Description
When targeting grace-hopper GPUs saw errors when trying to maximise size of problem that would fit on a Hopper GPU:
./qft 31
...
Total number of gates: 496
Measured probability amplitude of |0..0> state: 4.65661e-10
Calculated probability amplitude of |0..0>, C0 = 1 / 2^31: 4.65661e-10
Measuring final state: (all probabilities should be 0.5)
terminate called after throwing an instance of 'std::runtime_error'
what(): Invalid input range, passed negative size
Aborted (core dumped)
GPU should be able to fit 32 qubit calculations but limited to 30 in our initial tests.
Error related to overflows due to how thrust::make_counting_iterators are being used within quest/src/gpu/gpu_thrust.cuh.
Specifically functions:
thrust_statevec_multiQubitProjector_sub
thrust_statevec_calcProbOfMultiQubitOutcome_sub
However other instances of this clearly visible in file.
Initially fixed by updating the argument of thrust::make_counting_iterator(0) to thrust::make_counting_iterator(0LL).
Will look to create pull request with a more comprehensive fix shortly.