Creative quantum error correction, DNA analysis, 3D cube visualization, and AI-powered IRC bot—open, modular, and minimal.
The fusion-qec-sim project now includes a fully-featured IRC bot that combines:
- QuTiP-based Steane Code Simulations: [[7,1,3]] code with depolarizing noise, pseudo-threshold calculations (η_thr ≈ 9.3×10^{-5})
- MIDI Export: Convert simulation data to music (error rates → tempo, eigenvalues → velocities, logical errors → e-minor arpeggios)
- LLM Integration: Conversational AI for code generation, simulation explanation, and chat moderation
- IRC Protocol: Real-time Q&A and code review in IRC channels
# Install dependencies
pip install -r requirements.txt
# Run in demo mode (no IRC connection)
python run_bot.py --demo
# Connect to IRC server
export IRC_SERVER=irc.libera.chat
export IRC_CHANNEL=#qec-sim
python run_bot.py!runsim [error_rate]- Run Steane code simulation!threshold- Display pseudo-threshold!ai <question>- Ask AI about QEC concepts!export [type]- Export simulation to MIDI!note <note>- Play MIDI note (C3-G5)
See docs/IRC_BOT_GUIDE.md for complete documentation.
# Run complete demo
python examples/qec_demo_full.py
# Run individual modules
python src/qec_steane.py # QEC simulations
python src/midi_export.py # MIDI export
python src/llm_integration.py # LLM featuresHigh-performance Rust implementation of the QEC algorithms is now available in XML format at rust_qec_implementation.xml.
- Complete Steane [[7,1,3]] Code: Full implementation matching Python version
- Threshold Simulation: Monte Carlo scanning with optimized performance
- Surface Code Lattice: 2D syndrome generation and visualization
- 10-100x Faster: Native compilation with zero-cost abstractions
- Type Safety: Compile-time guarantees and memory safety
- Easy Integration: Can be used via PyO3, CLI, or FFI
The XML file contains:
- Complete Rust source code for all QEC modules
- Cargo.toml configuration with dependencies
- Unit tests for each component
- Build instructions and usage examples
- Performance notes and integration guides
- Comparison with Python implementation
# Extract and build (requires Rust toolchain)
# 1. Create new Cargo project
cargo new qec_steane --lib
# 2. Extract code from rust_qec_implementation.xml
# 3. Copy dependencies to Cargo.toml
# 4. Place module code in src/
# Build and test
cargo build --release
cargo test
# Run demo
cargo run --bin demoThe Rust implementation can be integrated with the Python IRC bot in several ways:
- PyO3 Bindings: Create Python module with native performance
- CLI Tool: Call Rust binary from subprocess
- FFI: Use as C-compatible shared library
See rust_qec_implementation.xml for detailed integration instructions.
...