Skip to content

Quantum Variational Autoencoder for Calorimeter Simulation

License

Notifications You must be signed in to change notification settings

QaloSim/CaloQVAE

Repository files navigation

CaloQVAE

Quantum VAEs for Calorimeter shower generation

  • ...

Overview

Repository Structure

Directory Content
configs/ Configuration files
data/ Data manager and loader
engine/ Training loops.
models/ Core module, includes definitions of all models.
notebooks/ Standalone experimentation notebooks.
paper/ Notebook to generate figures reported in CaloDVAE
sandbox/ Collection of test scripts and standalone models.
scripts/ Steering scripts includes one to run - run.py
utils/ Helper functionalities for core modules (plotting etc.)

Input Data

Dataset Location
MNIST retrieved through torchvision
Calorimeter Data (GEANT4 showers, ⟂ to center) DOI

Setup

git clone [email protected]:QaloSim/CaloQVAE.git
cd CaloQVAE

Installation

Via Virtual Environment and pip

Initial package setup:

python3 -m venv venv_divae
source source.me
python3 -m pip install -r requirements.txt

After Installation

After the initial setup, simply navigate to the package directory and run

source source.me

Sources the virtual environment and appends to PYTHONPATH.

How To...

...configure models

We're currently using Hydra for config management. The top-level file is config.yaml. For more info on Hydra, click here

...run models

python scripts/run.py

... run with Slurm submission

It is possible to run on computing clusters with the Slrum submission engine. Hydra has a built-in plugin interfacing the library submitit. It is important to use these dependencies:

hydra-core==1.1.0
hydra-submitit-launcher==1.1.5
submitit @ https://github.com/facebookincubator/submitit/archive/refs/tags/1.3.0.tar.gz

as the default PyPI version does not work on Cedar. A first script is added in the scripts/ directory and a great starting point. To utitlise the batch submission, simply add the --multirun flag to your command line and specify which parameter to loop over like so:

python scripts/runSlurm.py --multirun config.myopt=1,2 

Technical note

When running on the TRIUMF ml machine, DISPLAY variable must be unset (it can be set by forwarding X11 when creating the ssh session), as it creates an unwanted dependency with a QT library.

References

[1] Jason Rolfe, Discrete Variational Autoencoders, http://arxiv.org/abs/1609.02200

[2] M. Paganini (@mickypaganini), L. de Oliveira (@lukedeo), B. Nachman (@bnachman), CaloGAN: Simulating 3D High Energy Particle Showers in Multi-Layer Electromagnetic Calorimeters with Generative Adversarial Networks [arXiv:1705.02355].

About

Quantum Variational Autoencoder for Calorimeter Simulation

Resources

License

Stars

Watchers

Forks

Packages

No packages published