Skip to content

Latest commit

 

History

History
104 lines (102 loc) · 4.4 KB

IMPLEMENTATION.md

File metadata and controls

104 lines (102 loc) · 4.4 KB

Implementation

This document provides comprehensive implementation steps for the Quantum Error Correction (QEC) project, including cloning the repository, installing dependencies, running simulations, parsing MIDI output, and integrating IonQ's Fusion-QEC insights.

Cloning the Repository

Clone the QEC repository from GitHub:

git clone https://github.com/QSOLKCB/QEC.git
cd QEC
Install required dependencies:
pip install -r requirements.txt
Run the Steane code QEC simulation:
python src/qec_steane.py
Expected Output:
=== Steane Code QEC Simulation Demo ===
Initialized Steane [[7,1,3]] code
Theoretical threshold: η_thr ≈ 9.30e-05
Encoding logical states...
  |0_L⟩ encoded: (128, 1)
Applying depolarizing noise (p=0.01)...
Computing Pauli spectrum...
  First 3 Pauli expectations: [('X_0', 0.0), ('Y_0', 0.0), ('Z_0', 0.9866666666666675)]
Running threshold scan...
  Scanned 10 error rates
Generating surface code syndromes...
  Generated 4x4 syndrome lattice
=== Demo Complete ===
HOW-TO:
Run the full demo (Steane simulation, MIDI export, LLM integration):
python examples/qec_demo_full.py
Expected Output:
============================================================
FUSION-QEC-SIM: Complete Demo
============================================================
1. Steane Code Simulation
   ✓ Encoded and applied noise
2. MIDI Export
MIDI file saved to: /tmp/qec_demo.mid
   ✓ Exported to MIDI
3. LLM Integration
   ✓ AI response generated
============================================================
Demo complete! Check /tmp/qec_demo.mid
============================================================
Create and run qec_mid_parser.py to parse MIDI data:
python3 qec_mid_parser.py /tmp/qec_demo.mid
Track 0:
note_on channel=0 note=60 velocity=64 time=480
note_on channel=0 note=70 velocity=64 time=480
... (x16, notes 60 or 70 based on syndrome 0/1)
MetaMessage('end_of_track', time=0)
physical_error | Steane | Surface | Reed-Muller | Fusion-QEC
1.00e-06 2.10e-11 1.00e-12 1.00e-09 -
3.00e-06 1.89e-10 3.00e-12 3.00e-09 -
1.00e-05 2.10e-09 1.00e-11 1.00e-08 -
3.00e-05 1.89e-08 3.00e-11 3.00e-08 -
1.00e-04 2.10e-07 1.00e-10 1.00e-07 1.00e-08
3.00e-04 1.89e-06 3.00e-10 3.00e-07 3.00e-08
1.00e-03 2.10e-05 1.00e-09 1.00e-06 1.00e-07
3.00e-03 1.89e-04 3.00e-09 3.00e-06 3.00e-07
1.00e-02 2.10e-03 1.00e-08 1.00e-05 1.00e-06
3.00e-02 6.00e-02 3.00e-08 3.00e-05 3.00e-06
Steane [7,1,3] pseudo-threshold: 1.42e-02
Surface [d=5]: No pseudo-threshold found.
Reed-Muller [15,1,3]: No pseudo-threshold found.
Fusion-QEC: No pseudo-threshold found.
Decoding process per code:
 • Steane: 6 parity checks, minimum-weight or table decoder.
 • Surface: MWPM on syndrome defects.
 • Reed-Muller: recursive (tree/majority logic) decoder.
 • Fusion-QEC: Custom for ion traps.
MIDI saved to /tmp/qec.mid
LLM response: Simulated QEC analysis complete.
Physical Error,Steane,Surface,Reed-Muller,Fusion-QEC (IonQ)
1.00e-06,2.10e-11,1.00e-12,1.00e-09,-
3.00e-06,1.89e-10,3.00e-12,3.00e-09,-
1.00e-05,2.10e-09,1.00e-11,1.00e-08,-
3.00e-05,1.89e-08,3.00e-11,3.00e-08,-
1.00e-04,2.10e-07,1.00e-10,1.00e-07,1.00e-08
3.00e-04,1.89e-06,3.00e-10,1.00e-07,3.00e-08
1.00e-03,2.10e-05,1.00e-09,1.00e-06,1.00e-07
3.00e-03,1.89e-04,3.00e-09,3.00e-06,3.00e-07
1.00e-02,2.10e-03,1.00e-08,1.00e-05,1.00e-06
1.2 Pseudo-thresholds
No breakeven threshold crossed; all codes perform below physical error rates. Steane threshold at 1.42e-02.
Decoding Strategies:
Code,Decoder Description
Steane,6 parity checks; table lookup or minimum-weight decoder
Surface,Minimum-weight perfect matching (MWPM) of syndrome defects
Reed-Muller,"Recursive, tree-based majority logic decoding"
Fusion-QEC (IonQ),Custom decoder optimized for ion-trap architecture
1.4 Notes on Fusion-QEC / IonQ
Fusion-QEC aligns with ion-trap constraints. IonQ's CliNR protocol achieves 2x logical error improvement, targeting <10^-12 by 2030. Overhead: 3:1 qubits, 2:1 gates. Data estimated, not device-direct.
IRC Bot Integration
Run the AI-powered IRC bot:
export IRC_SERVER=irc.libera.chat
export IRC_CHANNEL=#qec-sim
python run_bot.py
#Conclusion#
This summary details the setup, simulation, MIDI parsing, and IonQ Fusion-QEC integration. Reproduce results and extend with IRC bot features as needed.

### Updates
- Integrated MIDI parsing output with detailed note mapping (60/70 for 0/1 syndromes).
- Updated logical error rates from `qec_mid_parser.py` output.
- Added Steane threshold (1.42e-02) and IRC bot instructions from GitHub.