mindquantum 0.13.0__cp312-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.
- mindquantum/__init__.py +84 -0
- mindquantum/__main__.py +23 -0
- mindquantum/_build_info.json +5 -0
- mindquantum/_math.cpython-312-aarch64-linux-gnu.so +0 -0
- mindquantum/_mq_chem.cpython-312-aarch64-linux-gnu.so +0 -0
- mindquantum/_mq_matrix.cpython-312-aarch64-linux-gnu.so +0 -0
- mindquantum/_mq_mps.cpython-312-aarch64-linux-gnu.so +0 -0
- mindquantum/_mq_stabilizer.cpython-312-aarch64-linux-gnu.so +0 -0
- mindquantum/_mq_vector.cpython-312-aarch64-linux-gnu.so +0 -0
- mindquantum/_mq_vector_npu.cpython-312-aarch64-linux-gnu.so +0 -0
- mindquantum/_qaia_sb_ascend.cpython-312-aarch64-linux-gnu.so +0 -0
- mindquantum/algorithm/__init__.py +28 -0
- mindquantum/algorithm/compiler/__init__.py +29 -0
- mindquantum/algorithm/compiler/dag/__init__.py +34 -0
- mindquantum/algorithm/compiler/dag/dag.py +549 -0
- mindquantum/algorithm/compiler/decompose/__init__.py +25 -0
- mindquantum/algorithm/compiler/decompose/fixed_decompose/__init__.py +61 -0
- mindquantum/algorithm/compiler/decompose/fixed_decompose/h_related.py +68 -0
- mindquantum/algorithm/compiler/decompose/fixed_decompose/rx_related.py +67 -0
- mindquantum/algorithm/compiler/decompose/fixed_decompose/rxx_related.py +122 -0
- mindquantum/algorithm/compiler/decompose/fixed_decompose/ry_related.py +133 -0
- mindquantum/algorithm/compiler/decompose/fixed_decompose/ryy_related.py +130 -0
- mindquantum/algorithm/compiler/decompose/fixed_decompose/rz_related.py +134 -0
- mindquantum/algorithm/compiler/decompose/fixed_decompose/rzz_related.py +65 -0
- mindquantum/algorithm/compiler/decompose/fixed_decompose/s_related.py +76 -0
- mindquantum/algorithm/compiler/decompose/fixed_decompose/swap_related.py +111 -0
- mindquantum/algorithm/compiler/decompose/fixed_decompose/t_related.py +69 -0
- mindquantum/algorithm/compiler/decompose/fixed_decompose/x_related.py +112 -0
- mindquantum/algorithm/compiler/decompose/fixed_decompose/y_related.py +64 -0
- mindquantum/algorithm/compiler/decompose/fixed_decompose/z_related.py +64 -0
- mindquantum/algorithm/compiler/decompose/universal_decompose/__init__.py +30 -0
- mindquantum/algorithm/compiler/decompose/universal_decompose/one_qubit_decompose.py +119 -0
- mindquantum/algorithm/compiler/decompose/universal_decompose/qs_and_cu_decompose.py +254 -0
- mindquantum/algorithm/compiler/decompose/universal_decompose/two_qubit_decompose.py +254 -0
- mindquantum/algorithm/compiler/decompose/utils.py +492 -0
- mindquantum/algorithm/compiler/rules/__init__.py +43 -0
- mindquantum/algorithm/compiler/rules/basic_decompose.py +469 -0
- mindquantum/algorithm/compiler/rules/basic_rule.py +228 -0
- mindquantum/algorithm/compiler/rules/compiler_logger.py +141 -0
- mindquantum/algorithm/compiler/rules/device_based.py +34 -0
- mindquantum/algorithm/compiler/rules/fusion_rule.py +277 -0
- mindquantum/algorithm/compiler/rules/gate_replacer.py +157 -0
- mindquantum/algorithm/compiler/rules/neighbor_canceler.py +98 -0
- mindquantum/algorithm/error_mitigation/__init__.py +34 -0
- mindquantum/algorithm/error_mitigation/folding_circuit.py +135 -0
- mindquantum/algorithm/error_mitigation/mitigation.py +86 -0
- mindquantum/algorithm/error_mitigation/random_benchmarking.py +182 -0
- mindquantum/algorithm/error_mitigation/virtual_distillation.py +102 -0
- mindquantum/algorithm/library/__init__.py +31 -0
- mindquantum/algorithm/library/amplitude_encoder.py +135 -0
- mindquantum/algorithm/library/bitphaseflip_operator.py +83 -0
- mindquantum/algorithm/library/general_ghz_state.py +60 -0
- mindquantum/algorithm/library/general_w_state.py +70 -0
- mindquantum/algorithm/library/qjpeg.py +80 -0
- mindquantum/algorithm/library/quantum_fourier.py +70 -0
- mindquantum/algorithm/library/qudit_mapping.py +630 -0
- mindquantum/algorithm/mapping/__init__.py +20 -0
- mindquantum/algorithm/mapping/mq_sabre.py +178 -0
- mindquantum/algorithm/mapping/sabre.py +152 -0
- mindquantum/algorithm/nisq/__init__.py +33 -0
- mindquantum/algorithm/nisq/_ansatz.py +113 -0
- mindquantum/algorithm/nisq/barren_plateau.py +108 -0
- mindquantum/algorithm/nisq/chem/__init__.py +66 -0
- mindquantum/algorithm/nisq/chem/hardware_efficient_ansatz.py +177 -0
- mindquantum/algorithm/nisq/chem/more_hardware_efficient_ansatz.py +465 -0
- mindquantum/algorithm/nisq/chem/qubit_hamiltonian.py +35 -0
- mindquantum/algorithm/nisq/chem/qubit_ucc_ansatz.py +305 -0
- mindquantum/algorithm/nisq/chem/quccsd.py +211 -0
- mindquantum/algorithm/nisq/chem/reference_state.py +146 -0
- mindquantum/algorithm/nisq/chem/sg_ansatz.py +346 -0
- mindquantum/algorithm/nisq/chem/transform.py +243 -0
- mindquantum/algorithm/nisq/chem/uccsd.py +213 -0
- mindquantum/algorithm/nisq/chem/uccsd0.py +405 -0
- mindquantum/algorithm/nisq/chem/unitary_cc.py +128 -0
- mindquantum/algorithm/nisq/qaoa/__init__.py +24 -0
- mindquantum/algorithm/nisq/qaoa/max_2_sat_ansatz.py +210 -0
- mindquantum/algorithm/nisq/qaoa/max_cut_ansatz.py +232 -0
- mindquantum/algorithm/nisq/qaoa/max_cut_rqaoa_ansatz.py +279 -0
- mindquantum/algorithm/nisq/qaoa/qaoa_ansatz.py +113 -0
- mindquantum/algorithm/nisq/qaoa/rqaoa_ansatz.py +280 -0
- mindquantum/algorithm/nisq/qnn/__init__.py +45 -0
- mindquantum/algorithm/nisq/qnn/arxiv_1905_10876.py +1108 -0
- mindquantum/algorithm/nisq/qnn/iqp_encoding.py +157 -0
- mindquantum/algorithm/nisq/qnn/quantum_neuron.py +159 -0
- mindquantum/algorithm/nisq/qnn/strongly_entangling.py +111 -0
- mindquantum/algorithm/qaia/CAC.py +228 -0
- mindquantum/algorithm/qaia/CFC.py +205 -0
- mindquantum/algorithm/qaia/LQA.py +271 -0
- mindquantum/algorithm/qaia/NMFA.py +191 -0
- mindquantum/algorithm/qaia/QAIA.py +226 -0
- mindquantum/algorithm/qaia/QSB.py +327 -0
- mindquantum/algorithm/qaia/SB.py +774 -0
- mindquantum/algorithm/qaia/SFC.py +221 -0
- mindquantum/algorithm/qaia/SimCIM.py +225 -0
- mindquantum/algorithm/qaia/__init__.py +42 -0
- mindquantum/algorithm/qaia/_ascend_sb.py +88 -0
- mindquantum/bin/mqrt +0 -0
- mindquantum/config/__init__.py +18 -0
- mindquantum/config/config.py +84 -0
- mindquantum/core/__init__.py +33 -0
- mindquantum/core/circuit/__init__.py +81 -0
- mindquantum/core/circuit/channel_adder.py +670 -0
- mindquantum/core/circuit/circuit.py +1781 -0
- mindquantum/core/circuit/module_circuit.py +125 -0
- mindquantum/core/circuit/qfi.py +254 -0
- mindquantum/core/circuit/utils.py +642 -0
- mindquantum/core/gates/__init__.py +154 -0
- mindquantum/core/gates/basic.py +819 -0
- mindquantum/core/gates/basicgate.py +2656 -0
- mindquantum/core/gates/channel.py +871 -0
- mindquantum/core/gates/measurement.py +428 -0
- mindquantum/core/operators/__init__.py +72 -0
- mindquantum/core/operators/_base_operator.py +450 -0
- mindquantum/core/operators/_term_value.py +85 -0
- mindquantum/core/operators/fermion_operator.py +735 -0
- mindquantum/core/operators/hamiltonian.py +255 -0
- mindquantum/core/operators/polynomial_tensor.py +476 -0
- mindquantum/core/operators/projector.py +72 -0
- mindquantum/core/operators/qubit_excitation_operator.py +370 -0
- mindquantum/core/operators/qubit_operator.py +649 -0
- mindquantum/core/operators/time_evolution.py +96 -0
- mindquantum/core/operators/utils.py +326 -0
- mindquantum/core/parameterresolver/__init__.py +20 -0
- mindquantum/core/parameterresolver/parameterresolver.py +1214 -0
- mindquantum/core/parameterresolver/pr_generator.py +95 -0
- mindquantum/core/third_party/__init__.py +37 -0
- mindquantum/device/__init__.py +28 -0
- mindquantum/device/chip.py +74 -0
- mindquantum/device/qpu.py +877 -0
- mindquantum/device/topology.py +843 -0
- mindquantum/device/vigo_property.py +410 -0
- mindquantum/dtype/__init__.py +52 -0
- mindquantum/dtype/dtype.py +277 -0
- mindquantum/engine/__init__.py +20 -0
- mindquantum/engine/circuitengine.py +123 -0
- mindquantum/framework/__init__.py +85 -0
- mindquantum/framework/layer.py +402 -0
- mindquantum/framework/operations.py +687 -0
- mindquantum/include/mindquantum/algorithm/qaia/ascend/kernel_launch.h +20 -0
- mindquantum/include/mindquantum/algorithm/qaia/csr_base.h +40 -0
- mindquantum/include/mindquantum/algorithm/qaia/detail/common.cuh +77 -0
- mindquantum/include/mindquantum/algorithm/qaia/detail/gpu_sb.cuh +51 -0
- mindquantum/include/mindquantum/algorithm/qaia/detail/para.h +39 -0
- mindquantum/include/mindquantum/algorithm/qaia/detail/sb_helper.h +97 -0
- mindquantum/include/mindquantum/algorithm/qaia/detail/tools.cuh +220 -0
- mindquantum/include/mindquantum/config/cmake_config.h +26 -0
- mindquantum/include/mindquantum/config/common_type.h +83 -0
- mindquantum/include/mindquantum/config/complex_cast.h +56 -0
- mindquantum/include/mindquantum/config/concepts.h +48 -0
- mindquantum/include/mindquantum/config/config.h +130 -0
- mindquantum/include/mindquantum/config/constexpr_type_name.h +101 -0
- mindquantum/include/mindquantum/config/conversion.h +39 -0
- mindquantum/include/mindquantum/config/cxx20_config.h +74 -0
- mindquantum/include/mindquantum/config/details/clang_version.h +52 -0
- mindquantum/include/mindquantum/config/details/cxx20_compatibility.h +106 -0
- mindquantum/include/mindquantum/config/details/macros.h +63 -0
- mindquantum/include/mindquantum/config/detected.h +96 -0
- mindquantum/include/mindquantum/config/format/std_complex.h +83 -0
- mindquantum/include/mindquantum/config/format/std_optional.h +40 -0
- mindquantum/include/mindquantum/config/libc_compat.h +25 -0
- mindquantum/include/mindquantum/config/logging.h +65 -0
- mindquantum/include/mindquantum/config/openmp.h +106 -0
- mindquantum/include/mindquantum/config/parser/boost_x3_error_handler.h +223 -0
- mindquantum/include/mindquantum/config/popcnt.h +29 -0
- mindquantum/include/mindquantum/config/real_cast.h +128 -0
- mindquantum/include/mindquantum/config/tsl_ordered_map.h +93 -0
- mindquantum/include/mindquantum/config/type_promotion.h +143 -0
- mindquantum/include/mindquantum/config/type_traits.h +147 -0
- mindquantum/include/mindquantum/core/ascend.h +103 -0
- mindquantum/include/mindquantum/core/ascend_kernel_library.h +77 -0
- mindquantum/include/mindquantum/core/mq_base_types.h +144 -0
- mindquantum/include/mindquantum/core/numba_wrapper.h +76 -0
- mindquantum/include/mindquantum/core/sparse/algo.h +253 -0
- mindquantum/include/mindquantum/core/sparse/csrhdmatrix.h +89 -0
- mindquantum/include/mindquantum/core/sparse/paulimat.h +88 -0
- mindquantum/include/mindquantum/core/sparse/sparse_utils.h +94 -0
- mindquantum/include/mindquantum/core/utils.h +184 -0
- mindquantum/include/mindquantum/device/mapping.h +353 -0
- mindquantum/include/mindquantum/device/topology.h +131 -0
- mindquantum/include/mindquantum/math/longbits/longbits.h +79 -0
- mindquantum/include/mindquantum/math/operators/fermion_operator_view.h +221 -0
- mindquantum/include/mindquantum/math/operators/qubit_operator_view.h +188 -0
- mindquantum/include/mindquantum/math/operators/sparsing.h +24 -0
- mindquantum/include/mindquantum/math/operators/transform.h +87 -0
- mindquantum/include/mindquantum/math/operators/utils.h +115 -0
- mindquantum/include/mindquantum/math/pr/parameter_resolver.h +272 -0
- mindquantum/include/mindquantum/math/tensor/csr_matrix.h +51 -0
- mindquantum/include/mindquantum/math/tensor/matrix.h +72 -0
- mindquantum/include/mindquantum/math/tensor/ops/advance_math.h +66 -0
- mindquantum/include/mindquantum/math/tensor/ops/basic_math.h +109 -0
- mindquantum/include/mindquantum/math/tensor/ops/concrete_tensor.h +45 -0
- mindquantum/include/mindquantum/math/tensor/ops/memory_operator.h +80 -0
- mindquantum/include/mindquantum/math/tensor/ops.h +25 -0
- mindquantum/include/mindquantum/math/tensor/ops_cpu/advance_math.h +277 -0
- mindquantum/include/mindquantum/math/tensor/ops_cpu/basic_math.h +620 -0
- mindquantum/include/mindquantum/math/tensor/ops_cpu/concrete_tensor.h +39 -0
- mindquantum/include/mindquantum/math/tensor/ops_cpu/memory_operator.h +229 -0
- mindquantum/include/mindquantum/math/tensor/ops_cpu/utils.h +58 -0
- mindquantum/include/mindquantum/math/tensor/tensor.h +150 -0
- mindquantum/include/mindquantum/math/tensor/traits.h +276 -0
- mindquantum/include/mindquantum/ops/basic_gate.h +543 -0
- mindquantum/include/mindquantum/ops/gate_id.h +246 -0
- mindquantum/include/mindquantum/ops/gates/traits.h +56 -0
- mindquantum/include/mindquantum/ops/gates.h +141 -0
- mindquantum/include/mindquantum/ops/hamiltonian.h +58 -0
- mindquantum/include/mindquantum/ops/projector.h +49 -0
- mindquantum/include/mindquantum/python/chemistry/bind_ci_state.h +72 -0
- mindquantum/include/mindquantum/python/core/sparse/csrhdmatrix.h +57 -0
- mindquantum/include/mindquantum/python/densitymatrix/bind_mat_state.h +57 -0
- mindquantum/include/mindquantum/python/device/binding.h +142 -0
- mindquantum/include/mindquantum/python/mps/bind_mps_state.h +120 -0
- mindquantum/include/mindquantum/python/ops/basic_gate.h +52 -0
- mindquantum/include/mindquantum/python/ops/build_env.h +32 -0
- mindquantum/include/mindquantum/python/python_tensor.h +36 -0
- mindquantum/include/mindquantum/python/vector/bind_vec_state.h +77 -0
- mindquantum/include/mindquantum/simulator/arm_sve/sve_utils.h +399 -0
- mindquantum/include/mindquantum/simulator/chemistry/ci_state.h +101 -0
- mindquantum/include/mindquantum/simulator/chemistry/ci_state.tpp +185 -0
- mindquantum/include/mindquantum/simulator/chemistry/detail/chem_timing.h +110 -0
- mindquantum/include/mindquantum/simulator/chemistry/detail/ci_basis.h +282 -0
- mindquantum/include/mindquantum/simulator/chemistry/detail/ci_vector_grad_policy.h +170 -0
- mindquantum/include/mindquantum/simulator/chemistry/detail/cpp_ci_hamiltonian.h +141 -0
- mindquantum/include/mindquantum/simulator/chemistry/detail/cpp_excitation_operator.h +152 -0
- mindquantum/include/mindquantum/simulator/chemistry/detail/cpu_ci_vector_double_policy.h +26 -0
- mindquantum/include/mindquantum/simulator/chemistry/detail/cpu_ci_vector_float_policy.h +26 -0
- mindquantum/include/mindquantum/simulator/chemistry/detail/cpu_ci_vector_policy.h +118 -0
- mindquantum/include/mindquantum/simulator/cintrin.h +129 -0
- mindquantum/include/mindquantum/simulator/circuit_tiling/builder.h +1660 -0
- mindquantum/include/mindquantum/simulator/circuit_tiling/circuit_tiling.h +236 -0
- mindquantum/include/mindquantum/simulator/circuit_tiling/detail/kernels.h +438 -0
- mindquantum/include/mindquantum/simulator/circuit_tiling/detail/scalar_runtime.h +287 -0
- mindquantum/include/mindquantum/simulator/circuit_tiling/detail/sve_runtime.h +267 -0
- mindquantum/include/mindquantum/simulator/circuit_tiling/detail/tile_engine.h +266 -0
- mindquantum/include/mindquantum/simulator/circuit_tiling/executor.h +72 -0
- mindquantum/include/mindquantum/simulator/circuit_tiling/planner.h +487 -0
- mindquantum/include/mindquantum/simulator/circuit_tiling/state_space.h +295 -0
- mindquantum/include/mindquantum/simulator/cpu_features.h +60 -0
- mindquantum/include/mindquantum/simulator/densitymatrix/densitymatrix_state.h +247 -0
- mindquantum/include/mindquantum/simulator/densitymatrix/densitymatrix_state.tpp +757 -0
- mindquantum/include/mindquantum/simulator/densitymatrix/detail/cpu_densitymatrix_policy.h +134 -0
- mindquantum/include/mindquantum/simulator/mps/compiler/mps_compiler.h +1359 -0
- mindquantum/include/mindquantum/simulator/mps/compiler/mps_program.h +62 -0
- mindquantum/include/mindquantum/simulator/mps/detail/cpu_mps_policy.h +39 -0
- mindquantum/include/mindquantum/simulator/mps/detail/linalg/blas.h +113 -0
- mindquantum/include/mindquantum/simulator/mps/detail/linalg/lapack_svd.h +196 -0
- mindquantum/include/mindquantum/simulator/mps/detail/linalg/matrix.h +215 -0
- mindquantum/include/mindquantum/simulator/mps/detail/linalg/symbol.h +32 -0
- mindquantum/include/mindquantum/simulator/mps/detail/linalg/threading.h +61 -0
- mindquantum/include/mindquantum/simulator/mps/mps_state.h +178 -0
- mindquantum/include/mindquantum/simulator/mps/mps_state.tpp +1913 -0
- mindquantum/include/mindquantum/simulator/stabilizer/query_element.h +32 -0
- mindquantum/include/mindquantum/simulator/stabilizer/random_benchmarking.h +24 -0
- mindquantum/include/mindquantum/simulator/stabilizer/stabilizer.h +84 -0
- mindquantum/include/mindquantum/simulator/state_index.h +218 -0
- mindquantum/include/mindquantum/simulator/timer.h +98 -0
- mindquantum/include/mindquantum/simulator/utils.h +139 -0
- mindquantum/include/mindquantum/simulator/vector/ascend/device_program.h +118 -0
- mindquantum/include/mindquantum/simulator/vector/ascend/kernel_api.h +28 -0
- mindquantum/include/mindquantum/simulator/vector/ascend/kernel_launch.h +70 -0
- mindquantum/include/mindquantum/simulator/vector/ascend/observable.h +281 -0
- mindquantum/include/mindquantum/simulator/vector/ascend/program.h +128 -0
- mindquantum/include/mindquantum/simulator/vector/ascend/runtime.h +105 -0
- mindquantum/include/mindquantum/simulator/vector/blas.h +34 -0
- mindquantum/include/mindquantum/simulator/vector/detail/cpu_vector_arch_policy.h +48 -0
- mindquantum/include/mindquantum/simulator/vector/detail/cpu_vector_arm_double_policy.h +22 -0
- mindquantum/include/mindquantum/simulator/vector/detail/cpu_vector_arm_float_policy.h +23 -0
- mindquantum/include/mindquantum/simulator/vector/detail/cpu_vector_arm_policy.h +50 -0
- mindquantum/include/mindquantum/simulator/vector/detail/cpu_vector_avx_double_policy.h +70 -0
- mindquantum/include/mindquantum/simulator/vector/detail/cpu_vector_avx_float_policy.h +29 -0
- mindquantum/include/mindquantum/simulator/vector/detail/cpu_vector_matrix_gate_utils.h +287 -0
- mindquantum/include/mindquantum/simulator/vector/detail/cpu_vector_policy.h +247 -0
- mindquantum/include/mindquantum/simulator/vector/detail/cuquantum_loader.cuh +71 -0
- mindquantum/include/mindquantum/simulator/vector/detail/cuquantum_vector_double_policy.cuh +91 -0
- mindquantum/include/mindquantum/simulator/vector/detail/cuquantum_vector_float_policy.cuh +91 -0
- mindquantum/include/mindquantum/simulator/vector/detail/gpu_vector_double_policy.cuh +23 -0
- mindquantum/include/mindquantum/simulator/vector/detail/gpu_vector_float_policy.cuh +23 -0
- mindquantum/include/mindquantum/simulator/vector/detail/gpu_vector_policy.cuh +267 -0
- mindquantum/include/mindquantum/simulator/vector/gradient.h +356 -0
- mindquantum/include/mindquantum/simulator/vector/runtime/cmd.h +35 -0
- mindquantum/include/mindquantum/simulator/vector/runtime/rt_gate.h +133 -0
- mindquantum/include/mindquantum/simulator/vector/runtime/utils.h +40 -0
- mindquantum/include/mindquantum/simulator/vector/vector_state.h +299 -0
- mindquantum/include/mindquantum/simulator/vector/vector_state.tpp +1594 -0
- mindquantum/include/mindquantum/simulator/worker_scratch.h +79 -0
- mindquantum/io/__init__.py +24 -0
- mindquantum/io/beauty_print.py +95 -0
- mindquantum/io/display/__init__.py +25 -0
- mindquantum/io/display/_config.py +381 -0
- mindquantum/io/display/bloch_plt_drawer.py +585 -0
- mindquantum/io/display/circuit_svg_drawer.py +1399 -0
- mindquantum/io/display/circuit_text_drawer.py +431 -0
- mindquantum/io/display/circuit_text_drawer_helper.py +1084 -0
- mindquantum/io/display/measure_res_drawer.py +71 -0
- mindquantum/io/display/measure_res_svg_drawer.py +214 -0
- mindquantum/io/display/topology_drawer.py +199 -0
- mindquantum/io/qasm/__init__.py +24 -0
- mindquantum/io/qasm/hiqasm.py +497 -0
- mindquantum/io/qasm/openqasm.py +725 -0
- mindquantum/io/qasm/qcis.py +398 -0
- mindquantum/lib/ascend/libmq_ascend_kernels_dav-2201.so +0 -0
- mindquantum/lib/ascend/libmq_ascend_kernels_dav-3510.so +0 -0
- mindquantum/lib/ascend/libqaia_sb_npu_kernels_dav-2201.so +0 -0
- mindquantum/lib/ascend/libqaia_sb_npu_kernels_dav-3510.so +0 -0
- mindquantum/lib/mindquantum/libmq_base.a +0 -0
- mindquantum/lib/mindquantum/libmq_math.a +0 -0
- mindquantum/lib/mindquantum/libmqchem_cpu.a +0 -0
- mindquantum/lib/mindquantum/libmqsim_circuit_tiling.a +0 -0
- mindquantum/lib/mindquantum/libmqsim_common.a +0 -0
- mindquantum/lib/mindquantum/libmqsim_densitymatrix_cpu.a +0 -0
- mindquantum/lib/mindquantum/libmqsim_stabilizer.a +0 -0
- mindquantum/lib/mindquantum/libmqsim_vector_cpu.a +0 -0
- mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a364ffc655c5dee0e11322faeb5268de/cmake.lock +0 -0
- mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a364ffc655c5dee0e11322faeb5268de/include/fmt/args.h +235 -0
- mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a364ffc655c5dee0e11322faeb5268de/include/fmt/chrono.h +2240 -0
- mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a364ffc655c5dee0e11322faeb5268de/include/fmt/color.h +643 -0
- mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a364ffc655c5dee0e11322faeb5268de/include/fmt/compile.h +535 -0
- mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a364ffc655c5dee0e11322faeb5268de/include/fmt/core.h +2969 -0
- mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a364ffc655c5dee0e11322faeb5268de/include/fmt/format-inl.h +1678 -0
- mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a364ffc655c5dee0e11322faeb5268de/include/fmt/format.h +4535 -0
- mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a364ffc655c5dee0e11322faeb5268de/include/fmt/os.h +455 -0
- mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a364ffc655c5dee0e11322faeb5268de/include/fmt/ostream.h +245 -0
- mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a364ffc655c5dee0e11322faeb5268de/include/fmt/printf.h +675 -0
- mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a364ffc655c5dee0e11322faeb5268de/include/fmt/ranges.h +738 -0
- mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a364ffc655c5dee0e11322faeb5268de/include/fmt/std.h +537 -0
- mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a364ffc655c5dee0e11322faeb5268de/include/fmt/xchar.h +259 -0
- mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a364ffc655c5dee0e11322faeb5268de/lib/cmake/fmt/fmt-config-version.cmake +48 -0
- mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a364ffc655c5dee0e11322faeb5268de/lib/cmake/fmt/fmt-config.cmake +31 -0
- mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a364ffc655c5dee0e11322faeb5268de/lib/cmake/fmt/fmt-targets-release.cmake +19 -0
- mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a364ffc655c5dee0e11322faeb5268de/lib/cmake/fmt/fmt-targets.cmake +108 -0
- mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a364ffc655c5dee0e11322faeb5268de/lib/libfmt.a +0 -0
- mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a364ffc655c5dee0e11322faeb5268de/lib/pkgconfig/fmt.pc +11 -0
- mindquantum/lib/mindquantum/third_party/fmt_10.2.1_a364ffc655c5dee0e11322faeb5268de/options.txt +3 -0
- mindquantum/mqbackend.cpython-312-aarch64-linux-gnu.so +0 -0
- mindquantum/share/mindquantum/cmake/Modules/CheckCUDASourceCompiles.cmake +24 -0
- mindquantum/share/mindquantum/cmake/Modules/CheckCompilerFlag.cmake +89 -0
- mindquantum/share/mindquantum/cmake/Modules/CheckLanguage.cmake +122 -0
- mindquantum/share/mindquantum/cmake/Modules/CheckLinkerFlag.cmake +86 -0
- mindquantum/share/mindquantum/cmake/Modules/CheckSourceCompilesLocal.cmake +149 -0
- mindquantum/share/mindquantum/cmake/Modules/FindEigen3.cmake +250 -0
- mindquantum/share/mindquantum/cmake/Modules/FindOpenBLAS.cmake +188 -0
- mindquantum/share/mindquantum/cmake/Modules/FindSphinx.cmake +74 -0
- mindquantum/share/mindquantum/cmake/Modules/FindTBB.cmake +361 -0
- mindquantum/share/mindquantum/cmake/Modules/FindTemplate.cmake +1658 -0
- mindquantum/share/mindquantum/cmake/Modules/Findabsl.cmake +310 -0
- mindquantum/share/mindquantum/cmake/Modules/Findcereal.cmake +278 -0
- mindquantum/share/mindquantum/cmake/Modules/Findfmt.cmake +293 -0
- mindquantum/share/mindquantum/cmake/Modules/Findgmp.cmake +237 -0
- mindquantum/share/mindquantum/cmake/Modules/Findnlohmann_json.cmake +248 -0
- mindquantum/share/mindquantum/cmake/Modules/Findpybind11.cmake +295 -0
- mindquantum/share/mindquantum/cmake/Modules/Findtweedledum.cmake +242 -0
- mindquantum/share/mindquantum/cmake/Modules/NVCXX/CMakeDetermineNVCXXCompiler.cmake +127 -0
- mindquantum/share/mindquantum/cmake/Modules/NVCXX/CMakeNVCXXCompiler.cmake.in +76 -0
- mindquantum/share/mindquantum/cmake/Modules/NVCXX/CMakeNVCXXCompilerABI.nvcpp +57 -0
- mindquantum/share/mindquantum/cmake/Modules/NVCXX/CMakeNVCXXCompilerId.cpp.in +104 -0
- mindquantum/share/mindquantum/cmake/Modules/NVCXX/CMakeNVCXXInformation.cmake +266 -0
- mindquantum/share/mindquantum/cmake/Modules/NVCXX/CMakeTestNVCXXCompiler.cmake +94 -0
- mindquantum/share/mindquantum/cmake/Modules/NVCXX/NVHPC-NVCXX.cmake +53 -0
- mindquantum/share/mindquantum/cmake/Modules/_find_utils_begin.cmake +34 -0
- mindquantum/share/mindquantum/cmake/Modules/_find_utils_end.cmake +29 -0
- mindquantum/share/mindquantum/cmake/Modules/absl/20220623.cmake +583 -0
- mindquantum/share/mindquantum/cmake/Modules/apple/FindOpenMP.cmake +729 -0
- mindquantum/share/mindquantum/cmake/Modules/try_compile/CMakeLists.txt.in +64 -0
- mindquantum/share/mindquantum/cmake/commands/_protect_arguments.cmake +15 -0
- mindquantum/share/mindquantum/cmake/commands/debug_print.cmake +38 -0
- mindquantum/share/mindquantum/cmake/commands/find_python_module.cmake +113 -0
- mindquantum/share/mindquantum/cmake/commands/is_language_enabled.cmake +35 -0
- mindquantum/share/mindquantum/cmake/commands/mq_config_macros.cmake +62 -0
- mindquantum/share/mindquantum/cmake/commands/mq_link_libraries.cmake +50 -0
- mindquantum/share/mindquantum/cmake/commands/nvhpc_helpers.cmake +103 -0
- mindquantum/share/mindquantum/cmake/commands/target_cuda_architectures.cmake +131 -0
- mindquantum/share/mindquantum/cmake/commands/to_cmake_path.cmake +34 -0
- mindquantum/share/mindquantum/cmake/mindquantumConfig.cmake +105 -0
- mindquantum/share/mindquantum/cmake/mindquantumConfigVersion.cmake +70 -0
- mindquantum/share/mindquantum/cmake/mindquantumTargets-release.cmake +98 -0
- mindquantum/share/mindquantum/cmake/mindquantumTargets.cmake +243 -0
- mindquantum/share/mindquantum/cmake/mindquantumTargetsExternal.cmake +54 -0
- mindquantum/share/mindquantum/cmake/packages.cmake +266 -0
- mindquantum/simulator/__init__.py +37 -0
- mindquantum/simulator/available_simulator.py +174 -0
- mindquantum/simulator/backend_base.py +144 -0
- mindquantum/simulator/mq_blas.py +49 -0
- mindquantum/simulator/mqchem/__init__.py +38 -0
- mindquantum/simulator/mqchem/ci_hamiltonian.py +83 -0
- mindquantum/simulator/mqchem/mqchem_simulator.py +394 -0
- mindquantum/simulator/mqchem/sequential_ucc_ansatz.py +163 -0
- mindquantum/simulator/mqchem/ucc_excitation_gate.py +127 -0
- mindquantum/simulator/mqchem/vqe_preparation.py +103 -0
- mindquantum/simulator/mqsim.py +691 -0
- mindquantum/simulator/mqvector_npu.py +829 -0
- mindquantum/simulator/noise.py +165 -0
- mindquantum/simulator/simulator.py +853 -0
- mindquantum/simulator/stabilizer.py +266 -0
- mindquantum/simulator/utils.py +76 -0
- mindquantum/third_party/__init__.py +18 -0
- mindquantum/third_party/interaction_operator.py +117 -0
- mindquantum/third_party/unitary_cc.py +234 -0
- mindquantum/utils/__init__.py +44 -0
- mindquantum/utils/error.py +44 -0
- mindquantum/utils/f.py +475 -0
- mindquantum/utils/fdopen.py +45 -0
- mindquantum/utils/progress.py +139 -0
- mindquantum/utils/quantifiers.py +36 -0
- mindquantum/utils/show_info.py +69 -0
- mindquantum/utils/string_utils.py +192 -0
- mindquantum/utils/type_value_check.py +222 -0
- mindquantum-0.13.0.dist-info/METADATA +346 -0
- mindquantum-0.13.0.dist-info/RECORD +417 -0
- mindquantum-0.13.0.dist-info/WHEEL +5 -0
- mindquantum-0.13.0.dist-info/entry_points.txt +2 -0
- mindquantum-0.13.0.dist-info/licenses/LICENSE +201 -0
- mindquantum-0.13.0.dist-info/licenses/NOTICE +2 -0
- mindquantum-0.13.0.dist-info/top_level.txt +2 -0
- mindquantum.libs/libgfortran-daac5196-038a5e3c.so.5.0.0 +0 -0
- mindquantum.libs/libgomp-725e7fb8.so.1.0.0 +0 -0
- mindquantum.libs/libscipy_openblas-63a932aa.so +0 -0
- mindquantum_config/__init__.py +212 -0
- mindquantum_config/__main__.py +23 -0
mindquantum/__init__.py
ADDED
|
@@ -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
|
+
"Note: MindSpore not installed, 'mindquantum.framework' module "
|
|
82
|
+
"(for hybrid quantum-classical neural network) is disabled."
|
|
83
|
+
)
|
|
84
|
+
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
mindquantum/__main__.py
ADDED
|
@@ -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,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"python_targets": ["_qaia_sb_ascend", "mqbackend", "_mq_vector", "_mq_vector_npu", "_mq_mps", "_mq_matrix", "_mq_stabilizer", "_mq_chem", "_math"],
|
|
3
|
+
"runtime_files": ["lib/ascend/libmq_ascend_kernels_dav-2201.so", "lib/ascend/libqaia_sb_npu_kernels_dav-2201.so", "lib/ascend/libmq_ascend_kernels_dav-3510.so", "lib/ascend/libqaia_sb_npu_kernels_dav-3510.so"],
|
|
4
|
+
"ascend": {"architectures": ["dav-2201", "dav-3510"]}
|
|
5
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -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()
|