This repository contains python code for approximating the Gaussian expectation problems using GBS-I, GBS-P, and MC methods.
- Generate Gaussian expectation problems.
- Simulate and compare GBS-I, GBS-P, and MC methods.
- Create figures and tables in the companion paper.
git clone https://github.com/sshanshans/GBEGE.git
pip install -e ./To generate a Gaussian expectation problem, use one of the following scripts:
script/model_haf.pyscript/model_hafsq.py
To simulate and compare the performance of GBS-I, GBS-P, and MC methods, run:
script/run_est_haf.pyscript/run_est_hafsq.py
To produce figures for analyzing the convergence behaviors, use the script:
script/make_fig_haf.pyscript/make_fig_hafsq.py
To reproduce tables displayed in the paper, run one of the example scripts:
script/example1.pyscript/example2.pyscript/example3.pyscript/example4.py
This software is licensed under the GPL-3.0 License. See the LICENSE file for details.
If you use this software in your research, please cite the associated paper:
Using Gaussian Boson Samplers for Approximate Gaussian Expectation Problems
Jørgen Ellegaard Andersen, Shan Shan (2025)
Contributions are welcome! Please submit a pull request or open an issue if you encounter bugs or have suggestions.