Skip to content

Paddle Quantum 2.0.0

Compare
Choose a tag to compare
@Quleaf Quleaf released this 15 Mar 05:11
· 71 commits to master since this release

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

  1. Change paddle.fluid.Layer to paddle.nn.Layer.
  2. Change paddle.fluid.dygraph.to_variable to paddle.to_tensor.
  3. Change paddle.fluid.initializer.Uniform to paddle.nn.initializer.Uniform.
  4. Change paddle.fluid.optimizer.AdamOptimizer to paddle.optimizer.Adam.
  5. with fluid.dygraph.gurad(): can be currently removed. PaddlePaddle is run in dynamic graph mode by default.
  6. After back-propagation, it is recommended to use optimizer.clear_grad() to clear gradients.
  7. 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.

  1. The real part: paddle.real()
  2. The imaginary part: paddle.imag()
  3. The conjugate of complex tensor: paddle.conj()