Skip to content

qismib/QuaKe

Repository files navigation

QuaKe

QuaKe: quantum kernel classifier for neutrino physics applications

Installation

⚠️ Note: the use of a virtual environment with Python 3.9 is strongly recommended.

The package can be installed with Python's pip package manager.

git clone https://github.com/qismib/QuaKe.git
cd QuaKe
pip install .[MODE]

The last command allows to install the quake program into the environment python path.

⚠️ Note: install the appropriate TensorFlow distribution

quake assumes that the user has already installed the most optimized version of TensorFlow for his platform. As such, by default, pip will not check it as a requirement.

However, the user can also install it specifying a MODE option in the pip command. The list below summarizes the valid choices for the MODE flag:

  • tf: installs the tensorflow package
  • tf-cpu: installs the tensorflow-cpu package
  • tf-gpu: installs the tensorflow-gpu package
  • tf-amd: installs the tensorflow-rocm package

Running the code

In order to launch the code

quake <subcommand> [options]

Valid subcommands are: datagen | train.
Use quake <subcommand> --help to print the correspondent help message.
For example, the help message for datagen subcommand is:

$ quake datagen --help
usage: quake datagen [-h] [--output OUTPUT] [--force] [--show] runcard

generate voxelized dataset from root files

positional arguments:
  runcard               the input folder

optional arguments:
  -h, --help            show this help message and exit
  --output OUTPUT, -o OUTPUT
                        the output folder
  --force               overwrite existing files if present
  --show                show a track visual example

Configuration cards

Models' parameter settings are stored in yaml files. The cards folder contains some examples.

Data generation

Extracts histograms from 3D simulated energy depositions.

quake datagen <runcard.yaml> --output <output folder> [--force]

The .yaml runcard should store the path to dataset folder containing .root files and the bin widths setting the histogram resolution.

An equivalent runcard is copied to the output folder in order to pass settings to subsequent steps of the pipeline.

Model training

Train a model on data extracted in folder.

quake train <folder> --model <modeltype>

About

QuaKe: quantum kernel classifier for neutrino physics applications

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages