-
Notifications
You must be signed in to change notification settings - Fork 345
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Required prerequisites
- Search the issue tracker to check if your feature has already been mentioned or rejected in other issues.
Describe the feature
CUDA-Q run does not support kernels that return nested or aggregate vectors / lists / structs (e.g., list[list[int]]).
(main as of commit ID 5cf20bd)
This should be supported.
- Example 1
import cudaq
@cudaq.kernel
def test() -> list[list[int]]:
return [[1, 2], [3, 4]]
cudaq.run(test)
fails with RuntimeError: cudaq.run does not yet support returning nested list from entry-point kernels.
- Example 2
import cudaq
from dataclasses import dataclass
@dataclass(slots=True)
class MyTuple:
foo: int
bar: list[bool]
@cudaq.kernel
def test_tuple() -> MyTuple:
return MyTuple(42, [True, False, True])
cudaq.run(test_tuple)
fails with RuntimeError: Unsupported element type in struct type.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request