MindQuantum Installation
Confirming System Environment Information
Refer to MindSpore Installation Guide, install MindSpore, version 1.4.0 or later is required.
Installation Methods
You can install MindInsight either by pip or by source code.
Install by pip
pip install mindquantum==0.7.0
Refers to MindSpore to find different version of packages。
Install by Source Code
1.Download Source Code from Gitee
cd ~
git clone https://gitee.com/mindspore/mindquantum.git
2.Compiling MindQuantum
cd ~/mindquantum
python setup.py install --user
Verifying Successful Installation
Successfully installed, if there is no error message such as No module named ‘mindquantum’ when execute the following command:
python -c 'import mindquantum'
Install with Docker
Mac or Windows users can install MindQuantum through Docker. Please refer to Docker installation guide.
Note
Please set the parallel core number before running MindQuantum scripts. For example, if you want to set the parallel core number to 4, please run the command below:
export OMP_NUM_THREADS=4
For large servers, please set the number of parallel kernels appropriately according to the size of the model to achieve optimal results.