mindquantum 0.10.0__cp39-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (395) hide show
  1. mindquantum/__init__.py +84 -0
  2. mindquantum/__main__.py +23 -0
  3. mindquantum/_math.cpython-39-aarch64-linux-gnu.so +0 -0
  4. mindquantum/_mq_matrix.cpython-39-aarch64-linux-gnu.so +0 -0
  5. mindquantum/_mq_stabilizer.cpython-39-aarch64-linux-gnu.so +0 -0
  6. mindquantum/_mq_vector.cpython-39-aarch64-linux-gnu.so +0 -0
  7. mindquantum/algorithm/__init__.py +28 -0
  8. mindquantum/algorithm/compiler/__init__.py +29 -0
  9. mindquantum/algorithm/compiler/dag/__init__.py +34 -0
  10. mindquantum/algorithm/compiler/dag/dag.py +549 -0
  11. mindquantum/algorithm/compiler/decompose/__init__.py +25 -0
  12. mindquantum/algorithm/compiler/decompose/fixed_decompose/__init__.py +61 -0
  13. mindquantum/algorithm/compiler/decompose/fixed_decompose/h_related.py +68 -0
  14. mindquantum/algorithm/compiler/decompose/fixed_decompose/rx_related.py +67 -0
  15. mindquantum/algorithm/compiler/decompose/fixed_decompose/rxx_related.py +122 -0
  16. mindquantum/algorithm/compiler/decompose/fixed_decompose/ry_related.py +133 -0
  17. mindquantum/algorithm/compiler/decompose/fixed_decompose/ryy_related.py +130 -0
  18. mindquantum/algorithm/compiler/decompose/fixed_decompose/rz_related.py +134 -0
  19. mindquantum/algorithm/compiler/decompose/fixed_decompose/rzz_related.py +65 -0
  20. mindquantum/algorithm/compiler/decompose/fixed_decompose/s_related.py +76 -0
  21. mindquantum/algorithm/compiler/decompose/fixed_decompose/swap_related.py +111 -0
  22. mindquantum/algorithm/compiler/decompose/fixed_decompose/t_related.py +69 -0
  23. mindquantum/algorithm/compiler/decompose/fixed_decompose/x_related.py +112 -0
  24. mindquantum/algorithm/compiler/decompose/fixed_decompose/y_related.py +64 -0
  25. mindquantum/algorithm/compiler/decompose/fixed_decompose/z_related.py +64 -0
  26. mindquantum/algorithm/compiler/decompose/universal_decompose/__init__.py +30 -0
  27. mindquantum/algorithm/compiler/decompose/universal_decompose/one_qubit_decompose.py +119 -0
  28. mindquantum/algorithm/compiler/decompose/universal_decompose/qs_and_cu_decompose.py +254 -0
  29. mindquantum/algorithm/compiler/decompose/universal_decompose/two_qubit_decompose.py +254 -0
  30. mindquantum/algorithm/compiler/decompose/utils.py +492 -0
  31. mindquantum/algorithm/compiler/rules/__init__.py +43 -0
  32. mindquantum/algorithm/compiler/rules/basic_decompose.py +466 -0
  33. mindquantum/algorithm/compiler/rules/basic_rule.py +228 -0
  34. mindquantum/algorithm/compiler/rules/compiler_logger.py +141 -0
  35. mindquantum/algorithm/compiler/rules/device_based.py +34 -0
  36. mindquantum/algorithm/compiler/rules/fusion_rule.py +277 -0
  37. mindquantum/algorithm/compiler/rules/gate_replacer.py +157 -0
  38. mindquantum/algorithm/compiler/rules/neighbor_canceler.py +98 -0
  39. mindquantum/algorithm/error_mitigation/__init__.py +34 -0
  40. mindquantum/algorithm/error_mitigation/folding_circuit.py +135 -0
  41. mindquantum/algorithm/error_mitigation/mitigation.py +86 -0
  42. mindquantum/algorithm/error_mitigation/random_benchmarking.py +182 -0
  43. mindquantum/algorithm/error_mitigation/virtual_distillation.py +102 -0
  44. mindquantum/algorithm/library/__init__.py +31 -0
  45. mindquantum/algorithm/library/amplitude_encoder.py +135 -0
  46. mindquantum/algorithm/library/bitphaseflip_operator.py +83 -0
  47. mindquantum/algorithm/library/general_ghz_state.py +60 -0
  48. mindquantum/algorithm/library/general_w_state.py +70 -0
  49. mindquantum/algorithm/library/qjpeg.py +80 -0
  50. mindquantum/algorithm/library/quantum_fourier.py +70 -0
  51. mindquantum/algorithm/library/qudit_mapping.py +629 -0
  52. mindquantum/algorithm/mapping/__init__.py +20 -0
  53. mindquantum/algorithm/mapping/mq_sabre.py +120 -0
  54. mindquantum/algorithm/mapping/sabre.py +104 -0
  55. mindquantum/algorithm/nisq/__init__.py +33 -0
  56. mindquantum/algorithm/nisq/_ansatz.py +113 -0
  57. mindquantum/algorithm/nisq/barren_plateau.py +108 -0
  58. mindquantum/algorithm/nisq/chem/__init__.py +66 -0
  59. mindquantum/algorithm/nisq/chem/hardware_efficient_ansatz.py +177 -0
  60. mindquantum/algorithm/nisq/chem/more_hardware_efficient_ansatz.py +465 -0
  61. mindquantum/algorithm/nisq/chem/qubit_hamiltonian.py +35 -0
  62. mindquantum/algorithm/nisq/chem/qubit_ucc_ansatz.py +305 -0
  63. mindquantum/algorithm/nisq/chem/quccsd.py +211 -0
  64. mindquantum/algorithm/nisq/chem/reference_state.py +146 -0
  65. mindquantum/algorithm/nisq/chem/sg_ansatz.py +347 -0
  66. mindquantum/algorithm/nisq/chem/transform.py +243 -0
  67. mindquantum/algorithm/nisq/chem/uccsd.py +213 -0
  68. mindquantum/algorithm/nisq/chem/uccsd0.py +405 -0
  69. mindquantum/algorithm/nisq/chem/unitary_cc.py +128 -0
  70. mindquantum/algorithm/nisq/qaoa/__init__.py +24 -0
  71. mindquantum/algorithm/nisq/qaoa/max_2_sat_ansatz.py +210 -0
  72. mindquantum/algorithm/nisq/qaoa/max_cut_ansatz.py +232 -0
  73. mindquantum/algorithm/nisq/qaoa/max_cut_rqaoa_ansatz.py +278 -0
  74. mindquantum/algorithm/nisq/qaoa/qaoa_ansatz.py +113 -0
  75. mindquantum/algorithm/nisq/qaoa/rqaoa_ansatz.py +280 -0
  76. mindquantum/algorithm/nisq/qnn/__init__.py +45 -0
  77. mindquantum/algorithm/nisq/qnn/arxiv_1905_10876.py +1108 -0
  78. mindquantum/algorithm/nisq/qnn/iqp_encoding.py +157 -0
  79. mindquantum/algorithm/nisq/qnn/quantum_neuron.py +159 -0
  80. mindquantum/algorithm/nisq/qnn/strongly_entangling.py +111 -0
  81. mindquantum/algorithm/qaia/CAC.py +116 -0
  82. mindquantum/algorithm/qaia/CFC.py +112 -0
  83. mindquantum/algorithm/qaia/LQA.py +137 -0
  84. mindquantum/algorithm/qaia/NMFA.py +115 -0
  85. mindquantum/algorithm/qaia/QAIA.py +127 -0
  86. mindquantum/algorithm/qaia/SB.py +407 -0
  87. mindquantum/algorithm/qaia/SFC.py +115 -0
  88. mindquantum/algorithm/qaia/SimCIM.py +127 -0
  89. mindquantum/algorithm/qaia/__init__.py +37 -0
  90. mindquantum/config/__init__.py +18 -0
  91. mindquantum/config/config.py +84 -0
  92. mindquantum/core/__init__.py +33 -0
  93. mindquantum/core/circuit/__init__.py +81 -0
  94. mindquantum/core/circuit/channel_adder.py +670 -0
  95. mindquantum/core/circuit/circuit.py +1765 -0
  96. mindquantum/core/circuit/module_circuit.py +125 -0
  97. mindquantum/core/circuit/qfi.py +254 -0
  98. mindquantum/core/circuit/utils.py +642 -0
  99. mindquantum/core/gates/__init__.py +154 -0
  100. mindquantum/core/gates/basic.py +819 -0
  101. mindquantum/core/gates/basicgate.py +2655 -0
  102. mindquantum/core/gates/channel.py +871 -0
  103. mindquantum/core/gates/measurement.py +405 -0
  104. mindquantum/core/operators/__init__.py +72 -0
  105. mindquantum/core/operators/_base_operator.py +450 -0
  106. mindquantum/core/operators/_term_value.py +85 -0
  107. mindquantum/core/operators/fermion_operator.py +735 -0
  108. mindquantum/core/operators/hamiltonian.py +255 -0
  109. mindquantum/core/operators/polynomial_tensor.py +476 -0
  110. mindquantum/core/operators/projector.py +72 -0
  111. mindquantum/core/operators/qubit_excitation_operator.py +370 -0
  112. mindquantum/core/operators/qubit_operator.py +649 -0
  113. mindquantum/core/operators/time_evolution.py +92 -0
  114. mindquantum/core/operators/utils.py +325 -0
  115. mindquantum/core/parameterresolver/__init__.py +20 -0
  116. mindquantum/core/parameterresolver/parameterresolver.py +1214 -0
  117. mindquantum/core/parameterresolver/pr_generator.py +95 -0
  118. mindquantum/core/third_party/__init__.py +37 -0
  119. mindquantum/device/__init__.py +26 -0
  120. mindquantum/device/chip.py +66 -0
  121. mindquantum/device/topology.py +843 -0
  122. mindquantum/device/vigo_property.py +410 -0
  123. mindquantum/dtype/__init__.py +52 -0
  124. mindquantum/dtype/dtype.py +277 -0
  125. mindquantum/engine/__init__.py +20 -0
  126. mindquantum/engine/circuitengine.py +123 -0
  127. mindquantum/framework/__init__.py +85 -0
  128. mindquantum/framework/layer.py +396 -0
  129. mindquantum/framework/operations.py +678 -0
  130. mindquantum/include/mindquantum/algorithm/qaia/csr_base.h +40 -0
  131. mindquantum/include/mindquantum/algorithm/qaia/detail/common.cuh +77 -0
  132. mindquantum/include/mindquantum/algorithm/qaia/detail/gpu_sb.cuh +51 -0
  133. mindquantum/include/mindquantum/algorithm/qaia/detail/para.h +39 -0
  134. mindquantum/include/mindquantum/algorithm/qaia/detail/sb_helper.h +97 -0
  135. mindquantum/include/mindquantum/algorithm/qaia/detail/tools.cuh +220 -0
  136. mindquantum/include/mindquantum/config/cmake_config.h +26 -0
  137. mindquantum/include/mindquantum/config/common_type.h +83 -0
  138. mindquantum/include/mindquantum/config/complex_cast.h +56 -0
  139. mindquantum/include/mindquantum/config/concepts.h +48 -0
  140. mindquantum/include/mindquantum/config/config.h +102 -0
  141. mindquantum/include/mindquantum/config/constexpr_type_name.h +101 -0
  142. mindquantum/include/mindquantum/config/conversion.h +39 -0
  143. mindquantum/include/mindquantum/config/cxx20_config.h +74 -0
  144. mindquantum/include/mindquantum/config/details/clang_version.h +52 -0
  145. mindquantum/include/mindquantum/config/details/cxx20_compatibility.h +106 -0
  146. mindquantum/include/mindquantum/config/details/macros.h +63 -0
  147. mindquantum/include/mindquantum/config/detected.h +96 -0
  148. mindquantum/include/mindquantum/config/format/std_complex.h +83 -0
  149. mindquantum/include/mindquantum/config/format/std_optional.h +40 -0
  150. mindquantum/include/mindquantum/config/libc_compat.h +25 -0
  151. mindquantum/include/mindquantum/config/logging.h +65 -0
  152. mindquantum/include/mindquantum/config/openmp.h +30 -0
  153. mindquantum/include/mindquantum/config/parser/boost_x3_error_handler.h +223 -0
  154. mindquantum/include/mindquantum/config/popcnt.h +29 -0
  155. mindquantum/include/mindquantum/config/real_cast.h +128 -0
  156. mindquantum/include/mindquantum/config/tsl_ordered_map.h +93 -0
  157. mindquantum/include/mindquantum/config/type_promotion.h +143 -0
  158. mindquantum/include/mindquantum/config/type_traits.h +147 -0
  159. mindquantum/include/mindquantum/core/mq_base_types.h +153 -0
  160. mindquantum/include/mindquantum/core/numba_wrapper.h +76 -0
  161. mindquantum/include/mindquantum/core/sparse/algo.h +251 -0
  162. mindquantum/include/mindquantum/core/sparse/csrhdmatrix.h +89 -0
  163. mindquantum/include/mindquantum/core/sparse/paulimat.h +88 -0
  164. mindquantum/include/mindquantum/core/sparse/sparse_utils.h +94 -0
  165. mindquantum/include/mindquantum/core/utils.h +180 -0
  166. mindquantum/include/mindquantum/device/mapping.h +344 -0
  167. mindquantum/include/mindquantum/device/topology.h +130 -0
  168. mindquantum/include/mindquantum/math/longbits/longbits.h +79 -0
  169. mindquantum/include/mindquantum/math/operators/fermion_operator_view.h +221 -0
  170. mindquantum/include/mindquantum/math/operators/qubit_operator_view.h +188 -0
  171. mindquantum/include/mindquantum/math/operators/sparsing.h +24 -0
  172. mindquantum/include/mindquantum/math/operators/transform.h +87 -0
  173. mindquantum/include/mindquantum/math/operators/utils.h +115 -0
  174. mindquantum/include/mindquantum/math/pr/parameter_resolver.h +272 -0
  175. mindquantum/include/mindquantum/math/tensor/csr_matrix.h +51 -0
  176. mindquantum/include/mindquantum/math/tensor/matrix.h +72 -0
  177. mindquantum/include/mindquantum/math/tensor/ops/advance_math.h +66 -0
  178. mindquantum/include/mindquantum/math/tensor/ops/basic_math.h +109 -0
  179. mindquantum/include/mindquantum/math/tensor/ops/concrete_tensor.h +45 -0
  180. mindquantum/include/mindquantum/math/tensor/ops/memory_operator.h +80 -0
  181. mindquantum/include/mindquantum/math/tensor/ops.h +25 -0
  182. mindquantum/include/mindquantum/math/tensor/ops_cpu/advance_math.h +277 -0
  183. mindquantum/include/mindquantum/math/tensor/ops_cpu/basic_math.h +621 -0
  184. mindquantum/include/mindquantum/math/tensor/ops_cpu/concrete_tensor.h +39 -0
  185. mindquantum/include/mindquantum/math/tensor/ops_cpu/memory_operator.h +229 -0
  186. mindquantum/include/mindquantum/math/tensor/ops_cpu/utils.h +58 -0
  187. mindquantum/include/mindquantum/math/tensor/tensor.h +150 -0
  188. mindquantum/include/mindquantum/math/tensor/traits.h +276 -0
  189. mindquantum/include/mindquantum/ops/basic_gate.h +543 -0
  190. mindquantum/include/mindquantum/ops/gate_id.h +246 -0
  191. mindquantum/include/mindquantum/ops/gates/traits.h +56 -0
  192. mindquantum/include/mindquantum/ops/gates.h +141 -0
  193. mindquantum/include/mindquantum/ops/hamiltonian.h +58 -0
  194. mindquantum/include/mindquantum/ops/projector.h +49 -0
  195. mindquantum/include/mindquantum/python/core/sparse/csrhdmatrix.h +57 -0
  196. mindquantum/include/mindquantum/python/densitymatrix/bind_mat_state.h +72 -0
  197. mindquantum/include/mindquantum/python/device/binding.h +142 -0
  198. mindquantum/include/mindquantum/python/ops/basic_gate.h +52 -0
  199. mindquantum/include/mindquantum/python/ops/build_env.h +32 -0
  200. mindquantum/include/mindquantum/python/python_tensor.h +36 -0
  201. mindquantum/include/mindquantum/python/vector/bind_vec_state.h +92 -0
  202. mindquantum/include/mindquantum/simulator/cintrin.h +129 -0
  203. mindquantum/include/mindquantum/simulator/densitymatrix/densitymatrix_state.h +208 -0
  204. mindquantum/include/mindquantum/simulator/densitymatrix/densitymatrix_state.tpp +1163 -0
  205. mindquantum/include/mindquantum/simulator/densitymatrix/detail/cpu_densitymatrix_arm_double_policy.h +23 -0
  206. mindquantum/include/mindquantum/simulator/densitymatrix/detail/cpu_densitymatrix_arm_float_policy.h +23 -0
  207. mindquantum/include/mindquantum/simulator/densitymatrix/detail/cpu_densitymatrix_avx_double_policy.h +23 -0
  208. mindquantum/include/mindquantum/simulator/densitymatrix/detail/cpu_densitymatrix_avx_float_policy.h +23 -0
  209. mindquantum/include/mindquantum/simulator/densitymatrix/detail/cpu_densitymatrix_policy.h +296 -0
  210. mindquantum/include/mindquantum/simulator/stabilizer/query_element.h +32 -0
  211. mindquantum/include/mindquantum/simulator/stabilizer/random_benchmarking.h +24 -0
  212. mindquantum/include/mindquantum/simulator/stabilizer/stabilizer.h +84 -0
  213. mindquantum/include/mindquantum/simulator/timer.h +98 -0
  214. mindquantum/include/mindquantum/simulator/utils.h +61 -0
  215. mindquantum/include/mindquantum/simulator/vector/blas.h +34 -0
  216. mindquantum/include/mindquantum/simulator/vector/detail/cpu_vector_arm_double_policy.h +24 -0
  217. mindquantum/include/mindquantum/simulator/vector/detail/cpu_vector_arm_float_policy.h +23 -0
  218. mindquantum/include/mindquantum/simulator/vector/detail/cpu_vector_avx_double_policy.h +66 -0
  219. mindquantum/include/mindquantum/simulator/vector/detail/cpu_vector_avx_float_policy.h +23 -0
  220. mindquantum/include/mindquantum/simulator/vector/detail/cpu_vector_policy.h +232 -0
  221. mindquantum/include/mindquantum/simulator/vector/detail/gpu_vector_double_policy.cuh +23 -0
  222. mindquantum/include/mindquantum/simulator/vector/detail/gpu_vector_float_policy.cuh +23 -0
  223. mindquantum/include/mindquantum/simulator/vector/detail/gpu_vector_policy.cuh +265 -0
  224. mindquantum/include/mindquantum/simulator/vector/gradient.h +302 -0
  225. mindquantum/include/mindquantum/simulator/vector/runtime/cmd.h +36 -0
  226. mindquantum/include/mindquantum/simulator/vector/runtime/rt_gate.h +133 -0
  227. mindquantum/include/mindquantum/simulator/vector/runtime/utils.h +40 -0
  228. mindquantum/include/mindquantum/simulator/vector/vector_state.h +280 -0
  229. mindquantum/include/mindquantum/simulator/vector/vector_state.tpp +1406 -0
  230. mindquantum/io/__init__.py +24 -0
  231. mindquantum/io/beauty_print.py +95 -0
  232. mindquantum/io/display/__init__.py +25 -0
  233. mindquantum/io/display/_config.py +381 -0
  234. mindquantum/io/display/bloch_plt_drawer.py +585 -0
  235. mindquantum/io/display/circuit_svg_drawer.py +1399 -0
  236. mindquantum/io/display/circuit_text_drawer.py +431 -0
  237. mindquantum/io/display/circuit_text_drawer_helper.py +1084 -0
  238. mindquantum/io/display/measure_res_drawer.py +71 -0
  239. mindquantum/io/display/measure_res_svg_drawer.py +214 -0
  240. mindquantum/io/display/topology_drawer.py +199 -0
  241. mindquantum/io/qasm/__init__.py +24 -0
  242. mindquantum/io/qasm/hiqasm.py +497 -0
  243. mindquantum/io/qasm/openqasm.py +699 -0
  244. mindquantum/io/qasm/qcis.py +398 -0
  245. mindquantum/lib/mindquantum/libmq_base.a +0 -0
  246. mindquantum/lib/mindquantum/libmq_math.a +0 -0
  247. mindquantum/lib/mindquantum/libmqsim_common.a +0 -0
  248. mindquantum/lib/mindquantum/libmqsim_densitymatrix_cpu.a +0 -0
  249. mindquantum/lib/mindquantum/libmqsim_stabilizer.a +0 -0
  250. mindquantum/lib/mindquantum/libmqsim_vector_cpu.a +0 -0
  251. mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a95fb89c55065ede818c0342669f9637/cmake.lock +0 -0
  252. mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a95fb89c55065ede818c0342669f9637/include/fmt/args.h +235 -0
  253. mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a95fb89c55065ede818c0342669f9637/include/fmt/chrono.h +2240 -0
  254. mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a95fb89c55065ede818c0342669f9637/include/fmt/color.h +643 -0
  255. mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a95fb89c55065ede818c0342669f9637/include/fmt/compile.h +535 -0
  256. mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a95fb89c55065ede818c0342669f9637/include/fmt/core.h +2969 -0
  257. mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a95fb89c55065ede818c0342669f9637/include/fmt/format-inl.h +1678 -0
  258. mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a95fb89c55065ede818c0342669f9637/include/fmt/format.h +4535 -0
  259. mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a95fb89c55065ede818c0342669f9637/include/fmt/os.h +455 -0
  260. mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a95fb89c55065ede818c0342669f9637/include/fmt/ostream.h +245 -0
  261. mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a95fb89c55065ede818c0342669f9637/include/fmt/printf.h +675 -0
  262. mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a95fb89c55065ede818c0342669f9637/include/fmt/ranges.h +738 -0
  263. mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a95fb89c55065ede818c0342669f9637/include/fmt/std.h +537 -0
  264. mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a95fb89c55065ede818c0342669f9637/include/fmt/xchar.h +259 -0
  265. mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a95fb89c55065ede818c0342669f9637/lib/cmake/fmt/fmt-config-version.cmake +43 -0
  266. mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a95fb89c55065ede818c0342669f9637/lib/cmake/fmt/fmt-config.cmake +31 -0
  267. mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a95fb89c55065ede818c0342669f9637/lib/cmake/fmt/fmt-targets-release.cmake +19 -0
  268. mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a95fb89c55065ede818c0342669f9637/lib/cmake/fmt/fmt-targets.cmake +116 -0
  269. mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a95fb89c55065ede818c0342669f9637/lib/libfmt.a +0 -0
  270. mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a95fb89c55065ede818c0342669f9637/lib/pkgconfig/fmt.pc +11 -0
  271. mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a95fb89c55065ede818c0342669f9637/options.txt +3 -0
  272. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/cmake.lock +0 -0
  273. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/adl_serializer.hpp +55 -0
  274. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/byte_container_with_subtype.hpp +103 -0
  275. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/abi_macros.hpp +100 -0
  276. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/conversions/from_json.hpp +497 -0
  277. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/conversions/to_chars.hpp +1118 -0
  278. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/conversions/to_json.hpp +446 -0
  279. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/exceptions.hpp +255 -0
  280. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/hash.hpp +129 -0
  281. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/input/binary_reader.hpp +3010 -0
  282. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/input/input_adapters.hpp +494 -0
  283. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/input/json_sax.hpp +728 -0
  284. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/input/lexer.hpp +1632 -0
  285. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/input/parser.hpp +507 -0
  286. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/input/position_t.hpp +37 -0
  287. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/iterators/internal_iterator.hpp +35 -0
  288. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/iterators/iter_impl.hpp +751 -0
  289. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/iterators/iteration_proxy.hpp +242 -0
  290. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/iterators/iterator_traits.hpp +61 -0
  291. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/iterators/json_reverse_iterator.hpp +130 -0
  292. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/iterators/primitive_iterator.hpp +132 -0
  293. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/json_pointer.hpp +988 -0
  294. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/json_ref.hpp +78 -0
  295. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/macro_scope.hpp +468 -0
  296. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/macro_unscope.hpp +44 -0
  297. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/meta/call_std/begin.hpp +17 -0
  298. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/meta/call_std/end.hpp +17 -0
  299. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/meta/cpp_future.hpp +171 -0
  300. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/meta/detected.hpp +70 -0
  301. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/meta/identity_tag.hpp +21 -0
  302. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/meta/is_sax.hpp +159 -0
  303. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/meta/std_fs.hpp +29 -0
  304. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/meta/type_traits.hpp +740 -0
  305. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/meta/void_t.hpp +24 -0
  306. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/output/binary_writer.hpp +1838 -0
  307. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/output/output_adapters.hpp +147 -0
  308. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/output/serializer.hpp +988 -0
  309. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/string_concat.hpp +146 -0
  310. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/string_escape.hpp +72 -0
  311. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/detail/value_t.hpp +118 -0
  312. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/json.hpp +5214 -0
  313. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/json_fwd.hpp +74 -0
  314. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/ordered_map.hpp +359 -0
  315. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/thirdparty/hedley/hedley.hpp +2045 -0
  316. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/include/nlohmann/thirdparty/hedley/hedley_undef.hpp +158 -0
  317. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/options.txt +3 -0
  318. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/share/cmake/nlohmann_json/nlohmann_jsonConfig.cmake +15 -0
  319. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/share/cmake/nlohmann_json/nlohmann_jsonConfigVersion.cmake +20 -0
  320. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/share/cmake/nlohmann_json/nlohmann_jsonTargets.cmake +108 -0
  321. mindquantum/lib/mindquantum/third_party/nlohmann_json_3.11.2_a07c0cb38cd14d69714533545cfd6ef9/share/pkgconfig/nlohmann_json.pc +4 -0
  322. mindquantum/mqbackend.cpython-39-aarch64-linux-gnu.so +0 -0
  323. mindquantum/share/mindquantum/cmake/Modules/CheckCUDASourceCompiles.cmake +24 -0
  324. mindquantum/share/mindquantum/cmake/Modules/CheckCompilerFlag.cmake +89 -0
  325. mindquantum/share/mindquantum/cmake/Modules/CheckLanguage.cmake +122 -0
  326. mindquantum/share/mindquantum/cmake/Modules/CheckLinkerFlag.cmake +86 -0
  327. mindquantum/share/mindquantum/cmake/Modules/CheckSourceCompilesLocal.cmake +149 -0
  328. mindquantum/share/mindquantum/cmake/Modules/FindEigen3.cmake +250 -0
  329. mindquantum/share/mindquantum/cmake/Modules/FindSphinx.cmake +74 -0
  330. mindquantum/share/mindquantum/cmake/Modules/FindTBB.cmake +361 -0
  331. mindquantum/share/mindquantum/cmake/Modules/FindTemplate.cmake +1658 -0
  332. mindquantum/share/mindquantum/cmake/Modules/Findabsl.cmake +310 -0
  333. mindquantum/share/mindquantum/cmake/Modules/Findcereal.cmake +278 -0
  334. mindquantum/share/mindquantum/cmake/Modules/Findfmt.cmake +293 -0
  335. mindquantum/share/mindquantum/cmake/Modules/Findgmp.cmake +237 -0
  336. mindquantum/share/mindquantum/cmake/Modules/Findnlohmann_json.cmake +248 -0
  337. mindquantum/share/mindquantum/cmake/Modules/Findpybind11.cmake +299 -0
  338. mindquantum/share/mindquantum/cmake/Modules/Findtweedledum.cmake +242 -0
  339. mindquantum/share/mindquantum/cmake/Modules/NVCXX/CMakeDetermineNVCXXCompiler.cmake +127 -0
  340. mindquantum/share/mindquantum/cmake/Modules/NVCXX/CMakeNVCXXCompiler.cmake.in +76 -0
  341. mindquantum/share/mindquantum/cmake/Modules/NVCXX/CMakeNVCXXCompilerABI.nvcpp +57 -0
  342. mindquantum/share/mindquantum/cmake/Modules/NVCXX/CMakeNVCXXCompilerId.cpp.in +104 -0
  343. mindquantum/share/mindquantum/cmake/Modules/NVCXX/CMakeNVCXXInformation.cmake +266 -0
  344. mindquantum/share/mindquantum/cmake/Modules/NVCXX/CMakeTestNVCXXCompiler.cmake +94 -0
  345. mindquantum/share/mindquantum/cmake/Modules/NVCXX/NVHPC-NVCXX.cmake +53 -0
  346. mindquantum/share/mindquantum/cmake/Modules/_find_utils_begin.cmake +34 -0
  347. mindquantum/share/mindquantum/cmake/Modules/_find_utils_end.cmake +29 -0
  348. mindquantum/share/mindquantum/cmake/Modules/absl/20220623.cmake +583 -0
  349. mindquantum/share/mindquantum/cmake/Modules/apple/FindOpenMP.cmake +729 -0
  350. mindquantum/share/mindquantum/cmake/Modules/try_compile/CMakeLists.txt.in +64 -0
  351. mindquantum/share/mindquantum/cmake/commands/_protect_arguments.cmake +15 -0
  352. mindquantum/share/mindquantum/cmake/commands/debug_print.cmake +38 -0
  353. mindquantum/share/mindquantum/cmake/commands/find_python_module.cmake +97 -0
  354. mindquantum/share/mindquantum/cmake/commands/is_language_enabled.cmake +35 -0
  355. mindquantum/share/mindquantum/cmake/commands/mq_config_macros.cmake +62 -0
  356. mindquantum/share/mindquantum/cmake/commands/mq_link_libraries.cmake +50 -0
  357. mindquantum/share/mindquantum/cmake/commands/nvhpc_helpers.cmake +103 -0
  358. mindquantum/share/mindquantum/cmake/commands/target_cuda_architectures.cmake +131 -0
  359. mindquantum/share/mindquantum/cmake/commands/to_cmake_path.cmake +34 -0
  360. mindquantum/share/mindquantum/cmake/mindquantumConfig.cmake +104 -0
  361. mindquantum/share/mindquantum/cmake/mindquantumConfigVersion.cmake +65 -0
  362. mindquantum/share/mindquantum/cmake/mindquantumTargets-release.cmake +69 -0
  363. mindquantum/share/mindquantum/cmake/mindquantumTargets.cmake +236 -0
  364. mindquantum/share/mindquantum/cmake/mindquantumTargetsExternal.cmake +57 -0
  365. mindquantum/share/mindquantum/cmake/packages.cmake +280 -0
  366. mindquantum/simulator/__init__.py +35 -0
  367. mindquantum/simulator/available_simulator.py +116 -0
  368. mindquantum/simulator/backend_base.py +148 -0
  369. mindquantum/simulator/mq_blas.py +49 -0
  370. mindquantum/simulator/mqsim.py +614 -0
  371. mindquantum/simulator/noise.py +131 -0
  372. mindquantum/simulator/simulator.py +800 -0
  373. mindquantum/simulator/stabilizer.py +266 -0
  374. mindquantum/simulator/utils.py +76 -0
  375. mindquantum/third_party/__init__.py +18 -0
  376. mindquantum/third_party/interaction_operator.py +117 -0
  377. mindquantum/third_party/unitary_cc.py +232 -0
  378. mindquantum/utils/__init__.py +44 -0
  379. mindquantum/utils/error.py +44 -0
  380. mindquantum/utils/f.py +475 -0
  381. mindquantum/utils/fdopen.py +45 -0
  382. mindquantum/utils/progress.py +139 -0
  383. mindquantum/utils/quantifiers.py +36 -0
  384. mindquantum/utils/show_info.py +69 -0
  385. mindquantum/utils/string_utils.py +192 -0
  386. mindquantum/utils/type_value_check.py +222 -0
  387. mindquantum-0.10.0.dist-info/LICENSE +201 -0
  388. mindquantum-0.10.0.dist-info/METADATA +332 -0
  389. mindquantum-0.10.0.dist-info/RECORD +395 -0
  390. mindquantum-0.10.0.dist-info/WHEEL +5 -0
  391. mindquantum-0.10.0.dist-info/entry_points.txt +2 -0
  392. mindquantum-0.10.0.dist-info/top_level.txt +2 -0
  393. mindquantum.libs/libgomp-3566f446.so.1.0.0 +0 -0
  394. mindquantum_config/__init__.py +194 -0
  395. mindquantum_config/__main__.py +23 -0
