mindquantum.dtype.to_real_type

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

Convert type to real type while keeping precision.

Parameters

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

Examples

>>> from mindquantum import to_real_type, complex128
>>> to_real_type(complex128)
mindquantum.float64