mindquantum.dtype.to_complex_type

View Source On Gitee
mindquantum.dtype.to_complex_type(dtype)[source]

Convert type to complex type while keeping precision.

Parameters

dtype (mindquantum.dtype) – The data type supported by mindquantum.

Examples

>>> from mindquantum import to_complex_type, float32
>>> to_complex_type(float32)
mindquantum.complex64