A framework for quantum federated learning across heterogeneous quantum clients
Project description
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
- Provides a ready-to-use executable file that can be configured by supplying your own
.jsoncfile. - 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
- In your terminal, run
git clone https://github.com/positivetechnologylab/quorus.gitto clone the repository. - Run
cd quorus. - Create a virtual environment if necessary (our code uses Python 3.12.8), and run
python -m pip install -e .to install thequoruspackage. - Run
quorus-exp --config <path_to_config_jsonc>. - 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
README.md: Repository readme with setup and execution instructions.src: Contains the source code for the repository.pyproject.toml: The .toml file for the repository.json_configs: Sample .jsonc configuration files to use. Please refer to these when writing your own configurations. In a future version, we hope to provide more robust input validation..gitignore: Gitignore for the repository. By default, the generated log folders will be ignored by git (as they can be quite large).initial_configs_5cli_128tr_3000test_10_1_11_2_12_3_13_4_14_5: The initial parameters, as well as training/testing data, for where one client has 1 layer, one client has 2 layers, one has 3, one has 4, and one has 5.initial_configs_5cli_128tr_3000test_10_2_11_2_12_2_13_2_14_2: The initial parameters, as well as training/testing data, for where all clients have 2 layers.initial_configs_5cli_128tr_3000test_10_2_11_3_12_4_13_5_14_6: The initial parameters, as well as training/testing data, for where one client has 2 layers, one client has 3 layers, one has 4, one has 5, and one has 6.initial_configs_5cli_128tr_3000test_10_2_11_4_12_6_13_8_14_10: The initial parameters, as well as training/testing data, for where one client has 2 layers, one client has 4 layers, one has 6, one has 8, and one has 10.
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file quorus-0.1.0.tar.gz.
File metadata
- Download URL: quorus-0.1.0.tar.gz
- Upload date:
- Size: 124.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41cecd981000d2210c35f436ed569b58da60953733586b0ea545b82ec6eff7a5
|
|
| MD5 |
b2dcfa9c0a960a2371dbe7d8b37c42a1
|
|
| BLAKE2b-256 |
2227d234b21146c2ebe0d222708a180c0a45f33350c1112b0560ef5d74485ddf
|
Provenance
The following attestation bundles were made for quorus-0.1.0.tar.gz:
Publisher:
pypi-publish.yml on positivetechnologylab/Quorus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quorus-0.1.0.tar.gz -
Subject digest:
41cecd981000d2210c35f436ed569b58da60953733586b0ea545b82ec6eff7a5 - Sigstore transparency entry: 565895534
- Sigstore integration time:
-
Permalink:
positivetechnologylab/Quorus@e02a84133d90c85bdfca272f59a977e10f21ed93 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/positivetechnologylab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@e02a84133d90c85bdfca272f59a977e10f21ed93 -
Trigger Event:
push
-
Statement type:
File details
Details for the file quorus-0.1.0-py3-none-any.whl.
File metadata
- Download URL: quorus-0.1.0-py3-none-any.whl
- Upload date:
- Size: 175.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc8d1802ac1711e817ca24f2852e20a54601ad8ba85d59c42f48a3c4c57990b1
|
|
| MD5 |
a778b8a774bde41fe3a04e62fb347283
|
|
| BLAKE2b-256 |
78e9ab0b19457def65bbc0dbc298f7ffe410d1f8e6f6a36495e05d0def5da376
|
Provenance
The following attestation bundles were made for quorus-0.1.0-py3-none-any.whl:
Publisher:
pypi-publish.yml on positivetechnologylab/Quorus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quorus-0.1.0-py3-none-any.whl -
Subject digest:
dc8d1802ac1711e817ca24f2852e20a54601ad8ba85d59c42f48a3c4c57990b1 - Sigstore transparency entry: 565895547
- Sigstore integration time:
-
Permalink:
positivetechnologylab/Quorus@e02a84133d90c85bdfca272f59a977e10f21ed93 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/positivetechnologylab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@e02a84133d90c85bdfca272f59a977e10f21ed93 -
Trigger Event:
push
-
Statement type: