Paddle Quantum 2.0.0
Release Note
The main update is the adaption to PaddlePaddle 2.0 with an improved model efficiency up to 40%.
The version of paddlepaddle should be 2.0.1+.
Since there are many changes in PaddlePaddle 2.0, we need to adapt to it. The detailed change of API can be browsed in API mapping table.
Common PaddlePaddle API Update
- Change
paddle.fluid.Layer
topaddle.nn.Layer
. - Change
paddle.fluid.dygraph.to_variable
topaddle.to_tensor
. - Change
paddle.fluid.initializer.Uniform
topaddle.nn.initializer.Uniform
. - Change
paddle.fluid.optimizer.AdamOptimizer
topaddle.optimizer.Adam
. with fluid.dygraph.gurad():
can be currently removed. PaddlePaddle is run in dynamic graph mode by default.- After back-propagation, it is recommended to use
optimizer.clear_grad()
to clear gradients. - PaddlePaddle now only supports global random seed, which can be set with
paddle.seed(seed_number)
.
The change of complex module
The complex module has been optimized in PaddlePaddle 2.0. The API of the complex module also has been changed.
- The real part:
paddle.real()
- The imaginary part:
paddle.imag()
- The conjugate of complex tensor:
paddle.conj()