This repository contains the simulation code for studying the evolution of quantum operators under random quantum circuits and analyzing the growth of spatial entanglement entropy. The simulation uses a tensor-based representation for quantum operators, with quantum circuits constructed using the MindSpore Quantum framework.
See details at arXiv:2505.09512.
├── src/ # Core modules
│ ├── mq_operator.py # QuantumOp tensor class (NumPy)
│ └── mq_gates.py # Gate definitions and circuit construction (MindSpore Quantum)
├── scripts/ # Data generation and visualization
│ ├── mq_phase_diag.py # Main simulation (phase diagram + functional dependence)
│ └── plot.py # Publication figure generation
├── data_results/ # Pre-computed simulation results
│ ├── color_results.pkl
│ └── func_results.pkl
├── docs/ # Research paper source
└── requirements.txt # Python dependencies
- Python 3.10+
- MindSpore Quantum (
mindquantum) - NumPy
- Matplotlib
python3.10 -m venv venv
source venv/bin/activate
pip install -r requirements.txtNote: If installing from the default PyPI index gives an old version of MindSpore Quantum, try:
pip install mindquantum -i https://pypi.tuna.tsinghua.edu.cn/simple1. Run the simulation:
python scripts/mq_phase_diag.pyThis creates data_results/color_results.pkl and data_results/func_results.pkl.
2. Generate figures:
python scripts/plot.pyIf you use this code, please cite our paper:
@article{shang2025unified,
title={Unified approach to the resources of tensor network and stabilizer simulations},
author={Shang, Zhong-Xia and Chen, Si-Yuan and Yu, Wenjun and Chiribella, Giulio and Zhao, Qi},
journal={arXiv preprint arXiv:2505.09512},
year={2025}
}This project uses MindSpore Quantum for quantum circuit construction. Please also cite:
@misc{xu2024mindspore,
title={MindSpore Quantum: A User-Friendly, High-Performance, and AI-Compatible Quantum Computing Framework},
author={Xusheng Xu and Jiangyu Cui and Zidong Cui and Runhong He and Qingyu Li and Xiaowei Li and Yanling Lin and Jiale Liu and Wuxin Liu and Jiale Lu and others},
year={2024},
eprint={2406.17248},
archivePrefix={arXiv},
primaryClass={quant-ph},
url={https://arxiv.org/abs/2406.17248},
}This project is open source under the Apache License 2.0.
Source code: https://github.com/ChanceSiyuan/HT_forent