FastCTQW is a high-performance, GPU-accelerated Python package for simulating Continuous-Time Quantum Walks (CTQW). It delivers unparalleled speed among GPU-accelerated CTQW simulators, enabling efficient research and development.
The package offers a user-friendly Python interface, allowing researchers and developers to quickly leverage its high performance within a Python environment. FastCTQW supports Python 3.10 or newer.
- User-Friendly Interface: Provides an intuitive Python API for rapid development and validation of CTQW algorithms in virtual environments.
- High Performance: Achieves the fastest CTQW simulations, completing a simulation on a dense graph with 10,000 nodes in under 20 seconds on a personal PC equipped with an NVIDIA GPU (8GB VRAM).
-
Numerical Stability: Ensures robust numerical stability, maintaining infidelity on the order of
$10^{-12}$ in single-precision simulations for graphs with thousands of nodes, surpassing the stability ofscipy.linalg.expm.
FastCTQW can be installed via PyPI or by cloning the repository and installing locally. Using a virtual environment is recommended.
pip install FastCTQWgit clone https://github.com/Crinton/FastCTQW.git
cd FastCTQW
pip install .- NumPy >= 1.20
- NetworkX >= 3.0
- SciPy >= 1.14
- Matplotlib >= 3.5.0
- Seaborn >= 0.11.0
- CUDA >= 11.4
- NVIDIA GPU with compute capability >= 7.0
- C++17 standard
conda create -n env_FastCTQW python=3.13
conda activate env_FastCTQWimport numpy as np
import networkx as nx
from fastCTQW.State import State
from fastCTQW.Ctqw import CtqwN = 10
G = nx.random_regular_graph(d=4, n=N)
init_state = State.getUniformSuperposition(n=N)
qwalker = Ctqw.from_networkx_graph(G, init_state, device="cuda", dtype=np.complex64)qwalker.runWalk(time=4.5)
final_state = qwalker.getFinalState()
state = final_state.getState()
print(state)