Metadata-Version: 2.4
Name: bilinear-quantum
Version: 4.2.0
Summary: Public 34-task Bilinear Quantum Deep Learning API backed by the BQDL v5 simulator core
Author: Bilinear Quantum research team
License-Expression: LicenseRef-Proprietary-Research
Project-URL: Homepage, https://github.com/Thien-y1502/bilinear-quantum
Project-URL: Documentation, https://github.com/Thien-y1502/bilinear-quantum#readme
Project-URL: Repository, https://github.com/Thien-y1502/bilinear-quantum
Project-URL: Issues, https://github.com/Thien-y1502/bilinear-quantum/issues
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: numpy>=1.24
Requires-Dist: scikit-learn>=1.3
Requires-Dist: torch>=2.2
Provides-Extra: ml
Requires-Dist: scikit-learn>=1.3; extra == "ml"
Provides-Extra: sim
Requires-Dist: pennylane>=0.43; extra == "sim"
Requires-Dist: qiskit>=1.0; extra == "sim"
Requires-Dist: qiskit-aer>=0.14; extra == "sim"
Provides-Extra: ibm
Requires-Dist: qiskit>=1.0; extra == "ibm"
Requires-Dist: qiskit-ibm-runtime>=0.30; extra == "ibm"
Provides-Extra: qi
Requires-Dist: quantuminspire>=4.2; extra == "qi"
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == "dev"
Requires-Dist: pytest>=8; extra == "dev"

# Bilinear Quantum

`bilinear-quantum` provides a task-oriented API for Bilinear Quantum models.
The interface abstracts backend selection and numerical execution behind
consistent task constructors.

The package defines a 34-task interface. Provider and hardware integrations are
optional components and may evolve independently.

Version 4.2.0 wires all 34 constructors to the BQDL v5 two-register neural
simulator core. The task name selects only the loss/readout contract; angle
state preparation, cross-register entangling relation, and quantum observable
readout are shared internally. Provider-specific classes are not part of the
user-facing API.

The same release exposes the simulator-first neural namespace as `blq.nn` for
composing reusable BQDL v5 layers, blocks, networks, and task heads. This is a
Torch state-vector interface; it does not make a hardware or quantum-advantage
claim.

## Install

```bash
python -m pip install --upgrade bilinear-quantum
```

## Quick start

```python
import bilinear_quantum as blq

model = blq.classify(x_train, y_train)
prediction = model.predict(x_test)
report = model.evaluate(x_test, y_test)
print(report.summary())
```

Every task constructor accepts `data`, an optional `target`, and optional
keyword configuration. A fitted model provides `predict`, `evaluate`,
`summary`, `resources`, and `save`.

## APIs

| API | Typical use |
|---|---|
| `classify` | Single-label classification |
| `regress` | Continuous-value regression |
| `multilabel` | Multiple labels per sample |
| `cluster` | Unsupervised clustering |
| `embed` | Representation learning |
| `rank` | Ranking and ordered scoring |
| `retrieve` | Similarity retrieval |
| `recommend` | Recommendation scoring |
| `detect_objects` | Object detection |
| `segment_semantic` | Semantic segmentation |
| `segment_instances` | Instance segmentation |
| `estimate_pose` | Pose and keypoint estimation |
| `track_objects` | Object tracking |
| `denoise` | Noise reduction |
| `super_resolve` | Resolution enhancement |
| `inpaint` | Missing-region reconstruction |
| `forecast` | Future-value forecasting |
| `impute` | Missing-value imputation |
| `detect_anomalies` | Anomaly detection |
| `detect_events` | Event detection |
| `sequence_label` | Sequence labelling |
| `align_sequences` | Sequence alignment |
| `node_classify` | Graph node classification |
| `link_predict` | Graph link prediction |
| `graph_predict` | Graph prediction |
| `graph_match` | Graph matching |
| `fuse_modalities` | Multimodal fusion |
| `generate` | Generation tasks |
| `density_estimate` | Density estimation |
| `learn_dynamics` | Dynamical-system learning |
| `discover_operator` | Operator discovery |
| `solve_pde` | PDE solution/surrogate tasks |
| `optimize` | Optimization tasks |
| `learn_quantum_process` | Quantum-process learning |

For unsupervised tasks, omit the target:

```python
clusters = blq.cluster(x_train)
cluster_ids = clusters.predict(x_test)
```

Task-specific helpers are available where meaningful:

```python
generator = blq.generate(x_train)
samples = generator.sample(16)

optimizer = blq.optimize(candidates, objective_values)
best = optimizer.optimize()
```

## Backend selection

```python
with blq.runtime.use("aer", shots=128):
    model = blq.classify(x_train, y_train)
```

Optional provider dependencies:

```bash
python -m pip install "bilinear-quantum[sim]"  # PennyLane/Qiskit/Aer
python -m pip install "bilinear-quantum[ibm]"  # IBM Runtime
python -m pip install "bilinear-quantum[qi]"   # Quantum Inspire
```

The v5 wheel currently executes on CPU or CUDA state-vector simulation through
PyTorch. Hardware execution is not validated by this release; provider extras
remain an integration boundary and do not change the task-level API.

## Colab

```python
!python -m pip install -U bilinear-quantum
import bilinear_quantum as blq
print(blq.__version__)
```

Use a fresh runtime and identical preprocessing when comparing baselines.

## Scope and reproducibility

Algorithmic details, benchmark protocols, and validation artifacts should be
identified by the exact package version and corresponding release record when
results are reported. See [LICENSE](LICENSE) for distribution terms;
third-party dependencies retain their own licenses.
