mindquantum.dtype.to_mq_type

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

Convert type to mindquantum type.

Parameters

dtype (Union[mindquantum.dtype, mindspore.dtype, numpy.dtype]) – The data type supported by mindquantum or mindspore or numpy.

Examples

>>> from mindquantum import to_mq_type
>>> import numpy as np
>>> to_mq_type(np.complex128)
mindquantum.complex128