MindQuantum Release Notes#

MindQuantum 0.11.0 Release Notes#

Major Features and Enhancements#

Simulator#

  • [STABLE] mqchem: Introduced the mqchem simulator backend. Based on the Configuration Interaction (CI) method, this simulator operates within a subspace of a fixed electron count, offering a more memory and computationally efficient solution for quantum chemistry problems. Its core components include (!2717):

    • MQChemSimulator: A simulator for the CI space, initialized to the Hartree-Fock state by default.

    • UCCExcitationGate: A dedicated excitation gate for constructing UCC ansatz.

    • CIHamiltonian: A Hamiltonian wrapper for efficient expectation value calculations in the CI space.

    • prepare_uccsd_vqe: A high-level function to automate the preparation process for UCCSD-VQE experiments.

  • [STABLE] mqvector_cq: Added the mqvector_cq simulator backend, which leverages the NVIDIA cuQuantum SDK to further accelerate quantum circuit simulations on NVIDIA GPUs (!2724). This backend depends on cuQuantum, which must be properly installed in your environment. For details, please refer to the official cuQuantum installation guide.

Algorithm#

  • [STABLE] QAIA Algorithm Backend Extension: Added PyTorch-based GPU and NPU backend support for the Quantum Annealing Inspired Algorithm (QAIA) family (including ASB, BSB, DSB, LQA, CAC, CFC, SFC, NMFA, and SimCIM). This significantly boosts computational performance on the respective hardware. Users can now select 'gpu-float32' or 'npu-float32' via the backend parameter (!2669, !2678).

Bug Fixes#

  • PR2727: Fixed an issue where the SVG export for circuit diagrams only displayed a single control qubit for multi-controlled CNOT gates.

  • PR2717: Fixed an indexing error for double-excitation amplitudes in uccsd_singlet_get_packed_amplitudes, ensuring the correctness of amplitudes extracted from CCSD calculations.

  • PR2716: Fixed a crash in the SABRE and MQSABRE mapping algorithms when processing non-consecutive physical qubit IDs (e.g., [12, 13, 15]).

  • PR2713: Fixed an issue with TimeEvolution when handling Hamiltonians containing a constant term (identity operator), which is now correctly converted to a global phase gate.

  • PR2679: Fixed an incorrect J_norm calculation in the NMFA algorithm when an external field h is included.

  • PR2714: Fixed a potential linker error in the Windows CI environment when Python is installed in a path containing spaces.

  • PR2650: Fixed a potential division-by-zero error in the Rn gate under certain conditions.

  • PR2648: Fixed the improper handling of barrier gates in the sabre mapping algorithm.

Other Updates#

  • QAIA Algorithm:

    • Enhanced input parameter validation to ensure the coupling matrix J is symmetric with a zero diagonal, providing clearer guidance to users (!2710).

    • Optimized the LQA algorithm by caching intermediate results to reduce redundant computations (!2656).

    • Improved error messages for numerical instability in certain algorithms to be more instructive (!2710).

  • Dependencies: Updated dependencies: scipy>=1.13.1 is now required.

  • Added warnings for the presence of complex numbers in ParameterResolver and for the use of int8 precision with the SB simulator (!2651).

Contributor#

Thanks to the following developers for their contributions:

beastsenior, dsdsdshe, GhostArtyom, liushiwei2024, lyq, MangroveCoder, YangleiSHAO, zengqg, ZhuangJP, 葛宇非, 满成, 肖阳, 左博伟.

Welcome contributions to the project in any form!

MindQuantum 0.10.0 Release Notes#

Major Features and Improvements#

Algorithm#

  • [BETA] virtual_distillation: Added error mitigation algorithm based on virtual distillation, which reduces quantum noise by creating virtual copies of quantum states and performing measurements on an entangled system.

  • [BETA] QuantumNeuron: Added quantum neuron implementation based on Repeat-Until-Success (RUS) strategy, which simulates classical neuron behavior through quantum circuits by applying non-linear function rotations.

  • [STABLE] SGAnsatz: Added sequentially generated variational quantum circuit that can efficiently generate matrix product states with fixed bond dimension. The ansatz naturally adapts to one-dimensional quantum many-body problems by applying parameterized quantum circuit blocks to adjacent qubits.

  • [STABLE] SGAnsatz2D: Added two-dimensional sequentially generated variational quantum circuit that can generate string-bond states. Supports automatic generation of traversal paths by specifying 2D grid dimensions or construction of specific types of string-bond states through custom line sets.

  • [STABLE] qjpeg: Added quantum image compression algorithm based on quantum Fourier transform, which can compress quantum images by reducing the number of qubits while preserving key information in the frequency domain.

  • [STABLE] cnry_decompose: Added decomposition for CnRY gate.

  • [STABLE] cnrz_decompose: Added decomposition for CnRZ gate.

  • [STABLE] BSB: Added GPU acceleration support for Ballistic Simulated Bifurcation algorithm with the three precision options: 'cpu-float32', 'gpu-float16', 'gpu-int8'.

  • [STABLE] DSB: Added GPU acceleration support for Discrete Simulated Bifurcation algorithm with the three precision options: 'cpu-float32', 'gpu-float16', 'gpu-int8'.

  • [STABLE] qudit_symmetric_encoding: Added qudit encoding functionality that maps d-level quantum states to qubit states through symmetric encoding, enabling efficient simulation of higher-dimensional quantum systems on standard qubit-based quantum computers.

  • [STABLE] qudit_symmetric_decoding: This feature introduces the ability to decode qubit symmetric states or matrices into qudit states or matrices, thereby enhancing the support for multi-level quantum systems. The decoding process involves transforming symmetric qubit states into corresponding qudit states, which facilitates efficient simulation of higher-dimensional quantum systems on standard qubit-based quantum computers.

  • [STABLE] qutrit_symmetric_ansatz: Introduced a qutrit symmetric ansatz that constructs a qubit ansatz preserving the symmetry of encoding for arbitrary qutrit gates. This feature allows for efficient simulation of higher-dimensional quantum systems on standard qubit-based quantum computers by leveraging symmetry-preserving transformations. The ansatz supports decomposition into "zyz" or "u3" basis and can optionally include a global phase.

Measure#

Operator#

  • [STABLE] mat_to_op: Added function to convert matrix to QubitOperator, supporting both little-endian and big-endian qubit ordering for seamless integration with different quantum computing frameworks.

Circuit#

  • [STABLE] Added Circuit.from_qcis() and Circuit.to_qcis() functions for QCIS format conversion

  • [STABLE] Added __eq__ and __ne__ methods for circuit comparison

  • [STABLE] Circuit.depth(): Added function to calculate quantum circuit depth with options to include single-qubit gates and align gates to barriers.

Simulator#

  • [STABLE] get_reduced_density_matrix: Added functionality to obtain the reduced density matrix of specified qubits by performing partial trace over other qubits.

  • [STABLE] get_qs_of_qubits: Added functionality to obtain the quantum state of specified qubits. Returns state vector for pure states and density matrix for mixed states. Supports returning quantum states in ket (Dirac) notation.

  • [STABLE] When using “stabilizer” as simulator backend, added support for reset to reset quantum states.

  • [STABLE] When using “stabilizer” as simulator backend, added support for get_expectation to calculate the expectation value of a given Hamiltonian in the current quantum state.

Compiler#

  • [STABLE] U3Fusion: Added compilation rule for fusing consecutive single-qubit gates into a single U3 gate. This rule scans the circuit and combines consecutive single-qubit gates acting on the same qubit into a single U3 gate. For standalone single-qubit gates, they are also converted to U3 form. Global phase tracking and inclusion is optional.

  • [STABLE] u3_decompose: Added functionality to decompose U3 gates into Z-X-Z-X-Z rotation sequences. Supports both standard decomposition (U3(θ,φ,λ) = Rz(φ)Rx(-π/2)Rz(θ)Rx(π/2)Rz(λ)) and alternative decomposition (U3(θ,φ,λ) = Rz(φ)Rx(π/2)Rz(π-θ)Rx(π/2)Rz(λ-π)). When any rotation angle is constant and equals zero, the corresponding RZ gate will be omitted.

  • [STABLE] DecomposeU3: Added compilation rule for U3 gate decomposition, breaking down U3 gates into Z-X-Z-X-Z rotation sequences. Supports both standard and alternative decomposition methods.

IO#

  • [STABLE] QCIS: Added quantum circuit and QCIS format conversion class

Utilities#

  • [STABLE] random_hamiltonian: Added random Pauli Hamiltonian generation functionality. Supports specifying the number of qubits and Pauli terms, with optional random seed for reproducibility. Generated Hamiltonians can be used for quantum algorithm testing and benchmarking.

Breaking Changes#

  • [IMPORTANT] The byte order of keys and samples in MeasureResult has been unified to little-endian. If your code uses these attributes, please carefully check and use the newly added reverse_endian method to adjust if needed.

Bug Fixes#

  • PR2497: Fixed potential parameter name duplication in Amplitude Encoder.

  • PR2410: Fixed is_measure_end error that returned True even without measurement operations.

  • PR2410: Fixed incorrect calculation results after reversing qubit order in two-qubit gates.

  • PR2377: Fixed recursive error in DAGCircuit when processing deep circuits, now supporting arbitrary depth circuits.

  • PR2345: Fixed calculation error in mqmatrix’s get_expectation_with_grad method when processing batch Hamiltonians and added test cases.

  • PR2345: Fixed error when using reverse_qubits with gates not added in specified order.

  • PR2345: Fixed error in FermionOperator.hermitian() example code.

  • PR2319: Fixed measurement error in Stabilizer simulator.

  • PR2319: Fixed seed not properly applied in Stabilizer simulator.

  • PR2319: Added verification for bit string correctness in Stabilizer simulator output.

  • PR2315: Made MQSim and Hamiltonian serializable, supporting Python multiprocessing.

  • PR2309: Fixed missing imaginary terms and coefficients in some QAOA ansatzes.

  • PR2309: Fixed non-working QAOAAnsatz example.

  • PR2309: Modified parameter names in ansatz circuits to match formulas.

  • PR2296: Fixed index error in kron_factor_4x4_to_2x2s() return values, ensuring correctness of two-qubit gate decomposition function kak_decompose.

  • PR2285: Removed unnecessary output during gradient computation.

Other Updates#

  • Optimized first-time quantum circuit execution speed for improved performance.

  • Improved precision of params_zyz() function, enhancing ZYZ decomposition accuracy.

  • Removed warning for uninstalled mqvector_gpu, now only prompting when used.

  • Removed warning for uninstalled MindSpore, now only prompting when used.

  • Added warning when Hamiltonian contains imaginary parts, alerting users to potential calculation anomalies.

  • Enhanced clarity of warning messages when MindSpore is not installed.

  • Changed pip source to Tsinghua mirror.

Contributor#

Thanks to the following developers for their contributions:

Arapat Ablimit, Chufan Lyu, GhostArtyom, LuoJianing, Mr1G, Waikikilick, donghufeng, dsdsdshe, xuxusheng, yuhan, zengqg, zhouyuanyang2024, 王上, 杨金元, 糖醋排骨.

Welcome contributions to the project in any form!

MindQuantum 0.9.11 Release Notes#

Major Feature and Improvements#

Gates#

  • [STABLE] Arbitrary axis rotation: New single-qubit gates for arbitrary axis rotation on the Bloch sphereRn

  • [STABLE] matrix: The quantum gate supports retrieving its complete matrix representation by using the interface and specifying the parameter full=True. This matrix representation is influenced by the target qubit and the control qubit, if applicable.

  • [STABLE] Terminal relaxation channel: Add ThermalRelaxationChannel.

  • [Alpha] Quantum measurement: The measurement gate now supports qubit reset functionality, allowing the measured quantum state to be reset to the |0⟩ state or the |1⟩ state. The execution speed of the measurement gate has been optimized for improved performance.

  • [STABLE] RotPauliString: Add arbitrary pauli string rotation gate.

  • [STABLE] GroupedPauli: Add Pauli combination gate. This gate allows for faster execution compared to individually applying single Pauli gates.

  • [STABLE] GroupedPauliChannel: Add Pauli combination channel. This channel allows for faster execution compared to applying Pauli channels individually.

  • [STABLE] SX: Add sqrt X gate.

  • [STABLE] Givens: Add Givens rotation gate.

Circuit#

  • [STABLE] summary: The summary information of the quantum circuit displayed through this interface will be presented in a table format, making it more visually appealing and straightforward.

  • [STABLE] svg: Scaling the svg of quantum circuit by setting scale of this API.

  • [STABLE] openqasm: Directly convert quantum circuit to openqasm or convert openqasm to a mindquantum circuit.

ParameterResolver#

  • [STABLE] PRGenerator: new is able to set temporary prefix of suffix.

Ansatz#

Device#

Simulator#

  • [STABLE] sampling: Improve the sampling speed for quantum circuit without noise and all measurement only at end.

utils#

Algorithm#

  • [Alpha] MQSABRE: A new qubit mapping algorithm that enable to set fidelity of quantum gate.

Bug Fix#

  • PR1971: Fix sign bug in amplitude_encoder.

  • PR2094: Fix the issue of randomness in the get_expectation_with_grad method when using the parameter shift rule.

  • PR2164: Fixed an issue with passing parameters in the build script on Windows systems.

  • PR2171: Fixed a potential null pointer issue with the density matrix simulator when copying quantum states.

  • PR2175: Fixed an issue with negative probabilities for Pauli channels.

  • PR2176: Fixed an issue with the parameter shift rule when dealing with controlled quantum gates.

  • PR2210: Fixed an issue with the parameter shift rule when dealing with multi-parameter gates with some of them are constant.

Contributor#

Thanks to the following developers for their contributions:

yufan, wengwenkang, xuxusheng, Damien Ngyuen, zhouxu, wangzidong, yangkang, lujiale, zhangzhenghai, fanyi, zhangwengang, wangkaisheng, zhoufeng, wangsiyuan, gongxiaoqing, chengxianbin, sunxiyin, wenwenkang, lvdingshun, cuijiangyu, chendiqing, zhangkai, Zotov Yuriy, liqin, zengjinglin, cuixiaopeng, 朱祎康, dorothy20212021, dsdsdshe, buyulin, norl-corxilea, herunhong, Arapat Ablimit, NoE, panshijie, longhanlin.

Welcome contributions to the project in any form!