# Clifforder: A Python Package Addressing both Fermionic and Bosonic Quantum Error-Correction Simultaneously


[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![Python](https://img.shields.io/badge/python-3.12%2B-blue)](https://www.python.org/)
[![Documentation](https://img.shields.io/badge/docs-available-brightgreen)](docs/)

This package is based on Python 3.12+ and is primarily designed for constructing and testing quantum error-correction codes and quantum circuits.

## 🔨 1 Dependencies

Mandatory:

- [QuTiP](https://qutip.org/) - Quantum Toolbox in Python
- [Stim](https://github.com/quantumlib/Stim) - Quantum Error-Correction Simulator
- [Stimbposd](https://github.com/quantumlib/Stim/blob/main/docs/bposd.md) - BPOSD Decoder based on Stim
- [Galois](https://galois.readthedocs.io/) - Provides algebraic calculations over $\mathbb{F}_2$
- [NumPy](https://numpy.org/) - Numerical computing library
- [SciPy](https://scipy.org/) - Scientific computing library
- [Matplotlib](https://matplotlib.org/) - Plotting library
- [Qiskit](https://qiskit.org/) - Provides tools for quantum circuit visualization
- [Mip](https://www.mipengine.org/) - Integer programming solver for computing code distance

Optional:

- [NetworkX](https://networkx.org/) - Provides tools for graph analysis and manipulation

[tesseract-decoder](https://github.com/quantumlib/tesseract-decoder) - Tesseract Decoder, if not installed, Stimbposd decoder will be used instead.

## 📖 2 Workflow

### 2.1 Compute Code Parameters

1. Construct a quantum error-correction code
2. Compute the code parameters of the quantum error-correction code

### 2.2 Compute Logical Error Rate

1. Construct a quantum circuit
2. Execute Monte-Carlo simulation to compare the prediction of the circuit with the correct result, and get the logical error rate

## 📄 3 License

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

## 📞 4 Contact

- **Author**: Moke
- **Email**: Moke2001@whu.edu.cn
- **Address**: Tsinghua University, Beijing, Haidian, MMW-S219
- **Phone**: +86 130-3373-6868