{"id":25636300,"url":"https://github.com/pasqal-io/quantum-evolution-kernel","last_synced_at":"2025-04-08T03:20:24.883Z","repository":{"id":271744804,"uuid":"900875605","full_name":"pasqal-io/quantum-evolution-kernel","owner":"pasqal-io","description":"A Graph Machine Learning library using Quantum Computing","archived":false,"fork":false,"pushed_at":"2025-04-04T13:21:48.000Z","size":3457,"stargazers_count":46,"open_issues_count":5,"forks_count":5,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-04T14:26:49.851Z","etag":null,"topics":["graph-machine-learning","graphs","machine-learning","molecule","quantum-computing"],"latest_commit_sha":null,"homepage":"https://pasqal-io.github.io/quantum-evolution-kernel/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pasqal-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/contributing/first contact.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-09T16:23:29.000Z","updated_at":"2025-04-01T08:17:02.000Z","dependencies_parsed_at":"2025-01-09T16:56:34.557Z","dependency_job_id":"ae32834b-84e4-42b7-a4a3-2bc56d884920","html_url":"https://github.com/pasqal-io/quantum-evolution-kernel","commit_stats":null,"previous_names":["pasqal-io/quantum-evolution-kernel"],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pasqal-io%2Fquantum-evolution-kernel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pasqal-io%2Fquantum-evolution-kernel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pasqal-io%2Fquantum-evolution-kernel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pasqal-io%2Fquantum-evolution-kernel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pasqal-io","download_url":"https://codeload.github.com/pasqal-io/quantum-evolution-kernel/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247194809,"owners_count":20899566,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["graph-machine-learning","graphs","machine-learning","molecule","quantum-computing"],"created_at":"2025-02-23T00:41:29.500Z","updated_at":"2025-04-08T03:20:24.876Z","avatar_url":"https://github.com/pasqal-io.png","language":"Python","readme":"[![PyPI version](https://badge.fury.io/py/quantum-evolution-kernel.svg)](https://pypi.org/project/quantum-evolution-kernel/)\n[![Tests](https://github.com/pasqal-io/quantum-evolution-kernel/actions/workflows/test.yml/badge.svg)](https://github.com/pasqal-io/quantum-evolution-kernel/actions/workflows/test.yml)\n![Coverage](https://img.shields.io/codecov/c/github/pasqal-io/quantum-evolution-kernel?style=flat-square)\n\n# Quantum Evolution Kernel\n\n\nThe 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.\n\nThe 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](https://journals.aps.org/pra/abstract/10.1103/PhysRevA.107.042615), [arXiv](https://arxiv.org/abs/2107.03247)).\n\nUsers 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.\n\n## Installation\n\n### Using `hatch`, `uv` or any pyproject-compatible Python manager\n\nEdit file `pyproject.toml` to add the line\n\n```\n  \"quantum-evolution-kernel\"\n```\n\nto the list of `dependencies`.\n\n### Using `pip` or `pipx`\nTo install the `pipy` package using `pip` or `pipx`\n\n1. Create a `venv` if that's not done yet\n\n```sh\n$ python -m venv venv\n\n```\n\n2. Enter the venv\n\n```sh\n$ . venv/bin/activate\n```\n\n3. Install the package\n\n```sh\n$ pip install quantum-evolution-kernel\n# or\n$ pipx install quantum-evolution-kernel\n```\n\n## QuickStart\n\n```python\n# Load a dataset\nimport torch_geometric.datasets as pyg_dataset\nog_ptcfm = pyg_dataset.TUDataset(root=\"dataset\", name=\"PTC_FM\")\n\n# Setup a quantum feature extractor for this dataset.\n# In this example, we'll use QutipExtractor, to emulate a Quantum Device on our machine.\nimport qek.data.graphs as qek_graphs\nimport qek.data.extractors as qek_extractors\nextractor = qek_extractors.QutipExtractor(compiler=qek_graphs.PTCFMCompiler())\n\n# Add the graphs, compile them and look at the results.\nextractor.add_graphs(graphs=og_ptcfm)\nextractor.compile()\nprocessed_dataset = extractor.run().processed_data\n\n# Prepare a machine learning pipeline with Scikit Learn.\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.svm import SVC\n\nX = [data for data in processed_dataset]  # Features\ny = [data.target for data in processed_dataset]  # Targets\nX_train, X_test, y_train, y_test = train_test_split(X, y, stratify = y, test_size=0.2, random_state=42)\n\n# Train a kernel\nfrom qek.kernel import QuantumEvolutionKernel as QEK\nkernel = QEK(mu=0.5)\nmodel = SVC(kernel=kernel, random_state=42)\nmodel.fit(X_train, y_train)\n```\n\n## Documentation\n\nWe have a two parts tutorial:\n\n1. [Using a Quantum Device to extract machine-learning features](https://pasqal-io.github.io/quantum-evolution-kernel/v0.3.1/tutorial%201%20-%20Using%20a%20Quantum%20Device%20to%20Extract%20Machine-Learning%20Features);\n2. [Machine Learning with the Quantum Evolution Kernel](https://pasqal-io.github.io/quantum-evolution-kernel/v0.3.1/tutorial%202%20-%20Machine-Learning%20with%20the%20Quantum%20EvolutionKernel/)\n\nSee also the [full API documentation](https://pasqal-io.github.io/quantum-evolution-kernel/v0.3.1/).\n\n## Getting in touch\n\n- [Pasqal Community Portal](https://community.pasqal.com/) (forums, chat, tutorials, examples, code library).\n- [GitHub Repository](https://github.com/pasqal-io/quantum-evolution-kernel) (source code, issue tracker).\n- [Professional Support](https://www.pasqal.com/contact-us/) (if you need tech support, custom licenses, a variant of this library optimized for your workload, your own QPU, remote access to a QPU, ...)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpasqal-io%2Fquantum-evolution-kernel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpasqal-io%2Fquantum-evolution-kernel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpasqal-io%2Fquantum-evolution-kernel/lists"}