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
: addCollapse
operator 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_name
and member functiongate_history_generation
: by simply defininggate_name
or overloadinggate_history_generation
, nowCircuit.gate_history
can 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_vector
backend, classState
now can call its member propertiesState.ket
andState.bra
corresponding to ket and bra representations of the state.
- In
paddle_quantum.qinfo
:- Now support inputs for both
paddle.Tensor
andState
. - New function
tensor_product
:State
version ofNkron
. partial_trace
now support thestate_vector
backend.
- Now support inputs for both
New Convention for Parameterized Gates
If the dtype of input param
of ParamGate
is
None
, thenParamGate
will create its own (random) parameter.ParamBase
(generated bypaddle.create_parameter
), thenParamGate
will treatparam
as its own parameter.paddle.Tensor
but notParamBase
, thenParamGate
will treatparam
as a fixed input, even whenparam
is trainable (i.e. whenparam.stop_gradient
isFalse
).float
orIterable[float]
, thenParamGate
will treatparam
as 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
vans
module. - 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
quleaf
backend. - Fix bug in the
CSWAP
class and theToffoli
class.
Dependencies
paddlepaddle
:2.2.0
to2.3.0
.scipy
: no less than1.8.1
.protobuf
: no greater than3.20.1
.