Skip to main content

Quantum decision trees with binary features and binary classes

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quantum-tree-1.2.tar.gz (28.5 kB view details)

Uploaded Source

Built Distribution

quantum_tree-1.2-py3-none-any.whl (28.3 kB view details)

Uploaded Python 3

File details

Details for the file quantum-tree-1.2.tar.gz.

File metadata

  • Download URL: quantum-tree-1.2.tar.gz
  • Upload date:
  • Size: 28.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for quantum-tree-1.2.tar.gz
Algorithm Hash digest
SHA256 e1223478ae80445aa744b1c390b94b052359fc1495325ba7d3ef83b2ca490340
MD5 2d77eae0ab48cfe1aa13753936945f01
BLAKE2b-256 7f7a732d48721f21c1d10c40120be6247ae510e8aa0ede507c40cf4a0aaa8d19

See more details on using hashes here.

File details

Details for the file quantum_tree-1.2-py3-none-any.whl.

File metadata

  • Download URL: quantum_tree-1.2-py3-none-any.whl
  • Upload date:
  • Size: 28.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for quantum_tree-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6a4728a9b7bbf81ea7cb12a03f78582a430e25a991bc8721d70d70db964378ea
MD5 50487c7c139066eb7a479855a6e930a2
BLAKE2b-256 fc1086ba622557d89eb1f2d55ba4550a1363af4b40dc1a5dbcb74ba864a1304d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page