Kala_NuroNetwork
Kala_NuroNetwork is a hybrid quantum-classical neural network framework that integrates Kala_Quantum and Kala_Torch for advanced machine learning tasks.
Features
- Quantum Layer: Leverage quantum circuits with Hadamard and CNOT gates for preprocessing.
- Classical Neural Network: Includes fully connected layers for classical computation.
- Trainer Class: Train and evaluate models with ease.
- Large Dataset Support: Handle big data with efficient batching and parallelism.
Installation
pip install Kala_Quantum Kala_Torch torch
Usage
from KalaNeroNetwork import KalaNuroNetwork, KalaNuroTrainer
import torch
import torch.nn as nn
import torch.optim as optim
# Define hyperparameters
input_size = 2
n_qubits = 2
hidden_size = 128
output_size = 2
batch_size = 128
epochs = 10
# Generate synthetic dataset
def generate_large_data(num_samples, input_size):
data = torch.rand(num_samples, input_size)
labels = (data.sum(axis=1) > 1.0).long() # Binary classification based on sum threshold
return data, labels
num_samples = 10000
data, labels = generate_large_data(num_samples, input_size)
dataset = torch.utils.data.TensorDataset(data, labels)
data_loader = torch.utils.data.DataLoader(dataset, batch_size=batch_size, shuffle=True)
# Initialize model, optimizer, and criterion
model = KalaNuroNetwork(input_size, n_qubits, hidden_size, output_size)
optimizer = optim.Adam(model.parameters(), lr=0.001)
criterion = nn.CrossEntropyLoss()
# Train and evaluate
trainer = KalaNuroTrainer(model, optimizer, criterion, device="cpu")
print("Starting training...")
trainer.train(data_loader, epochs)
print("Evaluating model...")
trainer.evaluate(data_loader)
License
This project is licensed under the MIT License. See the LICENSE file for details.
Release files for Kala-NuroNetwork 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kala_nuronetwork-0.1.0.tar.gz | 3.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| Kala_NuroNetwork-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.5 kB
Release files / kala_nuronetwork-0.1.0.tar.gz
| Download URL | kala_nuronetwork-0.1.0.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
13f303b214a69bc71708a70bf7dd4185c5133311969556c13c67fe4b8baa7dea
|
|
BLAKE2b-256 checksum How to use checksums |
6d6d1bd5f5955811233a199ce21914a5959494db190e0c80adeea1a8be1ebaaf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Release files / Kala_NuroNetwork-0.1.0-py3-none-any.whl
| Download URL | Kala_NuroNetwork-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
49028c2deb67a202e37e6a248b384c1a201324ca2785b26793ef7e277d902f19
|
|
BLAKE2b-256 checksum How to use checksums |
fd0668a992250b21c95b8d4de2122975219ad62391e76cf64a1620e943ac0d44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|