Skip to the content.

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:

  1. Architecture Guide - Start here!
    Understand the library’s layered architecture, from mathematical foundations to high-level algorithms.

  2. Developer Deep Dive
    Comprehensive guide for F# developers: paradigm shift from gate-based QC, anyons, braiding, and practical patterns.

  3. 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:

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:

Key Takeaway: Topological QC stores information in how particles are braided in spacetime, not in quantum amplitudes. This provides exponential error suppression.

Code Examples:


universal-quantum-computation.md

Purpose: Achieving universal quantum computation with Ising anyons
Audience: Algorithm developers, researchers
Reading Time: 20 minutes

Contents:

Key Takeaway: Clifford operations (native braiding) + T-gates (magic state injection) = Universal quantum computation

Performance Characteristics:


Quick Navigation

By Learning Path

Beginner (First time learning topological QC):

  1. Architecture Guide - Get the big picture
  2. Developer Deep Dive - Page 1-2 - Core concepts
  3. Universal Quantum Computation - Quick Start

Intermediate (Know basic topological QC concepts):

  1. Developer Deep Dive - Page 3-4 - Braiding and library patterns
  2. Universal Quantum Computation - Magic state distillation
  3. Architecture Guide - Advanced - Module dependencies

Advanced (Building algorithms or contributing):

  1. Developer Deep Dive - Page 5 - Production patterns
  2. Universal Quantum Computation - Resource Estimation
  3. Architecture Guide - Full layered design

By Role

Software Engineer (Implementing features):

Algorithm Developer (Writing quantum algorithms):

Researcher (Exploring topological QC):


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

Planned (Future Development)


External Resources

Books

Papers

Online Resources


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:

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


Last Updated: December 2025
Library Version: 0.3.2
F# Version: 8.0+