Metadata-Version: 2.4
Name: topological-quantum-compiler
Version: 0.1.0
Summary: A universal compiler for quantum computers based on topological principles and anyonic braiding
Home-page: https://github.com/krish567366/TQC
Author: Krishna Bajpai
Author-email: krishna@krishnabajpai.me
Project-URL: Bug Tracker, https://github.com/krish567366/TQC/issues
Project-URL: Documentation, https://krish567366.github.io/TQC
Project-URL: Source Code, https://github.com/krish567366/TQC
Keywords: quantum topological compiler anyons braids fault-tolerant
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.21.0
Requires-Dist: scipy>=1.9.0
Requires-Dist: networkx>=2.8
Requires-Dist: matplotlib>=3.5.0
Requires-Dist: qiskit>=0.40.0
Requires-Dist: sympy>=1.10
Requires-Dist: pydantic>=1.10.0
Provides-Extra: jax
Requires-Dist: jax[cpu]>=0.4.0; extra == "jax"
Requires-Dist: jaxlib>=0.4.0; extra == "jax"
Provides-Extra: simulation
Requires-Dist: jax[cpu]>=0.4.0; extra == "simulation"
Requires-Dist: jaxlib>=0.4.0; extra == "simulation"
Provides-Extra: dev
Requires-Dist: pytest>=7.4.0; extra == "dev"
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
Requires-Dist: mypy>=1.5.0; extra == "dev"
Requires-Dist: black>=23.7.0; extra == "dev"
Requires-Dist: isort>=5.12.0; extra == "dev"
Requires-Dist: flake8>=6.0.0; extra == "dev"
Requires-Dist: pre-commit>=3.3.0; extra == "dev"
Provides-Extra: docs
Requires-Dist: mkdocs-material>=9.2.0; extra == "docs"
Requires-Dist: mkdocstrings[python]>=0.22.0; extra == "docs"
Requires-Dist: mkdocs-git-revision-date-localized-plugin>=1.2.0; extra == "docs"
Provides-Extra: all
Requires-Dist: jax[cpu]>=0.4.0; extra == "all"
Requires-Dist: jaxlib>=0.4.0; extra == "all"
Requires-Dist: pytest>=7.4.0; extra == "all"
Requires-Dist: pytest-cov>=4.1.0; extra == "all"
Requires-Dist: mypy>=1.5.0; extra == "all"
Requires-Dist: black>=23.7.0; extra == "all"
Requires-Dist: isort>=5.12.0; extra == "all"
Requires-Dist: flake8>=6.0.0; extra == "all"
Requires-Dist: pre-commit>=3.3.0; extra == "all"
Requires-Dist: mkdocs-material>=9.2.0; extra == "all"
Requires-Dist: mkdocstrings[python]>=0.22.0; extra == "all"
Requires-Dist: mkdocs-git-revision-date-localized-plugin>=1.2.0; extra == "all"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license-file
Dynamic: project-url
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Topological Quantum Compiler (TQC)

[![PyPI version](https://badge.fury.io/py/topological-quantum-compiler.svg)](https://badge.fury.io/py/topological-quantum-compiler)
[![CI](https://github.com/krish567366/TQC/workflows/CI/badge.svg)](https://github.com/krish567366/TQC/actions)
[![Documentation](https://img.shields.io/badge/docs-mkdocs-blue.svg)](https://krish567366.github.io/TQC)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

**The first universal compiler for quantum computers based on topological principles.**

TQC moves beyond fragile gate-based quantum operations by compiling quantum algorithms into fault-tolerant braiding operations of anyonic quasiparticles. This revolutionary approach promises inherently stable quantum computation through topological protection.

## 🌟 Key Features

- **Topological Compilation**: Translate quantum circuits into anyonic braid operations
- **Fault Tolerance**: Inherent error protection through topological properties
- **Multiple Anyon Types**: Support for Fibonacci, Ising, and other anyonic systems
- **Advanced Simulation**: Efficient tensor network simulation of many-anyon systems
- **Optimization**: Solovay-Kitaev-style approximation algorithms for braid optimization
- **Visualization**: Generate beautiful braid diagrams and topological visualizations

## 🚀 Quick Start

```python
from tqc import TopologicalCompiler, FibonacciAnyons
from qiskit import QuantumCircuit

# Create a simple quantum circuit
qc = QuantumCircuit(2, 2)
qc.h(0)
qc.cx(0, 1)
qc.measure_all()

# Compile to topological braids
compiler = TopologicalCompiler(anyon_type=FibonacciAnyons())
braid_program = compiler.compile(qc)

# Simulate the braided computation
result = braid_program.simulate(shots=1000)
print(f"Measurement results: {result.counts}")

# Visualize the braid
braid_program.visualize_braid(output="bell_state_braid.svg")
```

## 📦 Installation

```bash
# Via pip
pip install topological-quantum-compiler

# Via poetry
poetry add topological-quantum-compiler

# Development installation
git clone https://github.com/krish567366/TQC.git
cd TQC
poetry install
```

## 🔬 What Makes TQC Revolutionary

Traditional quantum computers suffer from:

- **Fragile qubits** sensitive to environmental noise
- **High error rates** requiring extensive error correction
- **Limited coherence times** constraining algorithm complexity

TQC solves these problems by encoding quantum information in the **topological properties** of anyonic braids, which are:

- **Naturally fault-tolerant** - protected by energy gaps
- **Stable against local perturbations** - only global changes affect computation
- **Scalable** - complexity grows polynomially with system size

## 📚 Documentation

- [Installation Guide](https://krish567366.github.io/TQC/installation/)
- [Quick Start Tutorial](https://krish567366.github.io/TQC/quickstart/)
- [API Reference](https://krish567366.github.io/TQC/api/)
- [Advanced Examples](https://krish567366.github.io/TQC/tutorials/)

## 🎯 Example Applications

```python
# VQE with topological compilation
from tqc.algorithms import TopologicalVQE
from tqc.chemistry import H2Molecule

molecule = H2Molecule(bond_length=0.74)
vqe = TopologicalVQE(molecule, anyon_type="fibonacci")
energy = vqe.run()

# Quantum machine learning with anyonic features
from tqc.ml import AnyonicFeatureMap

feature_map = AnyonicFeatureMap(n_qubits=4, anyon_type="ising")
quantum_kernel = feature_map.to_kernel()
```

## 🤝 Contributing

We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

## 📄 License

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

## 🙏 Acknowledgments

- Created by Krishna Bajpai (krishna@krishnabajpai.me)
- Based on groundbreaking research in topological quantum computation
- Inspired by the work of Kitaev, Freedman, and other pioneers in the field
- Built on the shoulders of excellent libraries like Qiskit, JAX, and NumPy

## 📞 Support

- 📖 [Documentation](https://krish567366.github.io/TQC)
- 🐛 [Issue Tracker](https://github.com/krish567366/TQC/issues)
- 💬 [Discussions](https://github.com/krish567366/TQC/discussions)
- 📧 Contact: Krishna Bajpai <krishna@krishnabajpai.me>

---

*"The future of quantum computing is topological."* - Krishna Bajpai, TQC Creator
