Paddle Quantum 量桨

At Baidu Research, Xin Wang's group lead the development of Paddle Quantum, a quantum machine learning toolkit. Paddle Quantum (量桨) is the world's first cloud-integrated quantum machine learning platform based on Baidu PaddlePaddle. It supports the building and training of quantum neural networks, making PaddlePaddle the first deep learning framework in China. Paddle Quantum is feature-rich and easy to use. It provides comprehensive API documentation and tutorials help users get started right away.

Paddle Quantum aims at establishing a bridge between artificial intelligence (AI) and quantum computing (QC). It has been utilized for developing several quantum machine learning applications. With the PaddlePaddle deep learning platform empowering QC, Paddle Quantum provides strong support for scientific research community and developers in the field to easily develop QML applications. Moreover, it provides a learning platform for quantum computing enthusiasts.

The latest 2.4.0 version of Paddle Quantum offers an extensive list of over 50 tutorials in both English and Chinese. It is highly efficient in constructing quantum neural networks and incorporates numerous optimization tools, including a GPU mode for enhanced performance. Additionally, this version includes specialized toolboxes designed for chemistry and optimization, distributed quantum information processing, and a range of self-developed quantum machine learning algorithms, demonstrating its broad applicability and advanced capabilities in the field of quantum computing.

The contribution list of Paddle Quantum is available on this page.

Below contents are from the GitHub page of Paddle Quantum.


Install PaddlePaddle

This dependency will be automatically satisfied when users install Paddle Quantum. Please refer to PaddlePaddle's official installation and configuration page. This project requires PaddlePaddle 2.2.0 to 2.3.0.

Install Paddle Quantum

We recommend the following way of installing Paddle Quantum with pip,

pip install paddle-quantum

or download all the files and finish the installation locally,

git clone
cd quantum
pip install -e .

Environment setup for Quantum Chemistry module

Currently, our qchem module uses PySCF as its backend to compute molecular integrals, so before executing quantum chemistry, we have to install this Python package.

It is recommended that PySCF is installed in a Python environment whose Python version >=3.6.

We highly recommend you to install PySCF via conda. MacOS/Linux user can use the command:

conda install -c pyscf pyscf

NOTE: For Windows user, if your operating system is Windows10, you can install PySCF in Ubuntu subsystem provided by Windows 10's App Store. PySCF can’t run directly in Windows, so we are working hard to develop more quantum chemistry backends. Our support for Windows will be improved in the coming release of Paddle Quantum.

Note: Please refer to PySCF for more download options.

Run example

Now, you can try to run a program to verify whether Paddle Quantum has been installed successfully. Here we take quantum approximate optimization algorithm (QAOA) as an example.

cd paddle_quantum/QAOA/example

For the introduction of QAOA, please refer to our QAOA tutorial.

Quick start

Paddle Quantum Quick Start Manual is probably the best place to get started with Paddle Quantum. Currently, we support online reading and running the Jupyter Notebook locally. The manual includes the following contents:

  • Detailed installation tutorials for Paddle Quantum
  • Introduction to quantum computing and quantum neural networks (QNNs)
  • Introduction to Variational Quantum Algorithms (VQAs)
  • Introduction to Paddle Quantum
  • PaddlePaddle optimizer tutorial
  • Introduction to the quantum chemistry module in Paddle Quantum
  • How to train QNN with GPU


We provide tutorials covering quantum simulation, machine learning, combinatorial optimization, local operations and classical communication (LOCC), and other popular QML research topics. Each tutorial currently supports reading on our website and running Jupyter Notebooks locally. For interested developers, we recommend them to download Jupyter Notebooks and play around with it. Here is the tutorial list,

With the latest LOCCNet module, Paddle Quantum can efficiently simulate distributed quantum information processing tasks. Interested readers can start with this tutorial on LOCCNet. In addition, Paddle Quantum supports QNN training on GPU. For users who want to get into more details, please check out the tutorial Use Paddle Quantum on GPU. Moreover, Paddle Quantum could design robust quantum algorithms under noise. For more information, please see Noise tutorial.

In a recent update, the measurement-based quantum computation (MBQC) module has been added to Paddle Quantum. Unlike the conventional quantum circuit model, MBQC has its unique way of computing. Interested readers are welcomed to read our tutorials on how to use the MBQC module and its use cases.