cuda-quantum
cuda-quantum copied to clipboard
String support within quantum kernels
Required prerequisites
- [X] Search the issue tracker to check if your feature has already been mentioned or rejected in other issues.
Describe the feature
Support a string initialization through multiplication by int in python bridge. This may fall under the larger umbrella of strings in kernels, but in python you can initialize strings as follows:
string = "0" * 5
print(string) # `00000`
As is, we don't support multiplication of these types in the bridge
RuntimeError: Invalid type for Binary Op <class 'ast.Mult'> (Value(%19 = "cc.load"(%17) : (!cc.ptr<!cc.array<i8 x 2>>) -> !cc.array<i8 x 2>), Value(%18 = "cc.load"(%0) : (!cc.ptr<i64>) -> i64))
This should be considered at some point in the future.