Skip to content

positivetechnologylab/Quorus

Repository files navigation

Layerwise Federated Learning for Heterogeneous Quantum Clients using Quorus

Overview

This repository provides an open-source, flexible package for federated learning using quantum clients with heterogenous quantum models.

Key Features

  1. Provides a ready-to-use executable file that can be configured by supplying your own .jsonc file.
  2. No outside FL packages are used in this repository. The FL framework is implemented from scratch (although heavily uses Pennylane for quantum circuit evaluation/gradient computation, and PyTorch for gradient calculation).

The package can also be adapted adapted by injecting your own functions from src/quorus/cli/qfl_main_test.py.

Usage

  1. In your terminal, run git clone https://github.com/positivetechnologylab/quorus.git to clone the repository.
  2. Run cd quorus.
  3. Create a virtual environment if necessary (our code uses Python 3.12.8), and run python -m pip install -e . to install the quorus package. (Alternatively, you can skip steps 1-3 and run pip install quorus).
  4. Run quorus-exp --config <path_to_config_jsonc>.
  5. The results will be stored in a generated log folder.

Configurations

Please see json_configs for example configuration files to pass in. In a future version, we hope to add more complete documentation on the configurations.

Requirements

The requirements and specific versions are provided in pyproject.toml. In future versions of this package, we hope to make these requirements more loose (for now, we provide the specific versions that were used in our experiments.) src/quorus/cli/ibm_hardware_runs.py require a variable "IBMQ_TOKEN" and "IBMQ_CRN" in a .env file to connect to the IBM Quantum Cloud. In a future work, we hope to include the hardware runs as an easy-to-use executable.

Side Effects

The scripts will create folders containing the logs for each experiment. In addition, .pkl files may be created (for debugging).

Repository Structure

Future Work

In a future version, we hope to add unit and integration tests and integrate with a CI/CD pipeline for automated deployment.

Copyright

Copyright © 2025 Positive Technology Lab. All rights reserved. For permissions, contact ptl@rice.edu.

About

A package for federated learning across heterogenous quantum clients

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages