同步操作将从 MindSpore/mindquantum 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Data Precision
: MindQuantum now supports float32
, float64
, complex64
and complex128
four types of precision, and can set different precision types for operators, parameter resolvers and simulators.Quantum Gates
: Added multiple two-qubit Pauli rotation gate, including: Rxx
, Rxy
, Rxz
, Ryy
, Ryz
and Rzz
.Quantum Channel
: Noise channels now support returning kraus operators via the .matrix()
method.QubitOperator
: Added relabel
interface, supports according to new qubit number to rearrange operators. FermionOperator
also supports this function.Ground state calculation
: New interface supports the calculation of the ground state energy of the Hamiltonian containing only the direct product of the Pauli-Z operator and the Pauli-Z operator.Ansatz
: Add 19 ansatz mentioned in Arxiv:1905.10876
, all have been implemented.ChannelAdder
: Add ChannelAdder
module, support customized adding various quantum channels into the quantum circuit to construct a noise model. For more details, please refer to: ChannelAdder
.Density Matrix Simulator
: Add density matrix simulator, named mqmatrix
. Support variational quantum algorithms, noise simulation, etc. Its functionality is basically aligned with the existing mqvector
full-amplitude simulator.parameter shift
: The quantum simulator gradient operator now supports the parameter shift rule algorithm, which is closer to the experiment.Expectation Calculation
: interface is basically aligned with get_expectation_with_grad
, but does not calculate the gradient, saving time.QubitNode
: Added the qubit node object in the qubit topology interface, which supports the configuration of qubit position, color and connectivity.QubitsTopology
: Qubit topology, supports custom topology. Also available with preset structures: linear qubit topology LinearQubits
and grid qubit topology GridQubits
.Bit Mapping
: Added Bit mapping algorithm SABRE
, please refer to Arxiv 1809.02573
.Error Mitigation
: Added zero noise extrapolation algorithm for quantum error mitigation.Circuit folding
: The quantum circuit folding function is added to support the growth of quantum circuits while ensuring the equivalence of quantum circuits.Quantum circuit compilation
: A new quantum circuit compilation module is added, which uses DAG
graphs to compile quantum circuits, and supports quantum compilation algorithms such as gate replacement, gate fusion, and gate decomposition.ansatz_variance
: Added an interface to calculate the variance of the gradient of a certain parameter in the variable quantum circuit, which can be used to verify the barren plateau
phenomenon of the variable quantum circuit.QRamVecLayer
: The QRam quantum encoding layer has been added to support direct encoding of classical data into full-amplitude quantum states. The corresponding operator is QRamVecOps
.OpenQASM
: OpenQASM has added the from_string
interface, which supports converting OpenQASM from string format to quantum circuits in MindQuantum.PR1757
: Fixed the bug of StronglyEntangling
when the depth is greater than 2.PR1700
: Fixed matrix expression of CNOT
gates and logic errors of AmplitudeDampingChannel
.PR1523
: Fix logic errors of PhaseDampingChannel
.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!
FSim
: Fermionic simulation gate supported, and this gate also works in variational quantum algorithm.U3
: The single qubit arbitrary gate U3 now will work as a single gate but not a piece of quantum circuit. U3 gate also works in variational quantum algorithm.Customed parameterized gate
. Customed parameterized gate now will compiled to machine code by jit compiler numba, and the simulator backend can call customed parameterized gate in parallel thread.BarrierGate
: BarrierGate now can be acted on certain qubits.KrausChannel
: Design a customed kraus channel for quantum simulator.svg
: Now you can set the width
to split the svg circuit, so that you can copy it into your paper.mqvector
and mqvector_gpu
are two mindquantum simulate that prepared for cpu and gpu. And projectq
simulator will be deprecated. The new simulator is total compatible with old one, what you only to do is to change the backend name when you initialize the simulator.as_encoder
: Method of Circuit
to mark this circuit as an encoder circuit.as_ansatz
: Method of Circuit
to mark this circuit as an ansatz circuit.encoder_params_name
: Method of Circuit
to return all encoder parameters in the circuit.ansatz_params_name
: Method of Circuit
to return all ansatz parameters in the circuit.remove_noise
: Method of Circuit
to remove all noise channels.with_noise
: Method of Circuit
to add a given noise channel after every non-noise gate.as_encoder
: A decorator to mark the circuit returned by the decorator function as an encoder circuit.as_ansatz
: A decorator to mark the circuit returned by the decorator function as an ansatz circuit.qfi
: A method that can calculate the quantum fisher information of a given parameterized quantum circuit.partial_psi_partial_psi
: A method that can calculate the first part of quantum fisher information.partial_psi_psi
: A method that can calculate the second part of quantum fisher information.AmplitudeDampingChannel
: Amplitude damping channel, caused by the energy dissipation.PhaseDampingChannel
: Phase damping channel express error that qubit loses quantum information without exchanging energy with environment.split
: A method of FermionOperator
and QubitOperator
that can split the coefficient with the operator.astype
: Convert the ParameterResolver to a given type.const
: Get the constant part of this ParameterResolver.is_const
: Check whether this ParameterResolver is constant.encoder_part
: Set a part of parameters to be encoder parameters.ansatz_part
: Set a part of parameters to be ansatz parameters.as_encoder
: Set all parameters to encoder parameters.as_ansatz
: Set all parameters to ansatz parameters.encoder_parameters
: Return all encoder parameters.ansatz_parameters
: Return all ansatz parameters.is_hermitian
: Check whether this ParameterResolver is hermitian conjugate.is_anti_hermitian
: Check whether this ParameterResolver is anti hermitian conjugate.no_grad_parameters
: Return all parameters that do no require gradient.requires_grad_parameters
: Return all parameters that require gradient.copy
: The simulator now supports replication.apply_gate
: In this version, you can apply a gate in differential version.inner_product
: Calculate the inner product of two states in two given simulators.BlochScene
: We support the establishment of a Bloch sphere mapping scene, which can draw quantum states on it, and can also dynamically demonstrate the change of quantum states.Thanks goes to these wonderful people:
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.
Contributions of any kind are welcome!
QubitOperator
and FermionOperator
singlet
shift
: translation qubit
reverse_qubits
: flip circuit bit
MaxCutAnsatz
: get_partition, get the max-cut cutting solutionMaxCutAnsatz
: get_cut_value, get the number of cuts for a cutting solutionCircuit
: is_measure_end, determine whether the quantum circuit is the end of the measurement gatesvg()
of any quantum circuits.MindQuantum adds the following quantum channels for quantum noise simulation
PauliChannel
: Pauli channelBitFlipChannel
: bit-flip channelPhaseFlipChannel
: phase-flip channelBitPhaseFlipChannel
: bit-phase flip channelDepolarizingChannel
: depolarized channelWe unified the abbreviations of some nouns in MindQuantum.
isparameter
property of gate changes to parameterized
0.3.1 | 0.5.0 |
>>> from mindquantum import RX
>>> gate = RX('a').on(0)
>>> gate.isparameter
True
|
>>> from mindquantum import RX
>>> gate = RX('a').on(0)
>>> gate.parameterized
True
|
para_name
of a quantum circuit changes to params_name
0.3.1 | 0.5.0 |
>>> from mindquantum import Circuit
>>> circ = Circuit().rx('a', 0)
>>> circ.para_name
['a']
|
>>> from mindquantum import Circuit
>>> circ = Circuit().rx('a', 0)
>>> circ.params_name
['a']
|
The quantum neural network API was redesigned in this version. From now on, we can easily build a hybrid quantum neural network with the help of Simulator
in PYNATIVE_MODE
.
The following API was removed.
generate_pqc_operator
PQC
MindQuantumLayer
generate_evolution_operator
Evolution
MindQuantumAnsatzOnlyLayer
MindQuantumAnsatzOnlyOperator
The new API was shown as below.
MQOps
MQN2Ops
MQAnsatzOnlyOps
MQN2AnsatzOnlyOps
MQEncoderOnlyOps
MQN2EncoderOnlyOps
MQLayer
MQN2Layer
MQAnsatzOnlyLayer
MQN2AnsatzOnlyLayer
The above modules are placed in mindquantum.framework
.
Due to the duplication of functions, we deleted some APIs.
mindquantum.circuit.StateEvolution
The following APIs have been remoted.
mindquantum.core.operators.Hamiltonian.mindspore_data
mindquantum.core.operators.Projector.mindspore_data
mindquantum.core.circuit.Circuit.mindspore_data
mindquantum.core.parameterresolver.ParameterResolver.mindspore_data
New gates are shown as below.
mindquantum.core.gates.SGate
mindquantum.core.gates.TGate
Measurement on certain qubits are now supported. The related APIs are shown as below.
mindquantum.core.gates.Measure
mindquantum.core.gates.MeasureResult
QASM is now supported.
mindquantum.io.OpenQASM
mindquantum.io.random_hiqasm
mindquantum.io.HiQASM
Simulator is now separated from MindSpore backend. Now you can easily to use a simulator.
mindquantum.simulator.Simulator
For improving MindQuantum's package structure, we did some refactoring on MindQuantum.
old | new |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Thanks goes to these wonderful people:
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.
Contributions of any kind are welcome!
Thanks goes to these wonderful people:
yufan, wengwenkang, xuxusheng, wangzidong, yangkang, lujiale, fanyi, zhangwengang, wangkaisheng, zhoufeng, wangsiyuan, gongxiaoqing, chengxianbin, sunxiyin, wenwenkang, lvdingshun, cuijiangyu, chendiqing, zhangkai, Damien Ngyuen, Zotov Yuriy, liqin, zengjinglin, cuixiaopeng.
Contributions of any kind are welcome!
Thanks goes to these wonderful people:
yufan, wengwenkang, xuxusheng, wangzidong, yangkang, lujiale, fanyi, zhangwengang, wangkaisheng, zhoufeng, wangsiyuan, gongxiaoqing, chengxianbin, sunxiyin, wenwenkang, lvdingshun, cuijiangyu, chendiqing, zhangkai, Damien Ngyuen, Zotov Yuriy, liqin, zengjinglin, cuixiaopeng.
Contributions of any kind are welcome!
Initial release of MindQuantum.
Thanks goes to these wonderful people:
yufan, wengwenkang, xuxusheng, wangzidong, yangkang, lujiale, wangkaisheng, zhoufeng, wangsiyuan, gongxiaoqing, chengxianbin, sunxiyin, wenwenkang, lvdingshun, cuijiangyu, chendiqing, zhangkai, Damien Ngyuen, Zotov Yuriy, liqin, zengjinglin, cuixiaopeng. MindQuantum adds the following quantum channels for quantum noise simulation
Contributions of any kind are welcome!
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。