ReleaseBaidu (ERNIE)Baidu (ERNIE)published Sep 6, 2022seen 5d

PaddlePaddle/Quantum v2.2.1

PaddlePaddle/Quantum

Open original ↗

Captured source

source ↗
published Sep 6, 2022seen 5dcaptured 8hhttp 200method plain

Paddle Quantum 2.2.1

Repository: PaddlePaddle/Quantum

Tag: v2.2.1

Published: 2022-09-06T09:30:15Z

Prerelease: no

Release notes:

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: add Collapse operator into the circuit.
  • 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 function gate_history_generation: by simply defining gate_name or overloading gate_history_generation, now Circuit.gate_history can read the gate history of your self-designed Gates.
  • New Gate QAOALayerWeighted: QAOA driving layers with weights.
  • paddle_quantum.operator:
  • New operator Collapse: support (partially) collapse for quantum states.
  • 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.
  • paddle_quantum.state:
  • In state_vector backend, class State now can call its member properties State.ket and State.bra corresponding to ket and bra representations of the state.
  • paddle_quantum.qinfo:
  • Now support inputs for both paddle.Tensor and State.
  • New function tensor_product: State version of Nkron.
  • partial_trace now support the state_vector backend.

New Convention for Parameterized Gates

If the dtype of input param of ParamGate is

  • None, then ParamGate will create its own (random) parameter.
  • ParamBase (generated by paddle.create_parameter), then ParamGate will treat param as its own parameter.
  • paddle.Tensor but not ParamBase, then ParamGate will treat param as a fixed input, even when param is trainable (i.e. when param.stop_gradient is False).
  • float or Iterable[float], then ParamGate will treat param 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 the Toffoli class.

Dependencies

  • paddlepaddle: 2.2.0 to 2.3.0.
  • scipy: no less than 1.8.1.
  • protobuf: no greater than 3.20.1.