Metadata-Version: 2.1
Name: qandle
Version: 0.0.2
Summary: QANDLE is a fast and simple quantum state-vector simulator for hybrid machine learning using the PyTorch library.
License: MIT
Author: Gerhard Stenzel
Author-email: gerhard.stenzel@ifi.lmu.de
Requires-Python: >=3.9,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: einops (==0.7)
Requires-Dist: networkx (>=3,<4)
Requires-Dist: qW-Map (>=0.1.2,<0.2.0)
Requires-Dist: torch (>=2.0,<3.0)
Description-Content-Type: text/markdown

# QANDLE
**QANDLE** is a fast and simple quantum state-vector simulator for hybrid machine learning using the PyTorch library.
Documentation and examples can be found in the [QANDLE documentation](https://gstenzel.github.io/qandle/).

## Installation
```bash
pip install qandle
```

## Usage
```python
import torch
import qandle

# Create a quantum circuit
circuit = qandle.Circuit(
    layers=[
        # embedding layer
        qandle.AngleEmbedding(num_qubits=2),
        # trainable layer, with random initialization
        qandle.RX(qubit=1),
        # trainable layer, with fixed initialization
        qandle.RY(qubit=0, theta=torch.tensor(0.2)),
        # data reuploading
        qandle.RX(qubit=0, name="data_reuploading"),
        # disable quantum weight remapping
        qandle.RY(qubit=1, remapping=None),
        qandle.CNOT(control=0, target=1),
        qandle.MeasureProbability(),
    ]
)


input_state = torch.rand(circuit.num_qubits, dtype=torch.float) # random input
data_reuploading = torch.rand(1, dtype=torch.float) # random data reuploading input

# Run the circuit
circuit(input_state, data_reuploading=data_reuploading)
```	

## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.


