Open Quantum Challenge (OQC)

Leaderboard OQC data Harness

# Score




Season 1 · QSIM
Season 2 · QEC
pip install numpy scipy openfermion huggingface_hub
python - <<'PY'
from huggingface_hub import hf_hub_download
import json
p = hf_hub_download("FINAL-Bench/oqc-data","qsim/systems.json",repo_type="dataset")
sysd = json.load(open(p))["systems"]
from openfermion import fermi_hubbard, get_sparse_operator
import scipy.sparse.linalg as sla
pred = {}
for sid, s in sysd.items():
    x, y = s["lattice"]
    H = fermi_hubbard(x, y, tunneling=s["t"], coulomb=s["U_over_t"]*s["t"], periodic=False)
    pred[sid] = float(sla.eigsh(get_sparse_operator(H), k=1, which="SA", return_eigenvectors=False)[0])
json.dump(pred, open("my_qsim.json","w"))     # paste my_qsim.json into the Submit box
print(pred)
PY