qml-qcgnn

Jet Discrimination with Quantum Complete Graph Neural Network

https://github.com/maplexgitx0302/qml-qcgnn

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 6 DOI reference(s) in README
  • Academic publication links
    Links to: arxiv.org, aps.org, zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.5%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Jet Discrimination with Quantum Complete Graph Neural Network

Basic Info
  • Host: GitHub
  • Owner: maplexgitx0302
  • License: mit
  • Language: Jupyter Notebook
  • Default Branch: main
  • Homepage:
  • Size: 24.6 MB
Statistics
  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 2 years ago · Last pushed about 1 year ago
Metadata Files
Readme License Citation

README.md

Jet Discrimination with Quantum Complete Graph Neural Network

DOI

This repository contains the source code for the paper arXiv:2403.04990. The primary script for training the models is located in main.ipynb, with supplementary modules available in the source/ directory. Notebooks related to IBMQ are prefixed with 'ibmq', and the training results using simulators can be found in `trainingresult.ipynb`.


Installation

Environment Setup via setup.py

The primary training workflow relies on PyTorch and PennyLane. Python 3.9 or newer is required. To install the necessary packages, execute the following commands:

```bash

Install using setup.py

pip install .

Optional cleanup

rm -rf build QCGNN.egg-info ```

Note: Ensure that the PennyLane version is 0.31.0 or later due to an issue with qml.qnn.TorchLayer (see this discussion for more details).

Jupyter Environment (Optional)

Most of the Python scripts are written in Jupyter Notebook format (.ipynb). If you prefer to run them as traditional Python scripts (.py), you can convert the notebooks using the ipynb-py-convert package:

```bash

Convert notebook to Python script

pip install ipynb-py-convert ipynb-py-convert somenotebookfile.ipynb topyfile.py python topyfile.py ```


Datasets

The feasibility of each model is demonstrated using two different Monte Carlo datasets, both containing particle flow information of fatjets (R = 0.8) initiated by different particles. The datasets can be downloaded from the following sources:

  • JetNet Dataset: This dataset is used for the multi-class classification task, featuring fatjets with roughly 1 TeV transverse momentum originating from gluons, light quarks, top quarks, W bosons, and Z bosons. For more details, refer to arXiv:2106.11535. Place the downloaded hdf5 files in the dataset/jetnet directory.

  • Top Quark Tagging Dataset: This dataset is used for the binary classification task, with fatjet momentum in the range [550, 650] GeV. Place the downloaded hdf5 files in the dataset/top directory, and rename val.h5 to valid.h5.


Models

The workflow of MPGNN and QCGNN is given by the following figure. For details, see Section III B of the paper. Figure

The QCGNN model is implemented using PennyLane within the PyTorch framework, and can be found in source/models/qcgnn.py. The classical benchmarking models include:

Pretrained Checkpoints and Training Logs

Pretrained checkpoints and training logs for each model are available in the training_logs folder on Google Drive - QCGNN. We use Wandb for monitoring the training process, so the main training logs are stored in training_logs/WanbdLogger. To run training_result.ipynb, ensure the training_logs directory is located at the cloned repository.

IBMQ Results

The results of experiments conducted on IBMQ quantum computers, including metrics such as AUC and accuracy, are stored in the ibmq_result folder on Google Drive - QCGNN. The calibrations of the QPUs we used are provided in the CSV files at ibmq_result.

  • ibmq_result/time_complexity: Output of ibmq_time_complexity.ipynb, which measures the time required to operate quantum gates.
  • ibmq_result/pretrained: Output of ibmq_pretrained.ipynb, which evaluates the performance of the pretrained QCGNN (trained using simulators) on actual IBMQ quantum devices.
  • ibmq_result/noise: Output of ibmq_noise.ipynb, detailing metrics when executing QCGNN simulators with varying noise levels.

Citation

If you use this repository in your research, please cite the following paper:

Chen, Yi-An and Chen, Kai-Feng,
"Jet discrimination with a quantum complete graph neural network,"
Phys. Rev. D, 111, 016020 (2025).
DOI:10.1103/PhysRevD.111.016020

You can use the following BibTeX entry:

bibtex @article{PhysRevD.111.016020, title = {Jet discrimination with a quantum complete graph neural network}, author = {Chen, Yi-An and Chen, Kai-Feng}, journal = {Phys. Rev. D}, volume = {111}, issue = {1}, pages = {016020}, numpages = {15}, year = {2025}, month = {Jan}, publisher = {American Physical Society}, doi = {10.1103/PhysRevD.111.016020}, url = {https://link.aps.org/doi/10.1103/PhysRevD.111.016020} }


Acknowledgements

The Particle Transformer (ParT) and Particle Net (PNet) models were provided by You-Ying Li and Zheng-Gang Chen. They were adapted from Particle Transformer for Jet Tagging and ParticleNet: Jet Tagging via Particle Clouds, respectively.

Owner

  • Name: Yi-An, Chen
  • Login: maplexgitx0302
  • Kind: user
  • Company: NTU-Phys

Citation (CITATION.cff)

cff-version: 1.2.1
message: "This is the citation file for the QCGNN repository."
authors:
- family-names: "Chen"
  given-names: "Yi-An"
  orcid: "https://orcid.org/0009-0007-9228-0853"
- family-names: "Chen"
  given-names: "Kai-Feng"
  orcid: "https://orcid.org/0000-0003-1304-3782"
title: "GitHub for QCGNN"
version: 2.0.1
doi: 10.5281/zenodo.14504715
date-released: 2024-08-11
url: "https://github.com/NTUHEP-QML/QCGNN"

references:
  - type: article
    title: "Jet discrimination with a quantum complete graph neural network"
    authors:
      - family-names: "Chen"
        given-names: "Yi-An"
      - family-names: "Chen"
        given-names: "Kai-Feng"
    journal: "Phys. Rev. D"
    volume: "111"
    issue: "1"
    pages: "016020"
    year: "2025"
    month: "01"
    doi: "10.1103/PhysRevD.111.016020"
    url: "https://link.aps.org/doi/10.1103/PhysRevD.111.016020"

GitHub Events

Total
  • Push event: 3
Last Year
  • Push event: 3

Dependencies

setup.py pypi
  • Common *
  • HEP *
  • ML *
  • Machine *
  • awkward *
  • gdown *
  • h5py *
  • lightning *
  • matplotlib *
  • numpy *
  • pandas *
  • pennylane *
  • pennylane-qiskit *
  • scikit-learn *
  • seaborn *
  • torch *
  • torch_geometric *
  • uproot *
  • wandb *