Paddle Quantum 2.2.1
Release Note
New Features
paddle_quantum.ansatz:- New member
depth: return the depth of the circuit. - New member function
transfer_static: make the circuit not trainable. - New member function
collapse: addCollapseoperator into the circuit.
- New member
paddle_quantum.gate:- New base gate
ParamGate: base class for all parameterized gates, responsible for functions designed for parameterized gates. - New member
gate_nameand member functiongate_history_generation: by simply defininggate_nameor overloadinggate_history_generation, nowCircuit.gate_historycan read the gate history of your self-designed Gates. - New Gate
QAOALayerWeighted: QAOA driving layers with weights.
- New base gate
paddle_quantum.operator:- New operator
Collapse: support (partially) collapse for quantum states.
- New operator
paddle_quantum.qsvt: new module, providing tools for Chebyshev-based QSP & QSVT.- New class
ScalarQSP: class for circuit and matrix generation in single-qubit QSP. - New class
QSVT: class for circuit and matrix generation in QSVT.
- New class
paddle_quantum.state:- In
state_vectorbackend, classStatenow can call its member propertiesState.ketandState.bracorresponding to ket and bra representations of the state.
- In
paddle_quantum.qinfo:- Now support inputs for both
paddle.TensorandState. - New function
tensor_product:Stateversion ofNkron. partial_tracenow support thestate_vectorbackend.
- Now support inputs for both
New Convention for Parameterized Gates
If the dtype of input param of ParamGate is
None, thenParamGatewill create its own (random) parameter.ParamBase(generated bypaddle.create_parameter), thenParamGatewill treatparamas its own parameter.paddle.Tensorbut notParamBase, thenParamGatewill treatparamas a fixed input, even whenparamis trainable (i.e. whenparam.stop_gradientisFalse).floatorIterable[float], thenParamGatewill treatparamas a fixed input.
New Tutorial
Quantum Simulation
- Add the tutorial Quantum Signal Processing and Quantum Singular Value Transformation, which presents a brief but systematic illustration of QSP and QSVT.
Machine Learning
- Add the tutorial Data Encoding Analysis, which analyzes the effect of the width and depth of data encoding circuits on quantum states from the view of quantum information.
- Add the tutorial Quantum Neural Network Approximating Functions, which demonstrates how to use single-qubit QNNs to approximate any (scalable) square-integrable functions.
Bug Fixes
- Fix bug in the
vansmodule. - Fix some typo and mistakes in the tutorials and api docs.
- Fix bug which cannot set the quleaf token rightly.
- Fix bug when the circuit has no trainable parameters in the
quleafbackend. - Fix bug in the
CSWAPclass and theToffoliclass.
Dependencies
paddlepaddle:2.2.0to2.3.0.scipy: no less than1.8.1.protobuf: no greater than3.20.1.