Skip to content
 
 

Latest commit

 

History

37 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open In Colab

fusion-qec-sim

Creative quantum error correction, DNA analysis, 3D cube visualization, and AI-powered IRC bot—open, modular, and minimal.

New: AI-Powered IRC Bot

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

Quick Start

# 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

Available Commands

  • !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.

Examples

# 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 features

New: Rust Implementation in XML

High-performance Rust implementation of the QEC algorithms is now available in XML format at rust_qec_implementation.xml.

Features

  • 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

What's in the XML?

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

Quick Start (Rust)

# 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 demo

Integration with Python

The Rust implementation can be integrated with the Python IRC bot in several ways:

  1. PyO3 Bindings: Create Python module with native performance
  2. CLI Tool: Call Rust binary from subprocess
  3. FFI: Use as C-compatible shared library

See rust_qec_implementation.xml for detailed integration instructions.


Original Features

...

About

Quantum error correction simulation and diagnostics bundle for global education and LMIC labs. Features surface/Steane code integration, syndrome fusion analytics, and automated reproducibility tools.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages