quantum-evolution-kernel

A Graph Machine Learning library using Quantum Computing

https://github.com/pasqal-io/quantum-evolution-kernel

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 1 DOI reference(s) in README
  • Academic publication links
    Links to: arxiv.org, aps.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.2%) to scientific vocabulary

Keywords

graph-machine-learning graphs machine-learning molecule quantum-computing
Last synced: 6 months ago · JSON representation ·

Repository

A Graph Machine Learning library using Quantum Computing

Basic Info
Statistics
  • Stars: 54
  • Watchers: 7
  • Forks: 9
  • Open Issues: 5
  • Releases: 20
Topics
graph-machine-learning graphs machine-learning molecule quantum-computing
Created about 1 year ago · Last pushed 6 months ago
Metadata Files
Readme Contributing License Citation

README.md

PyPI version Tests Coverage

Quantum Evolution Kernel

The Quantum Evolution Kernel is a Python library designed for the machine learning community to help users design quantum-driven similarity metrics for graphs and to use them inside kernel-based machine learning algorithms for graph data.

The core of the library is focused on the development of a classification algorithm for molecular-graph dataset as it is presented in the published paper Quantum feature maps for graph machine learning on a neutral atom quantum processor(Journal Paper, arXiv).

Users setting their first steps into quantum computing will learn how to implement the core algorithm in a few simple steps and run it using the Pasqal Neutral Atom QPU. More experienced users will find this library to provide the right environment to explore new ideas - both in terms of methodologies and data domain - while always interacting with a simple and intuitive QPU interface.

Installation

Using hatch, uv or any pyproject-compatible Python manager

Edit file pyproject.toml to add the line

"quantum-evolution-kernel"

to the list of dependencies.

Using pip or pipx

To install the pipy package using pip or pipx

  1. Create a venv if that's not done yet

```sh $ python -m venv venv

```

  1. Enter the venv

sh $ . venv/bin/activate

  1. Install the package

```sh $ pip install quantum-evolution-kernel

or

$ pipx install quantum-evolution-kernel ```

QuickStart

```python

Load a dataset

import torchgeometric.datasets as pygdataset ogptcfm = pygdataset.TUDataset(root="dataset", name="PTC_FM")

Setup a quantum feature extractor for this dataset.

In this example, we'll use QutipExtractor, to emulate a Quantum Device on our machine.

import qek.data.graphs as qekgraphs import qek.data.extractors as qekextractors extractor = qekextractors.QutipExtractor(compiler=qekgraphs.PTCFMCompiler())

Add the graphs, compile them and look at the results.

extractor.addgraphs(graphs=ogptcfm) extractor.compile() processeddataset = extractor.run().processeddata

Prepare a machine learning pipeline with Scikit Learn.

from sklearn.modelselection import traintest_split from sklearn.svm import SVC

X = [data for data in processeddataset] # Features y = [data.target for data in processeddataset] # Targets Xtrain, Xtest, ytrain, ytest = traintestsplit(X, y, stratify = y, testsize=0.2, randomstate=42)

Train a kernel

from qek.kernel import QuantumEvolutionKernel as QEK kernel = QEK(mu=0.5) model = SVC(kernel=kernel, randomstate=42) model.fit(Xtrain, y_train) ```

Documentation

We have a two parts tutorial:

  1. Using a Quantum Device to extract machine-learning features;
  2. Machine Learning with the Quantum Evolution Kernel

See also the full API documentation.

Getting in touch

Owner

  • Name: pasqal-io
  • Login: pasqal-io
  • Kind: organization

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: Quantum Evolution Kernel
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: David
    family-names: Teller
    email: david.teller@pasqal.com
    affiliation: Pasqal
  - given-names: Roland
    family-names: Guichard
    email: roland.guichard@pasqal.com
    affiliation: Pasqal
  - given-names: Manu
    family-names: Lahariya
    email: manu.lahariya@pasqal.com
    affiliation: Pasqal
repository-code: 'https://github.com/pasqal-io/quantum-evolution-kernel'
abstract: A Graph Machine Learning library using Quantum Computing
keywords:
  - quantum
  - graph machine learning
version: 0.3.2

GitHub Events

Total
  • Fork event: 7
  • Create event: 75
  • Issues event: 71
  • Release event: 16
  • Watch event: 47
  • Delete event: 57
  • Member event: 2
  • Issue comment event: 65
  • Push event: 220
  • Public event: 1
  • Pull request review event: 233
  • Pull request review comment event: 269
  • Pull request event: 108
Last Year
  • Fork event: 7
  • Create event: 75
  • Issues event: 71
  • Release event: 16
  • Watch event: 47
  • Delete event: 57
  • Member event: 2
  • Issue comment event: 65
  • Push event: 220
  • Public event: 1
  • Pull request review event: 233
  • Pull request review comment event: 269
  • Pull request event: 108

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 63
  • Total Committers: 6
  • Avg Commits per committer: 10.5
  • Development Distribution Score (DDS): 0.175
Past Year
  • Commits: 63
  • Committers: 6
  • Avg Commits per committer: 10.5
  • Development Distribution Score (DDS): 0.175
Top Committers
Name Email Commits
David Teller d****r@p****m 52
RolandMacDoland 9****d 5
mlahariya 4****a 3
MatthieuMoreau m****u@p****o 1
Benjamin Becquet b****t@g****m 1
lmoroml l****o@p****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 45
  • Total pull requests: 138
  • Average time to close issues: 11 days
  • Average time to close pull requests: 2 days
  • Total issue authors: 7
  • Total pull request authors: 6
  • Average comments per issue: 0.78
  • Average comments per pull request: 0.54
  • Merged pull requests: 116
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 45
  • Pull requests: 138
  • Average time to close issues: 11 days
  • Average time to close pull requests: 2 days
  • Issue authors: 7
  • Pull request authors: 6
  • Average comments per issue: 0.78
  • Average comments per pull request: 0.54
  • Merged pull requests: 116
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • Yoric (29)
  • mlahariya (7)
  • RolandMacDoland (5)
  • bbecquet (1)
  • jpmoutinho (1)
  • ferrulli1pasqal (1)
  • lmoroml (1)
Pull Request Authors
  • Yoric (115)
  • RolandMacDoland (12)
  • mlahariya (6)
  • bbecquet (2)
  • lmoroml (2)
  • MatthieuMoreau0 (1)
Top Labels
Issue Labels
documentation (10) enhancement (6) bug (6) testing (5) feature (2) release (1)
Pull Request Labels
release (6) infra (5) documentation (5) testing (4) bug (2) feature (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 57 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 12
  • Total maintainers: 1
pypi.org: quantum-evolution-kernel

A Python library designed for the machine learning community to help users design quantum-driven similarity metrics for graphs and to use them inside kernel-based machine learning algorithms for graph data.ide the right environment to explore new ideas - both in terms of methodologies and data domain - while always interacting with a simple and intuitive QPU interface.

  • Versions: 12
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 57 Last month
Rankings
Dependent packages count: 9.8%
Average: 32.4%
Dependent repos count: 55.1%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/lint.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
.github/workflows/test.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
  • actions/upload-artifact v4 composite
backup-repo.git/description cran
pyproject.toml pypi
  • matplotlib *
  • networkx *
  • numpy *
  • pulser ==1.1.1
  • rdkit *
  • scikit-learn *
  • torch *
  • torch_geometric *
  • tqdm *
setup.py pypi