quri_parts.qulacs.utils module¶
- cast_to_list(int_sequence)¶
Cast a sequence of numerics (int, float, complex) or an array to a list of the same type.
This is a workaround for too strict type annotation of Qulacs
- Parameters:
int_sequence (Sequence[Numerics] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes])
- Return type:
list[Numerics]