Topological Quantum Computing Documentation
Topological quantum computing encodes quantum information in global topological properties of anyon worldlines, providing natural protection against local errors. This approach offers a promising path to fault-tolerant quantum computation.
Documentation Overview
This directory contains comprehensive documentation for the FSharp.Azure.Quantum.Topological library, an idiomatic F# implementation of topological quantum computing concepts.
Getting Started
New to topological quantum computing? Start here:
-
Architecture Guide - Start here!
Understand the library’s layered architecture, from mathematical foundations to high-level algorithms. -
Developer Deep Dive
Comprehensive guide for F# developers: paradigm shift from gate-based QC, anyons, braiding, and practical patterns. -
Universal Quantum Computation
Learn how to achieve universal quantum computation using Ising anyons and magic state distillation.
Documentation Files
architecture.md
Purpose: Library architecture and design principles
Audience: Software architects, library contributors
Reading Time: 15 minutes
Contents:
- Layered architecture overview (6 layers)
- Separation of concerns: Core → Operations → Backends → Algorithms
- Comparison with gate-based quantum computing library
- Module dependencies and compilation order
- Design patterns and best practices
Key Takeaway: Topological library follows same architectural principles as gate-based library but is fundamentally separate due to different computational paradigm.
developer-deep-dive.md
Purpose: In-depth technical guide for F# developers
Audience: Senior F# engineers, quantum algorithm developers
Reading Time: 30-45 minutes (initial read), reference thereafter
Contents:
- Page 1: Paradigm shift from matrices to topology
- Page 2: Anyons - particles with memory (Ising, Fibonacci)
- Page 3: Braiding operations as quantum gates (geometry, not matrices)
- Page 4: Library architecture and practical F# patterns
- Page 5: Advanced topics and production readiness
Key Takeaway: Topological QC stores information in how particles are braided in spacetime, not in quantum amplitudes. This provides exponential error suppression.
Code Examples:
- Creating anyons and fusion trees
- Performing braiding operations
- Implementing quantum algorithms
- Error handling with Result types
- Backend integration patterns
universal-quantum-computation.md
Purpose: Achieving universal quantum computation with Ising anyons
Audience: Algorithm developers, researchers
Reading Time: 20 minutes
Contents:
- The challenge: Ising anyons only support Clifford operations
- Solution: Magic state distillation for T-gates
- 15-to-1 distillation protocol (Bravyi-Kitaev 2005)
- Resource estimation and overhead analysis
- Complete worked examples
- API reference for MagicStateDistillation module
Key Takeaway: Clifford operations (native braiding) + T-gates (magic state injection) = Universal quantum computation
Performance Characteristics:
- Cubic error suppression per distillation round
- 5% error → 0.44% error with single round (11.4× improvement)
- Resource overhead: ~225 noisy states for 99.99% fidelity
Quick Navigation
By Learning Path
Beginner (First time learning topological QC):
- Architecture Guide - Get the big picture
- Developer Deep Dive - Page 1-2 - Core concepts
- Universal Quantum Computation - Quick Start
Intermediate (Know basic topological QC concepts):
- Developer Deep Dive - Page 3-4 - Braiding and library patterns
- Universal Quantum Computation - Magic state distillation
- Architecture Guide - Advanced - Module dependencies
Advanced (Building algorithms or contributing):
- Developer Deep Dive - Page 5 - Production patterns
- Universal Quantum Computation - Resource Estimation
- Architecture Guide - Full layered design
By Role
Software Engineer (Implementing features):
- Architecture Guide → Understand module structure
- Developer Deep Dive - Page 4 → F# patterns
- Universal Quantum Computation - API Reference → Function signatures
Algorithm Developer (Writing quantum algorithms):
- Developer Deep Dive - Page 2-3 → Anyons and braiding
- Universal Quantum Computation → T-gate implementation
- Architecture Guide - Layer 4 → Algorithm patterns
Researcher (Exploring topological QC):
- Developer Deep Dive - Page 1 → Why topology matters
- Universal Quantum Computation - Theory
- Developer Deep Dive - Page 5 → Error correction
API Quick Reference
Core Modules
open FSharp.Azure.Quantum.Topological
// Layer 1: Mathematical Foundation
AnyonSpecies // Particle types and anyon theories
FusionRules // Fusion algebra (σ×σ = 1+ψ)
BraidingOperators // R-matrices and F-matrices
KauffmanBracket // Knot invariants (Kauffman bracket, Jones polynomial)
// Layer 3: Operations
FusionTree // Quantum state representation
TopologicalOperations // Braiding, measurement, superposition
// Layer 2: Backends
TopologicalBackend // ITopologicalBackend interface
// createSimulator, createHardware
// Layer 4: Algorithms
MagicStateDistillation // T-gate implementation via magic states
// Integration
GateToBraid // Convert gate-based circuits to braids
Common Operations
// Create simulator
let backend = TopologicalBackend.createSimulator AnyonType.Ising 10
// Initialize state
let! initialState = backend.Initialize AnyonType.Ising 4
// Braid anyons
let! state1 = backend.Braid 0 initialState
// Measure fusion
let! (outcome, collapsed, prob) = backend.MeasureFusion 0 state1
// Magic state distillation
let magicState = MagicStateDistillation.prepareNoisyMagicState 0.05 AnyonType.Ising
let! purified = MagicStateDistillation.distill15to1 random [magicState; ...]
// Knot invariants (from braiding operations)
let trefoil = KauffmanBracket.trefoil true
let jones = KauffmanBracket.jonesPolynomial trefoil standardA
Complete Module Reference
The topological library consists of 27 modules organized in 6 architectural layers. Below is the complete reference with brief descriptions.
Layer 1: Mathematical Foundation (Core Anyonic Theory)
Purpose: Pure mathematical constructs defining topological quantum computation - fusion rules, braiding matrices, modular data, knot invariants.
| Module | Description |
|---|---|
AnyonSpecies.fs |
Anyon particle types, quantum dimensions, and anyon theories (Ising, Fibonacci) |
FusionRules.fs |
Fusion algebra rules (e.g., σ×σ = 1+ψ for Ising anyons) |
BraidingOperators.fs |
R-matrices (braiding phase) and F-matrices (basis transformations) |
FMatrix.fs |
F-matrix calculations and caching for efficient fusion tree manipulations |
RMatrix.fs |
R-matrix calculations for braiding operations |
ModularData.fs |
Modular tensor category data (S-matrix, T-matrix, topological central charge) |
BraidGroup.fs |
Braid group representations and generators |
BraidingConsistency.fs |
Pentagon and hexagon consistency equations for F and R matrices |
EntanglementEntropy.fs |
Topological entanglement entropy calculations |
KauffmanBracket.fs |
Kauffman bracket invariant and Jones polynomial for knot theory |
Layer 2: Backends (Execution Abstractions)
Purpose: Backend interfaces for executing topological operations - simulators and hardware integration points.
| Module | Description |
|---|---|
TopologicalBackend.fs |
ITopologicalBackend interface and simulator implementation |
Legacy\TopologicalBackend.fs |
Backward-compatible old backend interface (deprecated) |
Layer 3: State Representation & Operations
Purpose: High-level operations on quantum states encoded as fusion trees.
| Module | Description |
|---|---|
FusionTree.fs |
Quantum state representation as fusion trees of anyons |
TopologicalOperations.fs |
High-level operations: braiding, fusion measurement, superposition |
Layer 4: Algorithms & Error Handling
Purpose: Quantum algorithms and error correction protocols built on topological primitives.
| Module | Description |
|---|---|
MagicStateDistillation.fs |
T-gate synthesis via 15-to-1 distillation (Bravyi-Kitaev 2005) |
ToricCode.fs |
Topological error correction using toric code |
ErrorPropagation.fs |
Error propagation analysis through topological circuits |
Layer 5: Compilation & Optimization
Purpose: Converting between gate-based and topological representations, circuit optimization.
| Module | Description |
|---|---|
GateToBraid.fs |
Convert gate-based circuits to braid sequences (21 gate types) |
BraidToGate.fs |
Convert braid sequences back to gate operations |
SolovayKitaev.fs |
Gate approximation algorithm for efficient decomposition |
CircuitOptimization.fs |
Circuit optimization and simplification strategies |
Layer 6: Builders, Formats & Utilities
Purpose: Developer-friendly APIs, file formats, and supporting utilities.
| Module | Description |
|---|---|
TopologicalBuilder.fs |
F# computation expressions for building topological circuits |
TopologicalFormat.fs |
.tqp file format for serializing topological programs |
NoiseModels.fs |
Noise simulation for realistic error modeling |
Visualization.fs |
State visualization and debugging utilities |
TopologicalError.fs |
Error types and exception handling |
Commented Out / Future Development
| Module | Status | Reason |
|---|---|---|
AlgorithmExtensions.fs |
Commented out | Requires refactoring - references removed adapter modules |
Library Features
Implemented
- Ising Anyons (Majorana zero modes)
- Fibonacci Anyons (SU(2) level k=3)
- Fusion Trees (complete state representation)
- Braiding Operations (R-matrices, F-matrices)
- Measurement (fusion outcome detection)
- Magic State Distillation (15-to-1 protocol)
- Gate-to-Braid Compilation (21 gate types)
- Backend Abstraction (simulator, hardware-ready)
Planned (Future Development)
- Fibonacci-specific algorithms (Jones polynomial, link invariants)
- Advanced error correction (surface codes on anyonic systems)
- Hardware backends (Azure Quantum integration)
- Performance optimizations (parallel braiding, caching)
External Resources
Books
- Steven Simon - “Topological Quantum” (2023)
Comprehensive textbook for topological quantum computing. Chapters 1-7 cover foundations.
Papers
-
Bravyi & Kitaev (2005) - “Universal quantum computation with ideal Clifford gates and noisy ancillas”
Foundational paper on magic state distillation. -
Nayak et al. (2008) - “Non-Abelian anyons and topological quantum computation”
Comprehensive review article (Reviews of Modern Physics).
Online Resources
- Microsoft Quantum - Topological Quantum Computing
- Wikipedia - Topological Quantum Computer
- arXiv:0707.1889 - “A Short Introduction to Topological Quantum Computation”
Contributing
Found an issue or want to contribute? Please open an issue or submit a pull request on GitHub.
Documentation Improvements
This documentation is a living resource. If you find:
- Unclear explanations
- Missing code examples
- Broken links
- Technical inaccuracies
Please open an issue or submit a PR!
License
This documentation and the FSharp.Azure.Quantum.Topological library are licensed under MIT License.
Contact & Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Repository: FSharp.Azure.Quantum
Last Updated: December 2025
Library Version: 0.3.2
F# Version: 8.0+