MindQuantum 0.6.0
MindQuantum 0.6.0 Release Notes
Major Features and Improvements
Better iteration supported for QubitOperator
and FermionOperator
The following example will be demonstrated with QubitOperator
- Iter multiple terms
QubitOperator
>>> from mindquantum.core.operators import QubitOperator
>>> ops = QubitOperator('X0 Y1', 1) + QubitOperator('Z2 X3', {'a': 3})
>>> for idx, o in enumerate(ops):
>>> print(f'Term {idx}: {o}')
You will get each term of this operator,
Term 0: 1 [X0 Y1]
Term 1: 3*a [Z2 X3]
- Iter single term
QubitOperator
>>> ops = QubitOperator('X0 Y1', 2)
>>> for idx, o in enumerate(ops.singlet()):
>>> print(f'Word {idx}: {o}')
You will get each word of this operator with coefficient set to identity,
Word 0: 1 [X0]
Word 1: 1 [Y1]
More built-in circuit supported
Richer circuit operation supported
For origin circuit,
>>> from mindquantum.core.circuit import Circuit
>>> circuit = Circuit().z(0).rx('a', 1, 0).y(1)
q0: ──Z──────●─────────
│
q1: ───────RX(a)────Y──
shift
operator will shift the qubit index.
from mindquantum.core.circuit import shift
>>> shift(circuit, 2)
q2: ──Z──────●─────────
│
q3: ───────RX(a)────Y──
- Reverse circuit qubits, the circuit will be flipped upside down.
>>> circuit.reverse_qubits()
q0: ───────RX(a)────Y──
│
q1: ──Z──────●─────────
Feature enhancement
SVG supported
The quantum circuit build by mindquantum now can be showd by SVG in jupyter notebook, just call svg()
of any Circuit
.
>>> from mindquantum import *
>>> circuit = (qft(range(3)) + BarrierGate(True)).measure_all()
>>> circuit.svg()
Noise simulator supported
In This version, we can simulate a quantum circuit in noise simulator just by adding different noise channels. The following are supported channels:
Contributors
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!
MindQuantum 0.5.0 Release Notes
Major Features and Improvements
API Change
Backwards Incompatible Change
We 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
.
Removed
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 feature
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
Refactoring
For improving MindQuantum's package structure, we did some refactoring on MindQuantum.
old | new |
mindquantum.gate.Hamiltonian
|
mindquantum.core.operators.Hamiltonian
|
mindquantum.gate.Projector
|
mindquantum.core.operators.Projector
|
mindquantum.circuit.qft
|
mindquantum.algorithm.library.qft
|
mindquantum.circuit.generate_uccsd
|
mindquantum.algorithm.nisq.chem.generate_uccsd
|
mindquantum.circuit.TimeEvolution
|
mindquantum.core.operators.TimeEvolution
|
mindquantum.utils.count_qubits
|
mindquantum.core.operators.count_qubits
|
mindquantum.utils.commutator
|
mindquantum.core.operators.commutator
|
mindquantum.utils.normal_ordered
|
mindquantum.core.operators.normal_ordered
|
mindquantum.utils.get_fermion_operator
|
mindquantum.core.operators.get_fermion_operator
|
mindquantum.utils.number_operator
|
mindquantum.core.operators.number_operator
|
mindquantum.utils.hermitian_conjugated
|
mindquantum.core.operators.hermitian_conjugated
|
mindquantum.utils.up_index
|
mindquantum.core.operators.up_index
|
mindquantum.utils.down_index
|
mindquantum.core.operators.down_index
|
mindquantum.utils.sz_operator
|
mindquantum.core.operators.sz_operator
|
mindquantum.ansatz.Ansatz
|
mindquantum.algorithm.nisq.Ansatz
|
mindquantum.ansatz.MaxCutAnsatz
|
mindquantum.algorithm.nisq.qaoa.MaxCutAnsatz
|
mindquantum.ansatz.Max2SATAnsatz
|
mindquantum.algorithm.nisq.qaoa.Max2SATAnsatz
|
mindquantum.ansatz.HardwareEfficientAnsatz
|
mindquantum.algorithm.nisq.chem.HardwareEfficientAnsatz
|
mindquantum.ansatz.QubitUCCAnsatz
|
mindquantum.algorithm.nisq.chem.QubitUCCAnsatz
|
mindquantum.ansatz.UCCAnsatz
|
mindquantum.algorithm.nisq.chem.UCCAnsatz
|
mindquantum.hiqfermion.Transform
|
mindquantum.algorithm.nisq.chem.Transform
|
mindquantum.hiqfermion.get_qubit_hamiltonian
|
mindquantum.algorithm.nisq.chem.get_qubit_hamiltonian
|
mindquantum.hiqfermion.uccsd_singlet_generator
|
mindquantum.algorithm.nisq.chem.uccsd_singlet_generator
|
mindquantum.hiqfermion.uccsd_singlet_get_packed_amplitudes
|
mindquantum.algorithm.nisq.chem.uccsd_singlet_get_packed_amplitudes
|
mindquantum.hiqfermion.uccsd0_singlet_generator
|
mindquantum.algorithm.nisq.chem.uccsd0_singlet_generator
|
mindquantum.hiqfermion.quccsd_generator
|
mindquantum.algorithm.nisq.chem.quccsd_generator
|
mindquantum.utils.bprint
|
mindquantum.io.bprint
|
mindquantum.circuit
|
mindquantum.core.circuit
|
mindquantum.gate
|
mindquantum.core.gates
|
mindquantum.ops
|
mindquantum.core.operators
|
mindquantum.parameterresolver
|
mindquantum.core.parameterresolver
|
| |
Contributors
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!
MindQuantum 0.3.1 Release Notes
Major Features and Improvements
- Three tutorials have been rewritten to make them easier to read
- Circuit information such as qubit number, parameters will update immediately after you add gate
- The UN operator now support parameterized gate
- New ansatz that solving max 2 sat problem now are supported
Contributors
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!
MindQuantum 0.2.0 Release Notes
Major Features and Improvements
- Parameterized FermionOperator and QubitOperator for quantum chemistry
- Different kinds of transformation between FermionOperator and QubitOperator
- UCCSD, QAOA and hardware efficient ansatz supported
- MindQuantumAnsatzOnlyLayer for simulating circuit with ansatz only circuit
- TimeEvolution with first order Trotter decomposition
- High level operations for modifying quantum circuit
Contributors
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!
MindQuantum 0.1.0 Release Notes
Initial release of MindQuantum.
Major Features and Improvements
- Easily build parameterized quantum circuit.
- Effectively simulate quantum circuit.
- Calculating the gradient of parameters of quantum circuit.
- PQC (parameterized quantum circuit) operator that naturally compatible with other operators in mindspore framework.
- Evolution operator that evaluate a quantum circuit and return the quantum state.
- Data parallelization for PQC operator.
Contributors
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.
Contributions of any kind are welcome!