Skip to main content
GitHub Actions Documentation Status PyPI - Project MIT License

This Python package implements quantum decision tree classifiers for binary data. The details of the method can be found in Representation of binary classification trees with binary features by quantum circuits.

Title

Installation

Install via pip or clone this repository. In order to use pip, type:

$ pip install quantum-tree

🌳 Usage

Minimal working example:

# create quantum tree instance
from qtree.qtree import QTree
qtree = QTree(max_depth=1)

# create simple training data
import numpy as np
X = np.array([[1,0,0], [0,1,0], [0,0,1]]) # features
y = np.array([[0,0], [0,1], [1,1]])       # labels

# fit quantum tree
qtree.fit(X, y)

# make quantum tree prediction
qtree.predict([[0,0,1]])

Documentation

Documentation is available on https://qtree.readthedocs.io/en/latest.

Demo notebooks can be found in the examples/ directory.

📖 Citation

If you find this code useful in your research, please consider citing Representation of binary classification trees with binary features by quantum circuits:

@article{Heese2022representationof,
         doi = {10.22331/q-2022-03-30-676},
         url = {https://doi.org/10.22331/q-2022-03-30-676},
         title = {Representation of binary classification trees with binary features by quantum circuits},
         author = {Heese, Raoul and Bickert, Patricia and Niederle, Astrid Elisa},
         journal = {{Quantum}},
         issn = {2521-327X},
         publisher = {{Verein zur F{\"{o}}rderung des Open Access Publizierens in den Quantenwissenschaften}},
         volume = {6},
         pages = {676},
         month = {3},
         year = {2022}
        }

This project is currently not under development and is not actively maintained.

Release files for quantum-tree 1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for quantum-tree 1.2
File Size Uploaded
quantum-tree-1.2.tar.gz 28.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for quantum-tree 1.2
File Interpreter ABI Platform
quantum_tree-1.2-py3-none-any.whl Python 3 none any Details

Total release size: 56.8 kB

Release files / quantum-tree-1.2.tar.gz

Download URL quantum-tree-1.2.tar.gz
Size 28.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e1223478ae80445aa744b1c390b94b052359fc1495325ba7d3ef83b2ca490340
BLAKE2b-256 checksum
How to use checksums
7f7a732d48721f21c1d10c40120be6247ae510e8aa0ede507c40cf4a0aaa8d19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release files / quantum_tree-1.2-py3-none-any.whl

Download URL quantum_tree-1.2-py3-none-any.whl
Size 28.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6a4728a9b7bbf81ea7cb12a03f78582a430e25a991bc8721d70d70db964378ea
BLAKE2b-256 checksum
How to use checksums
fc1086ba622557d89eb1f2d55ba4550a1363af4b40dc1a5dbcb74ba864a1304d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release history Release notifications | RSS feed

This release

1.2 This release

2 release files

1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page