This repository includes the source code for simulations carried out in Ref. [1].
Install dependencies or open in devcontainer to automatically set up the envorinment.
pip install -r requirements.txtDownload JGB dataset from: https://www.mof.go.jp/english/policy/jgbs/reference/interest_rate/index.htm and insert in this project data/jgbcme_all.csv
.devcontainer/for running the devcontainerdata/need to create this folder by yourself when adding data filesresults/runs/...results of the numerical simulationsplot_figures.ipynbplot the figures for the paper
src/code for running simulationssrc/conf/config.yamlconfiguration for the simulationcost.pyloss functions, gradients, and meta-optimizerdata.pydataclasses and dataloaderdecomposition.pydecompose MPS to PQC by Yuki Sato @yksatextension.pyfunctions for extending the decomposed circuitmps.pytrain MPS by @congzlwagqcbm.pytrain QCBM using qiskitsetup.pysetup the whole simulation from config including pretrainingutils.pygeneral utility functions and plotting
Running a single simulation based on current config file src/conf/config.yaml
python -m srcResults will be saved in outputs/
Running multiple simulations sequentially based on same config file but changing config parameters e.g. the extension method
python -m src --multirun extension=none,metric_based,all_to_allImportant for running simulations with random extension is changing the random_seed, which is somehow fixed when using multirun from hydra
python -m src --multirun random_seed=42,43,44,45,46Results will be saved in multirun/
pytest src/tests
pytest --cov=src[1] Mathis Makarski, Jumpei Kato, Yuki Sato, Naoki Yamamoto, Circuit Design based on Feature Similarity for Quantum Generative Modeling, arXiv preprint (2025)