Metadata-Version: 2.4
Name: bilinear-quantum
Version: 2.0.0rc2
Summary: TensorFlow and Cirq toolkit for exact and deep Bilinear Quantum Learning
Author-email: Nguyen Minh Tuan <minhtuan@ptit.edu.vn>, Bui Phi Hung <n23dcat028@student.ptithcm.edu.vn>
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/Thien-y1502/bilinear-quantum
Project-URL: Documentation, https://github.com/Thien-y1502/bilinear-quantum/tree/main/docs
Project-URL: Repository, https://github.com/Thien-y1502/bilinear-quantum
Project-URL: Issues, https://github.com/Thien-y1502/bilinear-quantum/issues
Project-URL: Changelog, https://github.com/Thien-y1502/bilinear-quantum/blob/main/CHANGELOG.md
Project-URL: PyPI, https://pypi.org/project/bilinear-quantum/
Keywords: bilinear learning,Hirota bilinear operator,quantum machine learning,TensorFlow Quantum
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Python: <3.14,>=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy<2.6,>=2
Requires-Dist: scipy<1.19,>=1.15
Requires-Dist: sympy<2,>=1.14
Requires-Dist: pandas<3.1,>=2.3
Requires-Dist: scikit-learn<2,>=1.8
Requires-Dist: packaging<27,>=25
Requires-Dist: PyYAML<7,>=6
Requires-Dist: psutil<8,>=7
Provides-Extra: tensorflow
Requires-Dist: tensorflow==2.21.0; extra == "tensorflow"
Requires-Dist: keras==3.15.1; extra == "tensorflow"
Provides-Extra: cirq
Requires-Dist: cirq-core==1.7.0; extra == "cirq"
Requires-Dist: cirq-google==1.7.0; extra == "cirq"
Provides-Extra: experiments
Requires-Dist: matplotlib<4,>=3.11; extra == "experiments"
Requires-Dist: seaborn<1,>=0.13; extra == "experiments"
Requires-Dist: statsmodels<1,>=0.15; extra == "experiments"
Provides-Extra: full
Requires-Dist: tensorflow==2.21.0; extra == "full"
Requires-Dist: keras==3.15.1; extra == "full"
Requires-Dist: cirq-core==1.7.0; extra == "full"
Requires-Dist: cirq-google==1.7.0; extra == "full"
Requires-Dist: matplotlib<4,>=3.11; extra == "full"
Requires-Dist: seaborn<1,>=0.13; extra == "full"
Requires-Dist: statsmodels<1,>=0.15; extra == "full"
Provides-Extra: tfq-legacy
Requires-Dist: numpy==2.0.2; python_version < "3.13" and extra == "tfq-legacy"
Requires-Dist: scipy==1.15.3; python_version < "3.13" and extra == "tfq-legacy"
Requires-Dist: sympy==1.14.0; python_version < "3.13" and extra == "tfq-legacy"
Requires-Dist: tensorflow==2.18.1; python_version < "3.13" and extra == "tfq-legacy"
Requires-Dist: tf-keras==2.18.0; python_version < "3.13" and extra == "tfq-legacy"
Requires-Dist: tensorflow-quantum==0.7.6; python_version < "3.13" and extra == "tfq-legacy"
Requires-Dist: cirq-core==1.5.0; python_version < "3.13" and extra == "tfq-legacy"
Requires-Dist: cirq-google==1.5.0; python_version < "3.13" and extra == "tfq-legacy"
Requires-Dist: jax==0.5.3; python_version < "3.13" and extra == "tfq-legacy"
Requires-Dist: contourpy==1.3.2; python_version < "3.13" and extra == "tfq-legacy"
Provides-Extra: dev
Requires-Dist: build<2,>=1.2; extra == "dev"
Requires-Dist: pytest<9,>=8.4; extra == "dev"
Requires-Dist: pytest-cov<7,>=6; extra == "dev"
Requires-Dist: ruff<1,>=0.12; extra == "dev"
Requires-Dist: twine<7,>=6; extra == "dev"
Dynamic: license-file

# Bilinear Quantum Learning

[![PyPI](https://img.shields.io/pypi/v/bilinear-quantum.svg)](https://pypi.org/project/bilinear-quantum/)
[![Python 3.12–3.13](https://img.shields.io/badge/python-3.12%E2%80%933.13-blue.svg)](https://www.python.org/downloads/)
[![License](https://img.shields.io/badge/license-Apache--2.0-green.svg)](LICENSE)
[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Thien-y1502/bilinear-quantum/blob/main/notebooks/Bilinear_Quantum_Colab_Quickstart.ipynb)

`bilinear-quantum` is a TensorFlow/Keras and Cirq toolkit for Bilinear Quantum
Learning (BQL), Hirota Quantum Bilinear Learning (HQBL), and the experimental
Deep-BQL model family.

This repository is the public documentation, examples, citation, and issue
tracker for the project. Version 2.x is distributed as CPython-version-specific
sourceless wheels through PyPI. Private training registries, tuning records,
data, checkpoints, and implementation source are not hosted in this branch.
The historical v1.0.1 tag contains an older public reference implementation;
it is not the Deep-BQL 2.x implementation.

## Install

Python 3.12 or 3.13:

```bash
python -m pip install --pre "bilinear-quantum[full]==2.0.0rc2"
```

```python
import bilinear_quantum as bq
from bilinear_quantum.layers import DeepBilinearQuantumLayer

print(bq.__version__)
```

TensorFlow Quantum 0.7.6 is not silently emulated on Python 3.13. TFQ remains
an independent Python 3.12 verification route; the modern public runtime uses
TensorFlow 2.21, Keras 3.15, and Cirq 1.7.

## Colab

Use the [clean Run-All notebook](notebooks/Bilinear_Quantum_Colab_Quickstart.ipynb).
It installs the package directly from PyPI and checks the exact BQL fallback,
Deep-BQL layer execution, gradients, serialization, and circuit resources.
The notebook is a software validation, not evidence of SOTA performance or
quantum advantage.

## Public API

- Exact BQL mathematics and low-rank factorization
- Keras 3 `BilinearQuantumLayer`, `HirotaBilinearLayer`, and
  `DeepBilinearQuantumLayer`
- Deep-BQL model builder and circuit-resource accounting
- Cirq circuit construction and parity routes
- Adam/AdamW, L-BFGS-B, and seeded SPSA optimizer interfaces
- Backend capability and environment reporting

See [API.md](docs/API.md) and [COLAB.md](docs/COLAB.md).

## Scientific boundary

The software provides testable implementations. Availability on PyPI, circuit
simulation, parameter count, or a successful Colab run does not by itself
establish state-of-the-art accuracy or computational quantum advantage. Such
claims require preregistered multi-dataset comparisons, uncertainty estimates,
ablations, resource accounting, and preservation of negative results.

## Citation and contact

Citation metadata is in [CITATION.cff](CITATION.cff).

- Nguyen Minh Tuan — `minhtuan@ptit.edu.vn`
- Bui Phi Hung — `n23dcat028@student.ptithcm.edu.vn`
- Faculty of Information Technology, Posts and Telecommunications Institute of
  Technology, Ho Chi Minh City, Vietnam

## License

The distributed software is licensed under the [Apache License 2.0](LICENSE).
Third-party dependencies retain their own licenses.
