Simulation code for UQCS in the noisy quantum circuits and benchmarking comparison between UQCS, QETU and QPE by using MindQuantum
-
This code is run on the windows 11 system with python=3.9.21 and is based on several packages: numpy, cvxpy, matplotlib, pyqsp, mindquantum, and so on. No non-standard hardware is needed. The package "pyqsp" can be found in the github repository https://github.com/ichuang/pyqsp, which is used in the quantum circuits construction in the simulation of QETU algorithm. The package "mindquantum" can be installed under the guidance on https://gitee.com/mindspore/mindquantum, which supports the main framework for the simulation of quantum algorithms in the noisy quantum circuits of the paper.
-
The code can be directly run on a "normal" desktop computer as long as relevant dependencies have been installed.
-
Detailed explanations for the files: (a) "noise_figure.py" simulated the entire process of UQCS for a anisotropic Heisenberg spin model with 8 sites in the quantum circuits with different level of unitary operation errors. It can generate 10 samples of results. Each contains a group of noisy circuits simulation, which contains the simualtion data of quantum auto-correlation function series for identity operator (time_serial.npy) and spin-spin correlation operator (QAF_serial.npy). (b) "data_processing.ipynb" is jupyter notebook based code, which gives the post-processing of quantum auto-correlation function series, including singular spectrum renormalisation and discrete time Fourier transform. It generates frequency-domain amplitude for identity operator (amplitude.npy) and spin-spin correlation operator (Oamplitude.npy) for each sample. Then we fit the Gaussian peak for ground state to get the ground-state energy (CI.png) and spin-spin correlation (CO.png). The estimation error is recorded in the "data.csv". (c) "QSA_Benchmarking.ipynb" (our work), "QETU_Benchmarking.ipynb", "IPEA_Benchmarking.ipynb" compare three quantum algorithms with different noise level and in different quantum dynamics. Note that the considered noise level is slightly different from the noisy simulation in "noise_figure.py" for discussion simplicity.