Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

arXiv:2507.18379

From Ising to Potts: Physics-inspired Potts machines of coupled oscillators for low-energy sampling and combinatorial optimization

Yi Cheng, Zongli Lin

Published Jul 23, 2025• 6 citations
arXivHTMLPDF

Abstract

Repository containing the code to reproduce the experiments in the paper "From Ising to Potts: physics-inspired Potts machines in coupled oscillators for low-energy sampling and combinatorial optimization". It contains four standalone Python scripts: Max_2_cut.py — OPM solver for Max-2-Cut Max_3_cut.py — OPM solver for Max-3-Cut Max_4_cut.py — OPM solver for Max-4-Cut Max_5_cut.py — OPM solver for Max-5-Cut The benchmark graph instances G1–G5 are included as text files (G1.txt–G5.txt) in the same folder. Requirements Python 3.9+ and the packages listed in requirements.txt (notably: numpy, scipy, matplotlib, torch, torchsde). How to run (Jupyter / terminal) After installing dependencies: In a Jupyter notebook: %run Max_2_cut.py %run Max_3_cut.py %run Max_4_cut.py %run Max_5_cut.py Or in a terminal: python Max_2_cut.py (and similarly for Max-3/4/5) The scripts generate the output figures in the working directory (e.g., box plots summarizing solution quality across instances). GPU recommendation For best performance, we recommend running the code on a GPU. The runtime numbers reported below were measured on NVIDIA GeForce RTX 2080 Ti (CUDA 12.8; driver 570.124.06). Actual wall-clock time may vary with hardware and system load. Reproducibility and runtime For a faster sanity check, start with seed_num = 1 (typical wall-clock times to finish all instances G1–G5: Max-3-Cut ~12 min, Max-4-Cut ~16 min, Max-5-Cut ~24 min).To reproduce the results reported in the paper, use seed_num = 20.

DOI
10.48550/arxiv.2507.18379

Related papers

Comparative Study of Potts Machine Dynamics and Performance for Max-k-Cut

Bjarke A. Frederiksen, Robbe De Prins, Peter Bienstman

Combinatorial optimization problems in logistics, finance, energy, and scheduling routinely involve multi-state decision variables. Ising machines (IMs) require binary expansions (e.g., one-hot encoding) to encode such variables, whereas Potts machines (PMs) represent them natively. By doing so, PMs are expected to outperform IMs on multi-state problems. To the best of our knowledge, no systematic study of PM models has yet assessed whether this expectation holds. We therefore benchmark five representative PMs against a reference IM on Max-3-Cut and Max-4-Cut, using 800-vertex GSet graphs and random graphs of up to 50 vertices. Surprisingly, the reference IM still outperforms every PM, and the IM supremacy increases significantly in going from Max-3-Cut to Max-4-Cut. These results provide clear evidence that current PM dynamics underperform relative to binary approaches, even in regimes where they are presumed advantageous. We provide a way forward by quantifying the underperformance of current PMs, as well as by identifying three dynamical properties that correlate strongly with their performance ranking. Our work stresses the need for more systematic assessments of algorithmic performance in order to guide the design of more effective Potts machines.

arXiv:2605.06425•May 7, 2026•0 citations

Kernpiler: Compiler Optimization for Quantum Hamiltonian Simulation with Partial Trotterization

Ethan Decker, Lucas Goetz, Evan McKinney +9 more

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

arXiv:2504.07214•Proceedings - International Symposium on Computer Architecture/Proceedings•Jun 1, 2026•14 citations

Code and datasets for "Shortcuts to adiabaticity with a quantum control field"

Emma C. King, Giovanna Morigi, Raphaël Menu

Shortcuts to adiabaticity with a quantum control field — Code & data========================================================== This repository contains a Jupyter notebook and supporting data files (csv) to reproduce the numerical results and figures in our manuscript (arXiv 2508.06304), which investigates adiabatic shortcuts mediated by a quantum control field.The code implements a Landau–Zener two-level system coupled to a spectator qubit, time evolution of the full system (LZ qubit + spectator) via QuTiP, parameter sweeps (parallelized with joblib), and plotting utilities for the manuscript figures. Related publication----------------------------This code is complementary to the preprint: https://arxiv.org/abs/2508.06304. Requirements---------------------The simulations were developed for and tested on Python 3.9+. Recommended packages and minimum versions: - Python >= 3.9- numpy >= 1.22- scipy >= 1.8- matplotlib >= 3.5- qutip >= 4.6 (install a recent stable qutip; some installations require `pip install qutip` or `conda` channels)- joblib >= 1.2- tqdm >= 4.60- pandas (optional, for CSV handling)- jupyterlab / notebook (for interactive use) Running the notebook (interactive) Open the notebook with JupyterLab or Jupyter Notebook. Execute cells sequentially in the order indicated by the notebook outline.The sections “Definitions” and “Figure imports and setup” must be executed before generating any data or figures, as they define all operators, and helper functions. The notebook is organized into separate sections for each figure of the manuscript, allowing you to re-run only the figure(s) of interest. Note: Figure 4 (Density plot) is configured to load precomputed data files to reduce computational cost. To reproduce Figure 4 without recomputing the full dataset, ensure the required .csv files are downloaded and located in the same directory as the notebook. To explore different parameter regimes: Modify the relevant parameter definitions (e.g., anneal_window, g, epsilon, omega_c, x0, x0_vals, q_vals). To include dissipation of the spectator (ancilla) qubit, set the parameter kappa> 0. For questions about reproducing the figures or about parameter choices used in the paper, contact the corresponding authors listed in the preprint. If you reuse this data/code, please cite the associated preprint and this code archive.

