# MindSpore Quantum Installation
[](https://gitee.com/mindspore/docs/blob/r2.7.0rc1/docs/mindquantum/docs/source_en/mindquantum_install.md)
## Confirming System Environment Information
Before you begin, please confirm that your software and hardware environment meets the following requirements:
- **Python Version**: Please ensure your Python environment is version **3.9, 3.10, or 3.11**. You can check your version with the `python --version` command.
### Version Compatibility
Before installing MindQuantum, you must first install the corresponding version of MindSpore based on the compatibility table below. A version mismatch may cause installation or runtime issues.
| MindQuantum Version | Required MindSpore Version |
| :------------------ | :------------------------------------------- |
| 0.11.0 | MindSpore >= 2.2.0 (2.7.0rc1 is recommended) |
- Please refer to the [MindSpore Installation Guide](https://www.mindspore.cn/install/en) to install the recommended version of MindSpore.
## Installation Methods
You can install MindQuantum either by pip or from source code.
### Installing by pip
#### 1. Installing the Latest Stable Version
You can install the latest stable version of MindQuantum from the official PyPI source.
```bash
pip install mindquantum
```
#### 2. Installing a Specific Version
You can also download a specific version's `whl` package from the MindSpore community and install it manually.
Please select the appropriate `mindquantum-0.11.0` version from the table below based on your system environment.
> - **About the Linux x86_64 package**: This platform provides a unified CPU/GPU version. After installation, if your device has a compatible NVIDIA GPU and a CUDA 11.1 or higher environment, GPU-related features will be available.
**Installation Commands**
You can install directly via URL using pip, or download the whl package and its sha256 checksum file to install locally.
```bash
# Method 1: Install directly from URL (e.g., for Linux x86_64, Python 3.9)
pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/2.7.0rc1/MindQuantum/gpu/x86_64/cuda-11.1/mindquantum-0.11.0-cp39-cp39-linux_x86_64.whl
```
**Installation and Verification from Local Download**
1. **Download Files**: Download the `whl` package and its corresponding `.whl.sha256` checksum file from the table above.
2. **Verify the Hash** (optional)
First, compute the hash value of your downloaded `whl` file (replace `your_downloaded_file.whl` with your actual filename):
```bash
sha256sum your_downloaded_file.whl
```
Next, display the official hash value recorded in the `.sha256` file:
```bash
cat your_downloaded_file.whl.sha256
```
**Manually compare** the hash strings from the two outputs. If they are identical, the file is correct.
> **Note:** Please be aware that the filename recorded in the `.whl.sha256` file may not exactly match the actual filename of the downloaded `whl` package. This can happen because the build system sometimes standardizes filenames for broader compatibility (e.g., renaming `manylinux_2_27_x86_64` to `linux_x86_64`). Please use the hash value as the authoritative reference.
3. **Install the Package**: After successful verification, install the package using `pip`:
```bash
# Replace your_downloaded_file.whl with your actual filename
pip install your_downloaded_file.whl
```
> - If you have a poor network connection, you can try using the Huawei Cloud mirror to speed up the download: `pip install -i https://repo.huaweicloud.com/repository/pypi/simple mindquantum`.
### Installing by Source Code
1. Download Source Code from Gitee
```bash
cd ~
git clone -b r0.11 https://gitee.com/mindspore/mindquantum.git
```
2. Compiling MindSpore Quantum
```bash
cd ~/mindquantum
python setup.py install --user
```
## Verifying Successful Installation
If no error message such as `No module named 'mindquantum'` is reported when you run the following command, the installation is successful:
```bash
python -c 'import mindquantum'
```
## Installing with Docker
Mac or Windows users can install MindSpore Quantum through Docker. Please refer to the [Docker installation guide](https://gitee.com/mindspore/mindquantum/blob/r0.11/install_with_docker_en.md).