Code for Pool-free, residual-triggered ansatz growth for variational imaginary-time evolution: when a fixed operator order beats adaptive screening (Y.-H. Chen and R. Wong).
The circuit follows a fixed schedule of layers built from nested commutators of the Hamiltonian
with a parent operator of the starting state. It appends the next layer when the relative
McLachlan residual exceeds the threshold ε. For the transverse-field Ising ring, the schedule
reduces to the free-fermion ladder.
The experiments cover one- and two-dimensional transverse- and mixed-field Ising models,
four- and six-site Hubbard chains, and the molecules H₄, LiH, and H₆. The comparison reports each
method from its lowest-cost candidate start. The Ising models use the uniform |−⟩ state or a
tilted product state. The Hubbard chains use Néel, RHF, or UHF states. The molecular experiments
start from Hartree–Fock and compare the default and CCSD-ordered schedules.
Run the commands below from the extracted code folder with the environment active.
The ZIP contains Python and Bash source under dynamic_vite/ and scripts/. The setup instructions are included as README.md at the top level of the archive.
This runs the six-site transverse-field Ising ring, including its baseline methods, and plots the dynamics for that size.
python3 scripts/run_benchmarks.py --sizes 6 --workers 1 --only main bench lightcone
python3 scripts/make_figures.pyThe run writes results/main.json, results/bench.json, and results/lightcone.json.
The plotting script writes paper/figures/fig_dynamics.pdf and results/summary.csv.
With all dependencies installed, run:
bash scripts/run_all.shThe script creates the output directories, runs the simulations, and then generates the figures
and tables. Allow many hours, depending on your machine. The longest runs include the
six-site Hubbard chain, H₆, and the 16-site mixed-field ring. The driver scripts/run_long_benchmarks.sh records progress
and failures in results/long_benchmarks.log.
results/*.jsoncontains the individual runs. CSV files in the same directory summarize the costs.paper/table_*.texcontains the generated tables.paper/figures/contains the five generated figures: dynamics, mixed-field size scaling, the cross-model comparison, the longitudinal-field scan, and the circuit-cost breakdown.
The simulations use single-threaded linear algebra. ADAPT-type optimization can be sensitive to numerical differences across machines and library versions. Where seeded runs are available, the paper reports medians over seeds.
If you already have the complete set of saved JSON runs, copy them into results/ in the extracted
folder. Run the commands below to regenerate the main and supplemental outputs from those runs.
The starting-state table computes the reference-state quantities directly and uses both PySCF
and OpenFermion.
mkdir -p results paper/figures
# Copy the saved JSON run files into results/ before continuing.
python3 scripts/make_v4_tables.py
python3 scripts/make_v4_tables.py --sm
python3 scripts/make_v4_starts_table.py
python3 scripts/summarize_molecules.py
python3 scripts/summarize_hybrid.py
python3 scripts/make_figures.py
python3 scripts/make_scaling_figure.py
python3 scripts/make_v4_figures.py| Path | Purpose |
|---|---|
dynamic_vite/ |
Simulation methods, Hamiltonians, schedules, operator pools, and circuit-cost accounting |
scripts/run_benchmarks.py, scripts/run_mfim.py |
Transverse- and mixed-field Ising ring experiments |
scripts/run_models.py, scripts/run_molecules.py |
Two-dimensional spin, Hubbard, and molecular benchmarks |
scripts/run_starts.py, scripts/run_strong_baselines.py |
Candidate starting states and stronger adaptive baselines |
scripts/run_adapt_ensembles.py, scripts/run_molecules_seeds.py |
Seeded ADAPT-type runs |
scripts/run_scaling.py, scripts/run_warmstart.py, scripts/run_hybrid.py |
Size scaling, first-layer ablations and warm starts, and hybrid growth |
scripts/collect_v4.py |
Selects the lowest-cost start for each method and accuracy target |
Use python3 scripts/run_benchmarks.py --help or python3 scripts/run_models.py --help to see the options for an individual runner.