@@ -0,0 +1,84 @@
1
+ # Copyright 2021 Huawei Technologies Co., Ltd
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ # ============================================================================
15
+ """.. MindQuantum package."""
16
+
17
+ import os
18
+ import sys
19
+ import warnings
20
+
21
+ import numpy as np
22
+
23
+ from .mqbackend import logging
24
+ from .framework import framework_modules
25
+
26
+ # isort: split
27
+
28
+
29
+ from . import (
30
+ algorithm,
31
+ config,
32
+ core,
33
+ device,
34
+ dtype,
35
+ engine,
36
+ framework,
37
+ io,
38
+ simulator,
39
+ utils,
40
+ )
41
+ from .algorithm import *
42
+ from .config import *
43
+ from .core import *
44
+ from .core import gates, operators
45
+ from .device import *
46
+ from .dtype import *
47
+ from .framework import *
48
+ from .io import *
49
+ from .simulator import *
50
+ from .utils import *
51
+
52
+ if sys.version_info < (3, 8): # pragma: no cover
53
+ from importlib_metadata import PackageNotFoundError, version
54
+ else: # pragma: no cover
55
+ from importlib.metadata import PackageNotFoundError, version
56
+
57
+ try:
58
+ __version__ = version("mindquantum")
59
+ __version_info__ = tuple(__version__.split('.'))
60
+ __all__ = ['__version__', '__version_info__']
61
+ except (PackageNotFoundError, AttributeError):
62
+ __all__ = []
63
+
64
+ __all__.extend(core.__all__)
65
+ __all__.extend(algorithm.__all__)
66
+ __all__.extend(utils.__all__)
67
+ __all__.extend(simulator.__all__)
68
+ __all__.extend(framework.__all__)
69
+ __all__.extend(io.__all__)
70
+ __all__.extend(config.__all__)
71
+ __all__.extend(device.__all__)
72
+ __all__.extend(dtype.__all__)
73
+ __all__.sort()
74
+
75
+
76
+ # pylint: disable=invalid-name
77
+ def __getattr__(name):
78
+ if name in framework_modules:
79
+ raise ImportError(
80
+ f"cannot import '{name}' from 'mindquantum'. "
81
+ "MindSpore not installed, 'mindquantum.framework' modules "
82
+ "(for hybrid quantum-classical neural network) are disabled."
83
+ )
84
+ raise ImportError(f"cannot import '{name}' from 'mindquantum'. '{name}' does not exist in mindquantum.")
@@ -0,0 +1,23 @@
1
+ # Copyright 2022 <Huawei Technologies Co., Ltd>
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ """Console entry point to access MindQuantum installation variables."""
16
+
17
+ from mindquantum_config import main
18
+
19
+ # ==============================================================================
20
+
21
+
22
+ if __name__ == "__main__":
23
+ main()
@@ -0,0 +1,28 @@
1
+ # Copyright 2021 Huawei Technologies Co., Ltd
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ # ============================================================================
15
+ """Quantum algorithms."""
16
+
17
+ from . import compiler, error_mitigation, library, mapping, nisq, qaia
18
+ from .error_mitigation import *
19
+ from .library import *
20
+ from .mapping import *
21
+ from .nisq import *
22
+
23
+ __all__ = []
24
+ __all__.extend(library.__all__)
25
+ __all__.extend(nisq.__all__)
26
+ __all__.extend(error_mitigation.__all__)
27
+ __all__.extend(mapping.__all__)
28
+ __all__.sort()
@@ -0,0 +1,29 @@
1
+ # Copyright 2021 Huawei Technologies Co., Ltd
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ # ============================================================================
15
+ """MindQuantum compiler related modules."""
16
+ import sys
17
+
18
+ sys.setrecursionlimit(20000)
19
+ # pylint: disable=wrong-import-position
20
+ from . import dag, decompose, rules # noqa: E402
21
+ from .dag import * # noqa: E402
22
+ from .decompose import * # noqa: E402
23
+ from .rules import * # noqa: E402
24
+
25
+ __all__ = []
26
+ __all__.extend(decompose.__all__)
27
+ __all__.extend(rules.__all__)
28
+ __all__.extend(dag.__all__)
29
+ __all__.sort()
@@ -0,0 +1,34 @@
1
+ # Copyright 2021 Huawei Technologies Co., Ltd
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ # ============================================================================
15
+ """Dag circuit."""
16
+
17
+ from .dag import (
18
+ DAGCircuit,
19
+ DAGNode,
20
+ DAGQubitNode,
21
+ GateNode,
22
+ connect_two_node,
23
+ try_merge,
24
+ )
25
+
26
+ __all__ = [
27
+ 'DAGCircuit',
28
+ 'DAGNode',
29
+ 'GateNode',
30
+ 'DAGQubitNode',
31
+ 'connect_two_node',
32
+ 'try_merge',
33
+ ]
34
+ __all__.sort()