RepoBaidu (ERNIE)Baidu (ERNIE)published May 18, 2020seen 5d

PaddlePaddle/Quantum

Jupyter Notebook

Open original ↗

Captured source

source ↗
published May 18, 2020seen 5dcaptured 8hhttp 200method plain

PaddlePaddle/Quantum

Language: Jupyter Notebook

License: NOASSERTION

Stars: 646

Forks: 190

Open issues: 29

Created: 2020-05-18T00:20:52Z

Pushed: 2023-04-24T14:00:48Z

Default branch: master

Fork: no

Archived: no

README: English | [简体中文](README_CN.md)

Paddle Quantum (量桨)

  • [Features](#features)
  • [Install](#install)
  • [Install PaddlePaddle](#install-paddlepaddle)
  • [Install Paddle Quantum](#install-paddle-quantum)
  • [Environment setup for Quantum Chemistry module](#environment_setup_for_quantum_chemistry_module)
  • [Run Example](#run-example)
  • [Introduction and developments](#introduction-and-developments)
  • [Quick start](#quick-start)
  • [Tutorials](#tutorials)
  • [API documentation](#api-documentation)
  • [Feedbacks](#feedbacks)
  • [Research with Paddle Quantum](#research-based-on-paddle-quantum)
  • [Frequently Asked Questions](#frequently-asked-questions)
  • [Copyright and License](#copyright-and-license)
  • [References](#references)

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.

Features

  • Easy-to-use
  • Many online learning resources (Nearly 50 tutorials)
  • High efficiency in building QNN with various QNN templates
  • Automatic differentiation
  • Versatile
  • Multiple optimization tools and GPU mode
  • Simulation with 25+ qubits
  • Flexible noise models
  • Featured Toolkits
  • Toolboxes for Chemistry & Optimization
  • LOCCNet for distributed quantum information processing
  • Self-developed QML algorithms

Install

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 https://github.com/PaddlePaddle/quantum
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
python main.py

> For the introduction of QAOA, please refer to our [QAOA tutorial](./tutorials/combinatorial_optimization/QAOA_EN.ipynb).

Breaking Change

In version 2.2.0 of Paddle Quantum, we have made an incompatible upgrade to the code architecture, and the new version's structure and usage can be found in our tutorials, API documentation, and the source code. Also, we support connecting to a real quantum computer via QuLeaf, using paddle_quantum.set_backend('quleaf') to select QuLeaf as the backend.

Introduction and developments

Quick start

[Paddle Quantum Quick Start Manual](./introduction) 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

Tutorials

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,

  • [Quantum Simulation](./tutorials/quantum_simulation)

1. [Building Molecular Hamiltonian](./tutorials/quantum_simulation/BuildingMolecule_EN.ipynb) 2. [Variational Quantum Eigensolver (VQE)](./tutorials/quantum_simulation/VQE_EN.ipynb) 3. [Subspace Search-Quantum Variational Quantum Eigensolver (SSVQE)](./tutorials/quantum_simulation/SSVQE_EN.ipynb) 4. [Variational Quantum State Diagonalization (VQSD)](./tutorials/quantum_simulation/VQSD_EN.ipynb) 5. [Gibbs State Preparation](./tutorials/quantum_simulation/GibbsState_EN.ipynb) 6. [The Classical Shadow of Unknown Quantum States](./tutorials/quantum_simulation/ClassicalShadow_Intro_EN.ipynb) 7. [Estimation of Quantum State Properties Based on the Classical…

Excerpt shown — open the source for the full document.