arXiv:2504.07214 · Proceedings - International Symposium on Computer Architecture/Proceedings
Kernpiler: Compiler Optimization for Quantum Hamiltonian Simulation with Partial Trotterization
Ethan Decker, Lucas Goetz, Evan McKinney, Erik Gustafson, Junyu Zhou, Yuhao Liu, Alex K. Jones, Ang Li, Alexander Schuckert, Samuel Stein, Eleanor Crane, Gushu Li
Description This artifact contains the core implementation of Kernpiler, a compiler framework for optimizing quantum circuits, and supports full reproducibility of all experimental results presented in the associated paper. The artifact includes all code, data pipelines, and scripts required to regenerate Figures 5–11. System Used for Data Collection NVIDIA A100 GPU with 80GB memory AMD EPYC 9654P 96-core processor x86_64 Linux system Python 3.13.5 Experiments may be computationally intensive, but they are fully parallelizable across multiple devices. Installation Clone or download the repository and navigate to the project directory. Create a virtual environment: python3 -m venv validate source validate/bin/activate Install dependencies: python -m pip install -r requirements.txt Install torch-scatter: python -m pip install --no-cache-dir torch-scatter -f https://data.pyg.org/whl/torch-2.10.0+cu128.html Experiment Workflow All experiment scripts are located in: src/compiler/optimization_passes/experiments Each figure can be reproduced by running its corresponding data collection and graphing scripts: Figure 5exp_gatecount_datacollection.py→ graph using:graph_data_scripts/graph_absolute.py Figure 6exp_partition_scaling_datacollection_o1exp_partition_scaling_datacollection→ graph using:graph_data_scripts/graph_o1_o2_side_by_side.py Figure 7exp_runtime_per_pass.py→ graph using:graph_data_scripts/graph_runtime_per_pass.py Figure 8exp_partition_scaling_datacollectiono1_phoenixFT→ graph using:graph_data_scripts/graph_firstorder_scalingFT.py Figure 9exp_partitionalgvsrandom.py→ graph using:graph_data_scripts/graph_partition_vs_random.py Figure 10exp_scaling_data_rewriteradius.py→ graph using:graph_data_scripts/graph_scalingdata.py Figure 11exp_error_scaling_systemsize.py→ output generated directly (no additional graph script required) Execution Notes All experiments are independent Parallel execution is supported Runtime varies depending on system size and hardware
Description This artifact contains the core implementation of Kernpiler, a compiler framework for optimizing quantum circuits, and supports full reproducibility of all experimental results presented in the associated paper. The artifact includes all code, data pipelines, and scripts required to regenerate Figures 5–11. System Used for Data Collection NVIDIA A100 GPU with 80GB memory AMD EPYC 9654P 96-core processor x86_64 Linux system Python 3.13.5 Experiments may be computationally intensive, but they are fully parallelizable across multiple devices. Installation Clone or download the repository and navigate to the project directory. Create a virtual environment: python3 -m venv validate source validate/bin/activate Install dependencies: python -m pip install -r requirements.txt Install torch-scatter: python -m pip install --no-cache-dir torch-scatter -f https://data.pyg.org/whl/torch-2.10.0+cu128.html Experiment Workflow All experiment scripts are located in: src/compiler/optimization_passes/experiments Each figure can be reproduced by running its corresponding data collection and graphing scripts: Figure 5exp_gatecount_datacollection.py→ graph using:graph_data_scripts/graph_absolute.py Figure 6exp_partition_scaling_datacollection_o1exp_partition_scaling_datacollection→ graph using:graph_data_scripts/graph_o1_o2_side_by_side.py Figure 7exp_runtime_per_pass.py→ graph using:graph_data_scripts/graph_runtime_per_pass.py Figure 8exp_partition_scaling_datacollectiono1_phoenixFT→ graph using:graph_data_scripts/graph_firstorder_scalingFT.py Figure 9exp_partitionalgvsrandom.py→ graph using:graph_data_scripts/graph_partition_vs_random.py Figure 10exp_scaling_data_rewriteradius.py→ graph using:graph_data_scripts/graph_scalingdata.py Figure 11exp_error_scaling_systemsize.py→ output generated directly (no additional graph script required) Execution Notes All experiments are independent Parallel execution is supported Runtime varies depending on system size and hardware
GadIR artifact evaluation This self-contained directory reproduces Figures 10--15, 17, and 18(d) from the packaged Hamiltonians and generated random instances. It contains one GadIR frontend, four architecture backends, the two analysis workflows, and the baseline code used by the experiments. Full reproduction regenerates the result tables from the raw benchmarks. The bundled Figure 15 table supports plot-only validation and is overwritten by reproduce. Repository: https://github.com/xiyurain/GadIR Archive: https://doi.org/10.5281/zenodo.21550065 Requirements Use a machine with Bash, Git, Conda, a C/C++ toolchain, and stable Rust/Cargo. Intel, AMD, and Apple CPUs are supported. The experiments are CPU-only; at least 16 CPU cores, 32 GB RAM, and 20 GB of free disk are recommended. No GPU or quantum hardware is required. Network access is needed only while installing the environments. Install Miniconda (or Anaconda), Git, and the host compiler first. On Ubuntu/Debian, the host packages can be installed with: sudo apt-get update sudo apt-get install -y build-essential curl git Install Rust with rustup: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh source "$HOME/.cargo/env" conda --version git --version rustc --version cargo --version Installation Clone the public repository (or unpack the Zenodo archive), enter this directory, and run the installation script: git clone git@github.com:xiyurain/GadIR.git cd GadIR/GadIR_AE ./prepare.sh prepare.sh creates three pinned environments under .envs/: analysis: Python 3.10, Qiskit 1.4.3, Qiskit Aer 0.17.1, PyZX 0.9.0, NumPy, pandas, SciPy, matplotlib, Stim/sinter 1.15.0, PyMatching 2.3.0, TQEC, GraphiQ 0.1.1, and Jupyter Notebook; quclear: Python 3.10 and Qiskit 1.1.1. 2qan: Python 3.9 and Qiskit Terra 0.20.2 (Qiskit 0.36.2). The script also builds and installs the packaged Rustiq Python extension into the analysis environment and installs Tweedledum 1.1.1 without build isolation before Qiskit Terra 0.20.2 in the 2QAN environment. TQEC and GraphiQ are installed at the exact revisions recorded in environments/analysis.yml. GraphiQ is retained for compatibility with the submitted installation check and is installed from the bundled wheel built at the recorded revision without its obsolete Qiskit 0.38 dependency; the Figure 15 workflow uses the packaged GSSynth backend. Manual environment activation is unnecessary. An installation can be checked with: ./.envs/analysis/bin/python -c "import qiskit, pyzx, rustiq, stim, sinter, pymatching, tqec, graphiq" ./.envs/quclear/bin/python -c "import qiskit" ./.envs/2qan/bin/python -c "import qiskit" If SSH access to GitHub is unavailable, download the Zenodo archive instead of cloning. The pinned TQEC revision still requires network access during prepare.sh. Running the artifact All commands are run from GadIR_AE/: ./run.sh smoke ./run.sh reproduce ./run.sh plot smoke runs one small input for each architecture backend and reduced-size Figure 17/18(d) analyses. reproduce compiles all selected benchmarks, writes fresh tables under results/, and draws all eight figures. plot only redraws from the tables already generated under results/. To generate all paper figures from completed AE results, use the provided plot-only notebook: ./.envs/analysis/bin/jupyter notebook generate_all_figures.ipynb The notebook draws Figures 10--15, 17, and 18(d) into output/; run ./run.sh reproduce first. The submitted artifact appendix refers to Figure 18(c) in this sentence. This is a labeling typo: the included analysis and notebook reproduce Figure 18(d). The workflows run in this order: superconducting, neutral atom, FTQC, MBQC, and analysis. Full reproduction is intentionally long: FTQC sampling and all 84 Figure 15 compiler jobs can take hours to days. smoke also executes real compiler/simulator paths and can take tens of minutes. The expected figure files are: output/figure10.pdf output/figure10_full_range.pdf output/figure11.pdf output/figure11_full_range.pdf output/figure12.pdf output/figure13.pdf output/figure14.pdf output/figure15.pdf output/figure17.pdf output/figure18d.pdf Figure 17 generates 1000 random instances at each term count with fixed seed 7. Figure 18(d) evolves the packaged Hamiltonians with four product-formula steps at times 0.4, 0.8, and 1.0, then reports the maximum bipartite entropy over every MPS prefix cut. Because the packaged structural Hamiltonians contain Pauli strings without numeric coefficients, every input term uses coefficient Open markers are the dimension-derived bound S_MPS <= floor(n_qubits / 2). The tables are written to results/analysis/figure17.csv and results/analysis/figure18d.csv. Layout benchmarks/ source Hamiltonians hardware/ superconducting and neutral-atom architectures src/gadir_frontend/ architecture-independent GadIR frontend src/superconducting/ Figures 10--11 backend src/neutral_atom/ Figure 12 backend src/ftqc/ Figures 13--14 backend src/mbqc/ Figure 15 backend src/analysis/ Figures 17 and 18(d) workflows baselines/ baseline implementations or dependency records environments/ pinned Conda specifications results/ generated tables and intermediate circuits output/ generated PDFs GadIR licensing is not declared by a new license file in this AE directory. Redistributed third-party code retains its upstream notice in baselines/<method>/LICENSE; TQEC is an installed dependency pinned in environments/analysis.yml.
This archive contains the numerical data and scripts used to generate the figures for the paper “Energy-selective quantum search with Ising Hamiltonian phase oracles”. The main numerical dataset is used for the scaling analysis of the correlation-induced resonance displacement φ₀ in the zero-field random Ising ensemble. The simulations use dimensionless units with σ_J = 1 and the Hamiltonian H(s) = 2 sum_{i<j} J_ij s_i s_j, where the couplings are independent Gaussian random variables, J_ij ~ N(0, 1), and h_i = 0. For each random Ising instance, the archive stores the truncated characteristic-function coefficients g_m = 2^{-n} Tr exp(-i m T H), m = 0, ..., 15. These coefficients are used to extract the local displacement φ₀ from the zero of the imaginary part of the response function C(φ) = 2 sum_{m=0}^{15} g_m (-1)^m exp(i m φ) - 1. The quantity plotted in the paper is the disorder-averaged second moment <φ₀²> and the scaled combination n⁶<φ₀²>. The Monte Carlo average is over independent disorder realizations only. For each realization, the trace over spin configurations is evaluated deterministically. The data cover even system sizes n = 18, 20, 22, ..., 36. For the largest systems, the computation splits the spins into two equal halves, performs GPU block contractions, and uses the zero-field spin-flip symmetry H(s)=H(-s) to reduce the sum by a factor of two. Archive contents - scripts/01_generate_phi0_coefficients.py Generates the characteristic-function coefficient files g_m for the random Ising ensemble. - scripts/02_analyze_phi0_scaling.py Computes φ₀, bootstrap confidence intervals, the finite-n covariance-sum comparison, and the scaling plots. - scripts/03_make_gaussian_amplification.py Generates the Gaussian amplification figure used as Fig. 1 in the paper. - data/phi0_coefficients/ Directory for the NumPy .npz files containing the characteristic-function coefficients. The production files have names of the form Nq_<n>_K_<K>.npz. The .npz files are saved without pickle objects. They can be read with standard NumPy using np.load. Typical usage To regenerate the Gaussian amplification figure: python scripts/03_make_gaussian_amplification.py --output-dir output/fig1_gaussian To analyze the φ₀ scaling data: python scripts/02_analyze_phi0_scaling.py \ --data-dir data/phi0_coefficients \ --output-dir output/phi0_scaling To run a short test calculation of the characteristic-function coefficients: python scripts/01_generate_phi0_coefficients.py \ --smoke-test \ --output-dir output/smoke_test_coefficients To regenerate the full production dataset on a CUDA-capable GPU: python scripts/01_generate_phi0_coefficients.py \ --production \ --output-dir data/phi0_coefficients The production calculations were performed using CuPy on an NVIDIA GPU. The analysis and plotting scripts use NumPy, pandas, and Matplotlib.
Data and plotting scripts for the case studies in “From QCCD Trapped-Ion Hardware to Quantum Compilers: Capabilities, Architectures, and Compilation”. Two circuits, randomly generated interaction layers and a logical teleportation circuit on the [[7,1,3]] Steane code, were compiled onto a 1D linear segmented register and onto a 2D grid with processing zones outside the memory region. The archive holds the resulting routing costs as CSV, the teleportation circuit as OpenQASM 2.0, and the scripts that draw the paper’s two case-study figures from them. uv run scripts/plot_scaling.py and uv run scripts/plot_teleportation.py regenerate both figures.
Overview of data provided in support of Towards near-term quantum simulation of materials Contents of this folder: `analyse_materials_results.py`: script used to generate the summary tables and figures presented in the manuscript. `towards_quantum_simulation_data`: raw data used and produced when studying various 3D materials. `towards_quantum_simulation_analysis`: tables (in `.tex` format) and figures (as PDFs) presented in the manuscript. The contents of `towards_quantum_simulation_analysis` were generated by `analyse_materials_results.py`, i.e. the user need not run the script to produce the output files. Users can generate these analyses directly by running ```python analyse_materials_results.py```, though note the following packages will first need to be installed: `pandas >= 1.2.3` `numpy >= 1.23` `seaborn >= 0.11.1` `lfig >= 0.1.3` `matplotlib > 3.7.0` Included data Within `towards_quantum_simulation_data`, there are subfolders for each of the materials described in the manuscript, i.e. `SrVO3`, `GaAs`, `H3S`, `Si`, `Li2CuO2`. Within each material's folder are further subfolders for the `hamiltonian` and `encoding` used to represent the material, as well as subfolders for each of the `algorithms` studied. `hamiltonian`: files which specify the Hamiltonian for the material under study. There are a number of files `interactions.json` Hamiltonian terms in terms of Majorana monomials. `map_majorana_to_mode.json` keys are Majorana indices; values are the mode index to which they are associated. `map_mode_to_group.json` keys are mode indices; values are the group (or site) index to which they are associated. `map_group_to_position.json` keys are group indices; values are the corresponding 3D Cartesian coordinates of the lattice used to represent the material. `stage_data.json` contains key/value pairs of any other fields of interest. `encoding` files which specify the fermionic encoding which is customised for the material under study. `encoding.json` which details the edges of the hybrid compact encoding described in Section VI of the supplementary material. `precompiler.json` contains all the information which permits the encoding construction, including the Hamiltonian terms (`_interactions`) which match those in `hamiltonian/interactions.json`. The same mappings as present in the Hamiltonian data(a.g. `map_group_to_position`). `stage_data.json` contains key/value pairs of any other fields of interest. `algorithms` contains subfolders for each of the algorithms desribed in the manuscript Those explored for circuits depths: `TDSSplitTermsPriorityCircuitDepth` (TDS in the manuscript) `TDSSplitTermsPriorityCircuitDepthNoSwapNetwork` (TDS\*) `VQESplitTerms` (VQE) `VQESplitTermsNoSwapNetwork` (VQE*) each of which contain the files, inside the `circuitry` folder: `circuit_terms.csv`, which lists each individual term, together with their Pauli string and rotation angle, required to construct the corresponding quantum circuit `circuit_layers_to_implement.csv` groups the same terms into layers to achieve parallelism in the circuit. `stage_data.json` contains key/value pairs of any other fields of interest. and those used to compose measurement layers, as outlined in Section VII D of the supplementary material: `MeasurementCommutativity` `MeasurementNaiveQubitwise` `MeasurementNonCrossing` each of which contain the files, inside the `compilation` folder: `layers.csv` lists the terms which may be measured simultaneously to achieve the measurement strategies shown in Table S14. `stage_data.json` contains key/value pairs of any other fields of interest. CSV files In `towards_quantum_simulation_data`, there are unified CSV files containing the results of applying the procedures described in the manuscript to the target materials. `circuit_costs.csv`: results of running the circuit compiler described in the manuscript. `measurements.csv`: results of running the measurement compiler described in the manuscript. These CSVs are used in the analysis script `analyse_materials_results.py` to produce the figures and tables presented in the manuscript.
QECTOR Decoder Benchmark Datasets & Empirical Reports This repository hosts the evolving collection of reproducible benchmark datasets, JSON measurement artifacts, and empirical performance reports for the QECTOR Decoder v3 platform (Rust/Python quantum error-correction decoder). Each versioned deposit contains environment-stamped, content-hashed JSON artifacts together with the corresponding publication-grade report. All numerical results are fully regenerable from the published wheels and the scripts listed in the reproducibility sections. Scope across versions Code-capacity and circuit-level (Stim rotated_memory_z) evaluations Throughput (shots/s, measure-s/shot), logical error rates with 95 % Wilson intervals, syndrome faithfulness (GF(2) exact check), and CUDA-vs-CPU bit identity Decoder families: FastUnionFind, UnionFind, Blossom (exact MWPM), SparseBlossom, Batch/CPUBatch, BPOSD, HybridCascade, AmbiguityCluster, LookupTable, and CUDABatch (unweighted + DEM-weighted) Hardware provenance, licence-tier disclosure (GPU gated behind Enterprise), and SHA-256 inventories of every backing artifact Version history (selected) v0.6.6 (July 2026) – Workbench Benchmark Master Report: 1 858 decode-timing measurements from 105 runs, six code topologies (Heavy Hex, Repetition, Ring, Rotated Surface, Toric, Unrotated Surface), fixed p = 0.05, distances d = 3–19. Focus on raw latency, harmonic-mean throughput and peak memory. v0.6.8 - Empirical edge-hardware benchmarks. v0.7.0 (August 2026) – Full Empirical Decoder Benchmark Report on the published wheel: nine CPU families + CUDA batch path, circuit-level LER parity with PyMatching 2.4.0, exact syndrome faithfulness, DEM-weighted GPU scaling restoration, and complete artifact inventory (Appendix A). All figures and tables in the accompanying reports are regenerated from the JSON files listed with their SHA-256 hashes; no pre-release numbers are carried forward. Related resources PyPI: qector-decoder-v3 Repository: https://github.com/GuillaumeLessard/qector-decoder Website: https://www.qector.store
Gauss' Law in Lattice Gauge Theory Simulations Setup Unzip the downloaded Zenodo package to a folder named gauss_law_qec and run cd gauss_law_qec to switch the current directory to the package directory. Please use Python version 3.10, 3.11, 3.12, or 3.13 (Pymatching has wheels up to 3.13). We provide instructions for Unix systems (Linux/MacOSX), which are fully supported, and Windows systems, which are partially supported. Because CairoSVG is only reliably available on Unix systems, Windows installations will not generate Figure 5, but other figures will work. The data generated behind Figure 5, however, is still valid on Windows as well. Unix: python3 -m venv .venv source .venv/bin/activate pip3 install -r requirements.txt Windows (use cmd.exe, not Powershell): python -m venv .venv .venv/Scripts/activate.bat pip install -r requirements.txt Setup the PYTHONPATH variable to point to the current directory. Unix: export PYTHONPATH="." Windows (cmd.exe): set PYTHONPATH=. Note that on MacOSX, you will need to also install cairo, we recommend using Homebrew, and copy the libcairo.2.dylib to the source folder. cp `brew list cairo | grep libcairo.2.dylib` . Generate figures To generate all figures, run python gauss_law/plot/generate_all_figures.py Figure 3. Logical error rates in single round memory experiment python gauss_law/plot/single_round_memory_experiment_analytical.py Figure is in figures/classical_prob_analytical.pdf. Figure 4. UQEC vs GLQEC ratio in single round memory experiment python gauss_law/plot/glqec_vs_uqec_ratio.py Figure 5. Combined memory & simulation plots To create the combined figure based on the existing cached data in the data folder: python gauss_law/plot/combined_memory_and_simulation_plot.py The figure will be in figures/combined_memory_simulation_n8_p8.0e-02.png. Remove and regenerate data WARNING - next steps will remove cached data. Only do this if you want to test regenerating data. To remove cached data, run: rm data/multi_round_* To regenerate the data for both simulation and memory density matrix experiments, run: python gauss_law/plot/multi_round_dm_evolutions.py --simulate --all_theories python gauss_law/plot/multi_round_dm_evolutions.py Figure 6. Monte carlo multi-round samples for memory channel python gauss_law/plot/multi_round_memory_sampling.py Figure 7. Trace distance upper bound plot python gauss_law/plot/memory_slem_upper_bound_plot.py Note that this utility uses the same data that was generated for Figure 5. Figure 8. Lambda2 plot and table of lambda2 values at p=0.08 Using MWPM decoding: python gauss_law/plot/glqec_lambda2_plot.py Figure saved to: figures/glqec_lambda2_plot.pdf Using extended RRW decoding: python gauss_law/plot/glqec_lambda2_plot.py --lookup_table Figure saved to: figures/glqec_lambda2_plot_LUT.pdf Remove and regenerate data for Fig 8. WARNING - next steps will remove cached data. Only do this if you want to test regenerating data. !!! Running the eigenvalue computation is only slightly optimized, on a 10 Apple M4 core Mac mini runs for 2 hours at least for each commands. !!! The commands above use the /cache in the data folder, and you can remove them by running these commands: rm data/glqec_lambd* rm data/glqec_sympy* rm data/lambda2_cache* Then, running the above commands will regenerate the data. Figure 9. Lambda2 based estimators for electric energy python gauss_law/plot/multi_round_memory_sampling.py --num_physical_sites 50 --num_trials 100 --show_upper_bounds --glqec_lambda2 0.924416 Verifying the state counting for the d=3 gauge cause To test up to n=1000, run python gauss_law/state_counting/truncated_u1_counting.py To go higher, pass in the number of sites: python gauss_law/state_counting/truncated_u1_counting.py 2000 Development and running unit tests Install the dev tools by running: pip install -r dev-requirements.txt Then to execute the unit tests, run pytest gauss_law To check coverage, run: pytest --cov=gauss_law gauss_law --cov-config=.coveragerc --cov-report term Should return: =============================================================================================== tests coverage ================================================================================================= _______________________________________________________________________________ coverage: platform darwin, python 3.13.7-final-0 ________________________________________________________________________________ Name Stmts Miss Cover ----------------------------------------------------------------------- gauss_law/channel/core.py 173 17 90% gauss_law/code/rrw.py 49 3 94% gauss_law/code/run_of_ones.py 25 0 100% gauss_law/lattice/array_lattice_operators.py 126 15 88% gauss_law/lattice/protocols.py 23 2 91% gauss_law/lattice/qutip_lattice_operators.py 141 12 91% gauss_law/lattice/staggered_fermion_lattice.py 79 7 91% gauss_law/mixing/lambda2.py 54 40 26% gauss_law/mixing/markov.py 189 38 80% gauss_law/state_counting/truncated_u1_counting.py 84 19 77% ----------------------------------------------------------------------- TOTAL 943 153 84% ============================================================================================= 8172 passed in 46.04s =============================================================================================