Skip to content

YYgroup/QKM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QKM

Authors: Baoyang Zhang, Dong An, Zhaoyuan Meng, Yefei Yu, Xiaoxiao Xiao, Zhen Lu, Yue Yang

QKM is an experimental research project exploring quantum-accelerated simulation of nonlinear dynamics. It develops a data-driven quantum Koopman method that combines deep learning for global linearization with quantum algorithms for unitary evolution.

Installation

To set up the QKM environment:

# Create and activate a conda environment
conda create -n qkm python==3.12.12
conda activate qkm

# Install required dependencies
pip install -r requirements.txt

Project organization

This repository contains implementations for three nonlinear dynamics benchmarks:

  • 3D reaction-diffusion system (case1/)
  • Spherical fluid dynamics (case2/)
  • Real-world ocean currents (case4/)

The repository also includes:

  • Post-processing tools in main/
  • Data-generation scripts in generation/
  • Visualization tools in plotting/
  • Supplementary-material codes are available in SI/.

Getting Started

Training with DeepSpeed

We use DeepSpeed for distributed data-parallel training.

The training process can be launched using the following shell script:

deepspeed --num_gpus 8 \
          case1/task1/Qcartesian3dn.py \
          --deepspeed \
          --deepspeed_config ds_config.json \
          > run.log 2>&1

Perform experiments on a quantum computer

Quafu is a free cloud-based quantum computing platform that provides access to real quantum processors for experimental research.

Testing and reproduction

To evaluate the models and reproduce the results from our paper:

  1. Generate the dataset Run the scripts in generation/ to generate case-specific datasets.

  2. Run experiments on a quantum computer Run the case-specific quantum circuits on Quafu to reproduce the hardware experiments.

  3. Run the visualization notebook Execute the Jupyter notebook to generate figures:

    jupyter notebook ./main/plot_case1n.ipynb

Citation

If you use our code, please cite:

@misc{Zhang2025quantumKoopman,
      title={Data-driven quantum {Koopman} method for simulating nonlinear dynamics},
      author={Zhang, Baoyang and Lu, Zhen and Zhao, Yaomin and Yang, Yue},
      year={2025},
      eprint={2507.21890},
      archivePrefix={arXiv},
      primaryClass={quant-ph},
      url={https://arxiv.org/abs/2507.21890},
}

About

Quantum simulation of real-world nonlinear dynamics via Koopman method

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors