Open marwafar opened 5 months ago
Just a note here - this is an error with iterating through a string, which we have not implement yet. This is not an error with if statements. If you update to s = [0, 0, 0, 1]
this code should work fine.
I updated this to more broadly capture iterable data types within kernels, to also include e.g. iterating over a register of qubits.
Required prerequisites
Describe the feature
If I run the example below:
I get the following error:
There are many cases where we need to use if statement. Currently, we have to repeat the code multiple time for each if statement.
Edit from bettinaheim: We have a similar case of "not supported" when iterating over a register of qubits. Let's define more broadly what iterations to support within kernels. Re string, see also https://github.com/NVIDIA/cuda-quantum/issues/1452.