Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Variational method for generalized PXP models

This repository contains the pure Python code needed to regenerate the main numerical figures, the width table, the finite-cell convergence check, and the geometry-aware low-leakage trajectory analysis in the accompanying manuscript on arbitrary-period TDVP for generalized PXP models. No numerical dataset, checkpoint, rendered figure, or processed table is distributed: every numerical input is generated by the scripts.

Contents

  • fig1fig2/reproduce_fig1_fig2.py: orchestration, numerical protocols, resumable leakage-grid generation, plotting, and table export.
  • fig1fig2/explore_resonance_mode_transition.py: well-separated sampling of the P1--P2 valley, both sides of independent low-leakage arcs through P4 and L1, and the resonance line, including the supplementary phase portraits.
  • fig1fig2/tdvpfun.py: the spin-1/2 finite-period TDVP flow, transfer weights, observables, and quantum leakage.
  • fig1fig2/EDfun.py: construction of the blockade-compatible MPS initial state in the constrained exact-diagonalization basis.
  • fig1fig2/pxpbasisS.py: periodic constrained QuSpin basis.
  • scripts/benchmark_arbitrary_k_convergence.py: the single-panel local response convergence check through K=200, using K_ref=500.
  • scripts/hzg-paper.mplstyle: publication plotting style used by the supplementary figures.
  • environment.yml: pinned Python dependencies used for validation.

The original exploratory notebook and all legacy pickle/NPZ files are deliberately omitted.

Environment

From a fresh checkout:

conda env create -f environment.yml

Run the fast validation before starting the expensive scan:

conda run -n pxp-variational-repro \
  python fig1fig2/reproduce_fig1_fig2.py --self-test

The self-test performs a short TDVP integration and constructs a small QuSpin basis and MPS state. It does not create manuscript data.

Reproduce the figures and table

conda run --no-capture-output -n pxp-variational-repro \
  python fig1fig2/reproduce_fig1_fig2.py \
  --figures both --workers 8

This command generates, rather than downloads, all numerical inputs. The 301-by-201 leakage scan is the expensive step and is checkpointed one mu row at a time under fig1fig2/data/leakage_rows/. It can be interrupted and resumed with the same command. To discard the row checkpoints and restart that scan, add --recompute-leakage.

ED uses the manuscript's periodic L=24 ring; TDVP uses K=100. The common pole regularization, initial azimuth, time grids, and solver tolerances are defined once near the top of the driver. The broad leakage landscape uses the exploratory RK45 protocol, while P1--P6 and all ED/TDVP comparison trajectories are checked with the stricter DOP853 protocol recorded in the generated metadata.

Generated files include:

  • fig1fig2/output/fig1_leakage_and_profiles.pdf
  • fig1fig2/output/fig2_bloch_planes.pdf
  • fig1fig2/output/defect_widths.csv
  • fig1fig2/output/defect_widths.json
  • fig1fig2/output/defect_widths_table.tex

The generated caches, checkpoints, plots, and table files are excluded by .gitignore.

The full scan and the L=24 ED evolution are resource intensive and are therefore separate from the self-test.

Reproduce the numerical appendices

The finite-cell benchmark is independent of stored datasets:

conda run --no-capture-output -n pxp-variational-repro \
  python scripts/benchmark_arbitrary_k_convergence.py

The geometry-aware low-leakage analysis also requires no distributed dataset:

conda run --no-capture-output -n pxp-variational-repro \
  python fig1fig2/explore_resonance_mode_transition.py \
  --background-workers 8

If the main reproduction command has already generated fig1fig2/data/fig1_average_leakage.npz, the supplementary analysis reuses that compatible background. Otherwise it generates the same 301-by-201 background with resumable row checkpoints before reintegrating 27 unique trajectories with the stricter DOP853 protocol. The selection comprises five P1--P2 control points, nine points spanning both sides of the P4 arc, nine points spanning both sides of the L1 arc, and four additional samples on the resonance line. L1 is shared by the latter two conceptual families but is stored and integrated only once. The script compares both arcs using signed, unnormalized parameter-space arc length from each geometric bottom, and audits the global minimum spacing together with the strict mean-leakage threshold for every non-control point.

The full commands generate:

  • output/finite_k_convergence/finite_k_local_response_convergence.pdf
  • fig1fig2/output/supp_resonance_mode_transition.pdf
  • fig1fig2/output/supp_low_leakage_portrait_grid.pdf
  • the corresponding generated NPZ, JSON, CSV, and PNG files.

For a quick pure-code check of the supplementary background generator, use a small grid and a temporary output path:

conda run -n pxp-variational-repro \
  python fig1fig2/explore_resonance_mode_transition.py \
  --background-mu-count 3 --background-chi-count 3 \
  --background-workers 1 --background-only \
  --leakage-cache tmp/smoke_background.npz \
  --background-row-dir tmp/smoke_background_rows

All generated products are excluded from version control.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages