Code for "Quantum simulation of mutation-selection dynamics reveals a structural obstruction to quantum advantage" (submitted).
The Crow-Kimura and Eigen mutation-selection models map onto transverse-field Ising chains evolving in imaginary time. Mutation rate is the transverse field, per-locus fitness the longitudinal field, epistasis the ZZ coupling, and the quasispecies is the Perron eigenvector of the generator.
This repository implements that mapping as a quantum circuit and compares two quantum routes, variational imaginary-time evolution and QSVT eigenstate filtering, with three classical baselines: Wright-Fisher sampling, an exact solver for the landscape classes that admit one, and DMRG on matrix-product states.
Everything that writes a record runs inside the Docker image:
docker build -t quasar:v1 .
For development and the fast tests:
make setup
make test # unit and regression tests
make gates # every check, inside the image, about nine hours
Single work packages:
python scripts/run_all_gates.py --list
python scripts/run_all_gates.py --wp wp_r
The comparison sweep and its scoring:
python scripts/sweep_runner.py --wp 7 --grid full --methods classical --workers 8
python scripts/sweep_runner.py --wp 7 --grid full --methods quantum
python scripts/score_g7.py
scripts/rescore_hardware.py reproduces the hardware result from the raw counts.
scripts/make_manifest.py writes and verifies a SHA-256 manifest of a data deposit.
quasarstack/analytic closed-form solutions, exact diagonalisation
quasarstack/hamiltonian generator to Pauli operators
quasarstack/circuit Trotterised propagator
quasarstack/ite variational and Motta imaginary-time evolution
quasarstack/qsvt block encoding, phase factors, eigenstate filter
quasarstack/spectral gap, conditioning, order parameter
quasarstack/classical landscapes, Wright-Fisher, exact solver, DMRG
quasarstack/scoring cosine, total variation, bootstrap
quasarstack/backends noise models, IBM Quantum submission
quasarstack/io record schema, conventions, storage
experiments/ one script per check, each writing a JSON record
scripts/ sweep runner, scoring, hardware rescoring, manifests
results/ records
docs/ settings and derivations
Records are in results/, one JSON file per check, and docs/protocol.md lists the settings.
No quantum advantage appears at the sizes compared, up to 12 loci: the matrix-product baseline
matches exact diagonalisation on every instance, so no group meets the advantage criterion.
The hardware run reaches 4 loci on an IBM Heron r2 device.
Python 3.12, Qiskit 2.5.1 and quimb 1.14.0, with the pinned set in environment.lock.txt.
IBM Quantum credentials are needed only for the hardware run.
This codebase was written with AI-assisted tooling. All results come from the pipeline in this repository and reproduce from a clean checkout; the authors are responsible for correctness.
Code and data are archived at Zenodo: https://doi.org/10.5281/zenodo.22828425
@software{quasar,
author = {Mahaboob Ali, Anees Ahmed and Nelson, Everette Jacob Remington and Delhibabu, Radhakrishnan},
title = {quasar: quantum simulation of mutation-selection dynamics},
year = {2026},
doi = {10.5281/zenodo.22828425},
url = {https://github.com/ahmedanees-m/quasar}
}Apache-2.0 for code, CC-BY-4.0 for data and records. See LICENSE.