Release Notes
MindQuantum 0.13.0 Release Notes
MindQuantum 0.13.0 introduces mqvector_npu, a device-resident state-vector simulator backend for Ascend 910B NPUs, along with the graph-replayed Ascend CANN backend (ascend-float32) for QAIA BSB and DSB; extracts a shared circuit-tiling execution engine (circuit_tiling) with runtime-dispatched Arm SVE vectorization on Linux AArch64; rebuilds the mqmatrix density-matrix simulator on full row-major storage; replaces binary OpenMP thread switching with work-proportional team sizing; and modernizes the build system and Python 3.9–3.12 toolchain.
Major Features and Enhancements
Simulator
[BETA] Device-resident Ascend 910B state-vector backend
mqvector_npu(!3172): Added a single-precision (mindquantum.complex64) full-amplitude state-vector simulator backend for Ascend 910B NPUs.End-to-end device execution: Quantum states reside in NPU HBM, combining Vector-core local circuit tiling with Cube-core strict-FP32 dense operator fusion (disabling
HF32/FP16/BF16precision downgrades). Circuit evolution, Pauli/CSR expectations, checkpoint-free hybrid adjoint gradients, exact multi-frequency parameter-shift rules, pure-state noise trajectories, tree-based sampling, and reduced density-matrix contractions run entirely on device, returning only scalar or target results to the host (~54 ms per adjoint gradient step on 24-qubit 4-layer MaxCut QAOA on Ascend 910B2).Precision and build-from-source requirements: Supports
complex64only, and inputHamiltonianobjects must be single-precision (e.g.,Hamiltonian(op, mq.float32)orham.astype(mq.float32)). Because Ascend C kernels are compiled for a specific target SoC (Ascend910B[1-4]) against a local CANN installation, pre-built release.whlpackages do not includemqvector_npu; users must source their local CANN environment and build from source withENABLE_ASCEND=ONand the matchingMQ_ASCEND_SOC(seedocs/mqvector_npu.md).
[STABLE] Shared circuit-tiling engine (
circuit_tiling) and Arm SVE vectorization (!3146,!3165,!3175):Circuit tiling: Unlike conventional gate fusion (which multiplies consecutive gates into a dense matrix, losing single-gate sparsity and fragmenting on parameterized gates),
mqsim_circuit_tilinggathers a local 8-qubit state tile (256 amplitudes) into L1 cache once, applies multiple gates in place while preserving structured sparsity and folding adjacent diagonal runs, and scatters once. Forward evolution and adjoint gradients share the same tiled execution path, enabled automatically onmqvectorwhenn_qubits >= 13.Cross-tile Arm SVE execution with runtime dispatch: On Linux AArch64, dedicated SVE + FCMA kernels use Gather/Scatter,
FCMLAcomplex multiply-accumulate, and predicate masks to evolve multiple independent state tiles in parallel, with automatic runtime dispatch based on host CPU capabilities. On Kunpeng 920F with NUMA affinity (OMP_PLACES=cores OMP_PROC_BIND=close), 20–28 qubit random circuits and MaxCut QAOA workloads run 3–5× faster than 0.12.0.
[STABLE]
mqmatrixdensity-matrix simulator rebuilt on full storage and circuit tiling (!3165): Treats an \(n\)-qubit row-major density matrix as a state vector over \(2n\) index bits on top ofcircuit_tiling, exploiting Hermitian symmetry at runtime by evolving only the lower block triangle.Noise channels lower directly to superoperators (diagonal channels such as phase damping and dephasing fold into adjacent diagonal gates), noisy and noiseless circuits share one C++ adjoint-differentiation path, and measurement-ending noisy circuits sample from a single exact mixed-state evolution. At 10 qubits,
apply_circuitis 3× faster, gradients are 2× faster, and 1000-shot noisy sampling drops from 278 s to 0.12 s.
[STABLE] Work-proportional OpenMP thread scheduling (
!3168): CPU simulators and operator sparsification now allocate 1 thread per 8,192 amplitudes (capped byOMP_NUM_THREADS), and gradient batches allocate workers withinworkers * team <= MaxThreads, eliminating many-core fork/join slowdowns on small states and speeding up mid-size batches by 1.6×–1.8×.
Algorithm, Examples & AI Skills
[BETA] Graph-replayed Ascend CANN backend (
ascend-float32) for QAIABSBandDSB(!3162): Added a PyTorch-free native Ascend 910B backendbackend='ascend-float32'(with keyword-onlydevice_id=0;'npu-float32'remains the PyTorch/torch_npubackend) forBSBandDSB, along with a standalone QPLIB/Gset benchmark suite on theqaia-cannbranch.Batched Cube GEMM and
aclmdlRIgraph replay: Batches replicas into a single strict-FP32 Cube matrix multiplication (aclnnMatmul,KEEP_DTYPE, neverHF32), fuses the kick-drift-wall update and next-step DSB sign into one Ascend C Vector kernel (sb_kernel.asc), and lazily captures the full iteration schedule into a replayableaclmdlRIexecution graph on the firstupdate()(invalidating and replacing the cached plan via SHA-256 content digests wheneverJ,h,p, or integration parameters are modified). On Ascend 910B2 (100 replicas, 1000 steps), repeated solves across 23 QPLIB binary instances achieve median speedups of 52.1× (DSB) and 37.8× (BSB) over the single-threaded SciPy sparse CPU baseline.Requires building from source: Shares the
-DENABLE_ASCEND=ON -DMQ_ASCEND_SOC=Ascend910B[1-4]build toolchain and runtime guard withmqvector_npu. Pre-built release.whlpackages do not include this backend; users must source their local CANN environment and build from source (seedocs/qaia_ascend.md).
[BETA] QAIA Generalized Ballistic Simulated Bifurcation (
GBSB) (!3159): AddedGBSBundermindquantum.algorithm.qaiawith nonlinear bifurcation control, supporting'cpu-float32','gpu-float32', and'npu-float32'backends.[STABLE] Decoded Quantum Interferometry (DQI) and OTOC examples (
!3128,!3142): Added a complete DQI combinatorial optimization implementation (arXiv:2509.08328) underexample/dqi_mindquantum/, andmqmps-based many-body OTOC light-cone spreading (arXiv:2506.10191) and \(\text{H}_2\) bond-length inversion (arXiv:2510.19550) studies underexample/otoc_simulation/.[STABLE] MindQuantum AI Agent Skills (
!3125,!3126): Added 6 domain skill packages underskills/(covering core APIs, variational training, noisy simulation, QAIA solvers, circuit compilation, and quantum chemistry) for AI coding assistants, installable vianpx skills add https://atomgit.com/mindspore/mindquantum.git.
Bug Fixes
QAIA
LSBandUSBfixes (!3124): Fixed the inverted logarithmic scale exponent (\(2^{-l_x} \to 2^{l_x}\)) andx = 0guard inLSB, and widened defaultxinitialization inUSBfrom[-0.01, 0.01]to[-0.1, 0.1]so uniform quantization does not zero out the driving force (restoring 2.0×–2.7× TTS speedups overDSBon MaxCut benchmarks).QAIA backend conversions, validation, and coupling normalization fixes: Accepted dense
numpy.ndarraycoupling matricesJon GPU/NPU backends; converted external spin inputsxincalc_cut/calc_energyand NPU external fieldhinSBproperly; fixed CPUCAC/CFC/SFCcoupling normalization to use element-wise sparse squaresself.J.power(2).sum(); required explicitxiinSBwhen bothJandhare zero; and enforced per-class_VALID_BACKENDSacrossQAIAsubclasses.Worker thread exception propagation (
!3165): Caught exceptions thrown insideParallelBatchworker threads and rethrew them on the calling thread instead of triggeringstd::terminateand crashing the Python interpreter.mqmatrixderivative gates, Pauli channels, and measurement accuracy (!3165): Fixedapply_gate(..., diff=True)to zero local basis states outside the derivative's support; accumulated Pauli channels as \(\sum_k p_k P_k \rho P_k\) directly to avoid square-rootNaNs from rounding; validated finite positive trace and both branch weights during measurement.OpenQASM
barrierparsing (!3156): FixedOpenQASM().from_string()retaining only the first qubit when parsingbarrierinstructions over multi-qubit registers (e.g.,qreg q[4]; barrier q;).MindSpore device context and documentation fixes (
!3127,!3130,!3166): Replaced deprecatedms.set_context(device_target="CPU")calls withms.set_device("CPU")inmindquantum.framework, and fixed typos and math rendering across API docstrings.
Build System and Project Modernization
Configure-time OpenBLAS verification and
ENABLE_MPSoption (!3174): AddedFindOpenBLAS.cmaketo verify all requiredmqmpssymbols at configure time (preventing macOS from selecting Accelerate and failing at link time) and gatedmqmpsbehind-DENABLE_MPS=ON/OFF.Isolated pybind11 ABI and multi-arch
mqrt(!3137,!3174): EnabledMQ_ISOLATE_PYBIND11_INTERNALSby default to isolate extension symbol tables; enabledmqrtbuilds on both AArch64 and x86_64.Build scripts and toolchain improvements (
!3111,!3153,!3154,!3165): Fixed stale cache errors on consecutivebuild.shruns,--clean-alldirectory resolution, and GCC 13+<cstdint>headers for Catch2; migrated Python linting/formatting to Ruff and aligned local hooks with the CI gate.
Breaking and Behavioral Changes
Python version requirement (
!3111): Supported versions are now Python 3.9–3.12 (dropped Python 3.7 and 3.8).API removal and exception fix (
!3168): RemovedSimulator.set_threads_number()(useOMP_NUM_THREADSinstead); accessing non-existent attributes onmindquantum.frameworknow raisesAttributeErrorinstead ofImportError.mqmatrixstorage, sampling, and validation changes (!3165): Full-matrix storage doubles single-state memory (reducing max qubit count by 1 for a fixed memory budget) and adds 10%–15% overhead on \(\le 6\)-qubit circuits; terminal noisy sampling consumes random draws differently under a fixedseed(distribution unchanged); passingcirc_left/simulator_leftor invalid noise channel parameters now raises an error before execution.Build and CMake option changes (
!3127,!3148,!3169,!3174):Requires CMake \(\ge\) 3.20 and
pybind11 >= 3.1; buildingmqvector_cqnow requires-DENABLE_CUQUANTUM=ON(orbuild.sh --gpu --cuquantum); Linux AArch64 defaults toMQ_ARM_SVE=ON(pass-DMQ_ARM_SVE=OFFif the compiler lacks SVE support);Removed
MQ_BLAS_LIBRARIES,MQ_LAPACK_LIBRARIES, andBLAS_SYMBOL_PREFIXin favor ofOpenBLAS_ROOT,OpenBLAS_LIBRARY, andOpenBLAS_SYMBOL_PREFIX; build scripts install runtime and test dependencies by default and removed--only-pytest(use--no-python-depsto skip).
Contributors
Thanks to the following developers for their contributions:
dsdsdshe, huangzhe-2026, liqingyu_2026, lllrt, mangrovecoder, Tsingpy.
Welcome contributions to the project in any form!