English | 简体中文
Copyright (c) 2021 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
QAPP is a quantum computing toolbox based on the QCompute component of Quantum Leaf, which provides quantum computing services for solving problems in many fields including quantum chemistry, combinatorial optimization, machine learning, etc. QAPP provides users with a one-stop quantum computing application development function, which directly connects to users' real requirements in artificial intelligence, financial technology, education and research.
QAPP architecture follows the complete development logic from application to real machine, including four modules: Application, Algorithm, Circuit, and Optimizer. The Application module converts the user requirements into the corresponding mathematical problem; the Algorithm module selects a suitable quantum algorithm to solve the mathematical problem; during the solution process, the user can specify the optimizer provided in the Optimizer module or design a custom optimizer; the quantum circuit required for the solution process is supported by the Circuit module. The Circuit module directly calls the QCompute platform, and supports calls to the Quantum Leaf simulators or QPUs.
We provide QAPP practical cases such as solving molecular ground state energy, solving combinatorial optimization problem, and solving classification problem. These use cases are designed to help users quickly get started with calling QAPP modules and developing custom algorithms. Before we can run these use cases, there is some preparation work to do.
We use Anaconda as the development environment management tool for Python. Anaconda supports multiple mainstream operating systems (Windows, macOS, and Linux). Here we provide a tutorial on how to use conda to create and manage virtual environments:
-
First, enter the command line (Terminal) interface: Windows users can enter
Anaconda Prompt
; Mac users can use the key combinationcommand⌘ + space
and then enterTerminal
. -
After opening the Terminal window, enter
conda create --name qapp_env python=3.8
to create a Python 3.8 environment named
qapp_env
. With the following command, we can enter the virtual environment created,conda activate qapp_env
For more detailed instructions on conda, please refer to the Official Tutorial.
If you run QAPP with cloud servers, you will consume Quantum-hub credit points. For more Quantum-hub credit points, please contact us via Quantum Hub. First, you should log into Quantum Hub, then enter the "Feedback" page, choose "Get Credit Point", and record the necessary information. Submit your feedback and wait for our reply. We will reach you as soon as possible.
Install QAPP with pip
:
pip install qcompute-qapp
Some use cases may require additional packages, which are clarified in the corresponding tutorials.
Users can download the tutorials
folder from GitHub, switch the path to the tutorials
folder where the case is located in Terminal, and run it in Python. For example,
python vqe_example.py
We provide QAPP's API documentation for developers to look up. Users can also view the API documentation on the Quantum Leaf website.
We encourage the researchers and developers to use QAPP for research & development on quantum computing applications. Please cite us by including the following BibTeX entry:
@misc{QAPP,
title = {{Quantum Application Python Package}},
year = {2022},
url = {https://quantum-hub-test.baidu.com/qapp/},
}
QAPP uses Apache-2.0 license.