mindquantum.dtype
MindQuantum 数据类型模拟。
支持的数据类型
如下类型是 MindQuantum 在进行量子模拟时支持的类型。
| mindquantum.float32 | single precision real number type | 
| mindquantum.float64 | double precision real number type | 
| mindquantum.complex64 | single precision complex number type | 
| mindquantum.complex128 | double precision complex number type | 
Memory consuming
下表展示全振幅量子态内存占用与比特数的关系:
| qubit number | complex128 | complex64 | 
|---|---|---|
| 6 | 1kB | 0.5kB | 
| 16 | 1MB | 0.5MB | 
| 26 | 1GB | 0.5GB | 
| 30 | 16GB | 8GB | 
| 36 | 1TB | 0.5TB | 
| 40 | 16TB | 8TB | 
| 46 | 1PB | 0.5PB | 
Function
| 判断一个类型是不是双精度类型。 | |
| 判断一个类型是不是单精度类型。 | |
| 判断两个类型的精度是否相同。 | |
| 返回精度的字符串。 | |
| 将一个类型转化为实数类型,并保持精度不变。 | |
| 将一个类型转化为复数类型,并保持精度不变。 | |
| 将一个类型转化为单精度类型。 | |
| 将一个类型转化为双精度类型。 | |
| 将一个类型转为跟目标类型精度相同的类型。 | |
| 将一个类型转化为mindquantum中支持的类型。 | |
| 将一个类型转化为numpy中的类型。 |