You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using a custom class as the one above and accessing its elements in a quantum kernel produces the following error: cudaq.kernel.ast_bridge.CompilerError: struct_example.py:14: error: Invalid struct member: MySimpleStruct.i (members=[])
Since #1939, data structs can be defined as follows:
@dataclassclassMySimpleStruct:
i : intj : int
The documentation should be updated accordingly.
The text was updated successfully, but these errors were encountered:
Required prerequisites
Describe the feature
The Quantum Kernel documentation lists allowed types. An example struct is there defined as follows:
Using a custom class as the one above and accessing its elements in a quantum kernel produces the following error:
cudaq.kernel.ast_bridge.CompilerError: struct_example.py:14: error: Invalid struct member: MySimpleStruct.i (members=[])
Since #1939, data structs can be defined as follows:
The documentation should be updated accordingly.
The text was updated successfully, but these errors were encountered: