Release Notes
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
[STABLE]
MeasureResult.to_json
: for measurement result serialization and storage[STABLE]
MeasureResult.reverse_endian
: reverse bit order in measurement results, enabling flexible endianness handling for quantum state readouts
Operator
[STABLE]
mat_to_op
: Added function to convert matrix toQubitOperator
, supporting both little-endian and big-endian qubit ordering for seamless integration with different quantum computing frameworks.
Circuit
[STABLE] Added
Circuit.from_qcis()
andCircuit.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
andsamples
inMeasureResult
has been unified to little-endian. If your code uses these attributes, please carefully check and use the newly addedreverse_endian
method to adjust if needed.
Bug Fixes
PR2497
: Fixed potential parameter name duplication in Amplitude Encoder.PR2410
: Fixedis_measure_end
error that returnedTrue
even without measurement operations.PR2410
: Fixed incorrect calculation results after reversing qubit order in two-qubit gates.PR2377
: Fixed recursive error inDAGCircuit
when processing deep circuits, now supporting arbitrary depth circuits.PR2345
: Fixed calculation error inmqmatrix
'sget_expectation_with_grad
method when processing batch Hamiltonians and added test cases.PR2345
: Fixed error when usingreverse_qubits
with gates not added in specified order.PR2345
: Fixed error inFermionOperator.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-workingQAOAAnsatz
example.PR2309
: Modified parameter names in ansatz circuits to match formulas.PR2296
: Fixed index error inkron_factor_4x4_to_2x2s()
return values, ensuring correctness of two-qubit gate decomposition functionkak_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!