Files
qibotn/run_qibojit_ref.py
jaunatisblue 5a692033a6
Some checks failed
Build wheels / build (ubuntu-latest, 3.11) (push) Has been cancelled
Build wheels / build (ubuntu-latest, 3.12) (push) Has been cancelled
Build wheels / build (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / check (push) Has been cancelled
Tests / build (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / build (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / build (ubuntu-latest, 3.13) (push) Has been cancelled
添加MPI并行TN benchmark及辅助脚本,移除旧benchmark
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-05 19:04:09 +08:00

19 lines
486 B
Python

"""Run qibojit on 30-qubit QFT and save statevector for comparison."""
import time
import numpy as np
import qibo
from qibo.models import QFT
#np.random.seed(42)
circuit = QFT(32)
qibo.set_backend("qibojit", platform="numba")
t0 = time.time()
result = circuit()
elapsed = time.time() - t0
sv = np.array(result.state(), dtype=complex).flatten()
np.save("data/sv_qibojit_qft30.npy", sv)
print(f"[qibojit] time={elapsed:.4f}s shape={sv.shape}")
print(f"Saved to sv_qibojit_qft30.npy")