•Feb 22, 2026•0 citations

Potts model solver with coherent Ising machines

Takahiro Inagaki, Kensuke Inaba, Koji Igarashi +9 more

The Japan Society of Applied Physics•Jul 10, 2019•0 citations

Trade-offs in Gauss's law error correction for lattice gauge theory quantum simulations

Bálint Pató, Natalie Klco

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 =============================================================================================

•Feb 25, 2026•0 citations

MontePython: Implementing Quantum Monte Carlo using Python

Jon Kristian Nilsen

arXiv:physics/0609191•Computer Physics Communications•Jun 30, 2007•11 citations
Repository containing the code to reproduce the experiments in the paper "From Ising to Potts: physics-inspired Potts machines in coupled oscillators for low-energy sampling and combinatorial optimization". It contains four standalone Python scripts: Max_2_cut.py — OPM solver for Max-2-Cut Max_3_cut.py — OPM solver for Max-3-Cut Max_4_cut.py — OPM solver for Max-4-Cut Max_5_cut.py — OPM solver for Max-5-Cut The benchmark graph instances G1–G5 are included as text files (G1.txt–G5.txt) in the same folder. Requirements Python 3.9+ and the packages listed in requirements.txt (notably: numpy, scipy, matplotlib, torch, torchsde). How to run (Jupyter / terminal) After installing dependencies: In a Jupyter notebook: %run Max_2_cut.py %run Max_3_cut.py %run Max_4_cut.py %run Max_5_cut.py Or in a terminal: python Max_2_cut.py (and similarly for Max-3/4/5) The scripts generate the output figures in the working directory (e.g., box plots summarizing solution quality across instances). GPU recommendation For best performance, we recommend running the code on a GPU. The runtime numbers reported below were measured on NVIDIA GeForce RTX 2080 Ti (CUDA 12.8; driver 570.124.06). Actual wall-clock time may vary with hardware and system load. Reproducibility and runtime For a faster sanity check, start with seed_num = 1 (typical wall-clock times to finish all instances G1–G5: Max-3-Cut ~12 min, Max-4-Cut ~16 min, Max-5-Cut ~24 min).To reproduce the results reported in the paper, use seed_num = 20.
Combinatorial optimization problems in logistics, finance, energy, and scheduling routinely involve multi-state decision variables. Ising machines (IMs) require binary expansions (e.g., one-hot encoding) to encode such variables, whereas Potts machines (PMs) represent them natively. By doing so, PMs are expected to outperform IMs on multi-state problems. To the best of our knowledge, no systematic study of PM models has yet assessed whether this expectation holds. We therefore benchmark five representative PMs against a reference IM on Max-3-Cut and Max-4-Cut, using 800-vertex GSet graphs and random graphs of up to 50 vertices. Surprisingly, the reference IM still outperforms every PM, and the IM supremacy increases significantly in going from Max-3-Cut to Max-4-Cut. These results provide clear evidence that current PM dynamics underperform relative to binary approaches, even in regimes where they are presumed advantageous. We provide a way forward by quantifying the underperformance of current PMs, as well as by identifying three dynamical properties that correlate strongly with their performance ranking. Our work stresses the need for more systematic assessments of algorithmic performance in order to guide the design of more effective Potts machines.
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
Shortcuts to adiabaticity with a quantum control field — Code & data========================================================== This repository contains a Jupyter notebook and supporting data files (csv) to reproduce the numerical results and figures in our manuscript (arXiv 2508.06304), which investigates adiabatic shortcuts mediated by a quantum control field.The code implements a Landau–Zener two-level system coupled to a spectator qubit, time evolution of the full system (LZ qubit + spectator) via QuTiP, parameter sweeps (parallelized with joblib), and plotting utilities for the manuscript figures. Related publication----------------------------This code is complementary to the preprint: https://arxiv.org/abs/2508.06304. Requirements---------------------The simulations were developed for and tested on Python 3.9+. Recommended packages and minimum versions: - Python >= 3.9- numpy >= 1.22- scipy >= 1.8- matplotlib >= 3.5- qutip >= 4.6 (install a recent stable qutip; some installations require `pip install qutip` or `conda` channels)- joblib >= 1.2- tqdm >= 4.60- pandas (optional, for CSV handling)- jupyterlab / notebook (for interactive use) Running the notebook (interactive) Open the notebook with JupyterLab or Jupyter Notebook. Execute cells sequentially in the order indicated by the notebook outline.The sections “Definitions” and “Figure imports and setup” must be executed before generating any data or figures, as they define all operators, and helper functions. The notebook is organized into separate sections for each figure of the manuscript, allowing you to re-run only the figure(s) of interest. Note: Figure 4 (Density plot) is configured to load precomputed data files to reduce computational cost. To reproduce Figure 4 without recomputing the full dataset, ensure the required .csv files are downloaded and located in the same directory as the notebook. To explore different parameter regimes: Modify the relevant parameter definitions (e.g., anneal_window, g, epsilon, omega_c, x0, x0_vals, q_vals). To include dissipation of the spectator (ancilla) qubit, set the parameter kappa> 0. For questions about reproducing the figures or about parameter choices used in the paper, contact the corresponding authors listed in the preprint. If you reuse this data/code, please cite the associated preprint and this code archive.
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 =============================================================================================