cuda-quantum icon indicating copy to clipboard operation
cuda-quantum copied to clipboard

Support complex values passed to numpy functions in python

Open anthony-santana opened this issue 10 months ago • 0 comments

Required prerequisites

  • [X] Search the issue tracker to check if your feature has already been mentioned or rejected in other issues.

Describe the feature

We should support complex argument values to the appropriate numpy functions. This includes the trig functions:

@cudaq.kernel
def kernel():
   # This works:
   value_1 = np.sin(1.0)
   # This doesn't work:
   value_2 = np.sin(1.0j)

Returning the error

ValueError: invalid 'Type(complex<f64>)' and expected floating point or integer type.

anthony-santana avatar Mar 27 '24 19:03 anthony-santana