NVIDIA CUDA-Q QEC
0.9.1

Getting Started

  • Installation Guide
    • pip install
    • Docker Container
    • Building from Source
    • Installing PyTorch
  • Quick Start
    • Before You Start
    • Run the Experiment
    • Expected Result
    • Next Steps

Library Guide

  • Overview
  • QEC Decoders
    • Pre-built QEC Decoders
      • Quantum Low-Density Parity-Check Decoder
      • NVIDIA Fusion Decoder
      • Tensor Network Decoder
      • TensorRT Decoder
      • PyMatching Decoder
      • Chromobius Decoder
      • Sliding Window Decoder
    • Build Your Own Decoder
      • Decoder Framework cudaq::qec::decoder
  • Detector Error Models
    • Decoding from Stim DEM Text
    • DEM Sampling
    • Dynamic DEM
      • Why Use a Dynamic DEM?
      • Phases and Connections
      • Detectors Across Round Boundaries
      • Measurements and Logical Readout
      • Constructing a Dynamic DEM
      • Choosing a Decoding Path
      • See Also
  • Decoding Task Graphs
    • How Data Flows Through a Graph
    • Complete Shots and Streaming
    • Building a Task Graph
    • Reference
      • Node Kinds
      • Guarded Sliding Windows
      • Asynchronous Streaming Options
      • Fire Pools
      • Reading Streaming Results
      • Staged Outputs
      • Edge Values
      • Logical Measurements
      • Configuring Logical Outputs
      • Native Streaming Nodes
      • Arbitrary-Length Sliding Windows
  • Realtime Decoding
    • Workflow and Data Flow
      • Workflow
      • Terminology and Data Flow
      • See Also
    • AI Predecoding
      • How the Stages Fit Together
      • Choose an Example
      • Evaluate the Complete Pipeline
    • Decoding Server
      • Workflow at a Glance
      • Set Up the Prebuilt Container
        • Get the Prebuilt Package
        • Prepare the Run Directory
        • Open the Decoding-Server Container
      • Configure a Surface-Code Memory Experiment
        • Send the Experiment’s Measurements
      • Color-Code AI Predecoding
      • Use a Custom Decoder Plugin
        • Implement and Build the Plugin
        • Deploy and Select the Plugin
      • Integrate a Third-Party Runtime
        • Host Dispatch Loops
      • Troubleshooting
      • See Also
    • Playback Emulator
      • Overview
      • Reference
        • Python and Command-Line Interfaces
        • Schedule Format
        • Syndrome Sources
        • Sessions
        • Run Options
        • Output Format
    • Memory Experiment Configuration Generator
      • See Also
  • Experiments and Noise Modeling
    • Code-Capacity Noise Modeling
    • Circuit-level Noise Modeling
    • Memory Circuit Experiments
  • Noise Learning
  • QEC Codes
    • Pre-built QEC Codes
      • Steane Code
      • Repetition Code
      • Surface Code
    • Build Your Own Code
      • QEC Code Framework cudaq::qec::code
        • Class Structure
        • Implementing a New Code
        • Example: Steane Code
        • Implementing a New Code in Python
        • Key Points
        • Using the Code Framework
  • Conventions

Examples

  • Overview
  • Decoders
    • Getting Started with the NVIDIA QLDPC Decoder
      • Belief Propagation Methods
      • Usage Example
    • TCBP and JOBS
      • Decoding with TCBP and JOBS
    • Exact Maximum Likelihood Decoding with NVIDIA Tensor Network Decoder
    • Deploying AI Decoders with TensorRT
      • Overview of the Training-to-Deployment Pipeline
      • Training a Neural Network Decoder with PyTorch and Stim
      • Using the TensorRT Decoder in CUDA-Q QEC
      • Converting ONNX Models to TensorRT Engines
      • Dependencies and Requirements
      • See Also
    • Matching-Based Decoding with PyMatching
    • Color-Code Decoding with Chromobius
  • Working with Detector Error Models
    • Decoding From Stim DEM Text
    • Generating a Multi-Round Parity Check Matrix
    • DEM Sampling
      • Example
      • GPU Acceleration
      • Input Types and Backend Selection
      • See Also
    • Decoding with a Dynamic DEM
      • Describe the Repetition-Code Experiment
      • Check the Round Boundaries
      • Follow the Measurements
      • Build the DEM and Decode a Shot
      • See Also
  • Decoding Task Graph
    • Getting Started with a Decoding Task Graph
      • Construct the Graph
      • Decode Complete Shots
      • Stream Measurement Rounds
      • Connect Several Nodes
      • Expected Results
      • Next Steps
    • Parallel Window
      • How it works
      • Detector Error Model
      • Configuration
        • Advanced options
      • Building a graph in code
      • Decoding a shot
      • Serving with the decoding server
      • What the pattern builds
        • Sharing data across decoders
    • Decoder Ensembles
      • How it works
      • Configuration
      • Building a graph in code
      • Extending ensembles
        • Reporting a cost
        • Honoring cancellation
        • Pushing candidates
        • Adding a selection strategy
  • Realtime Decoding
    • Getting Started with Realtime Decoding
      • Configuration
        • Step 1: Generate Detector Error Model
        • Step 2: Configure and Save Decoder
        • Step 3: Load Configuration
        • Step 4: Use in Quantum Kernels
      • Backend Selection
        • Simulation Backend
        • Quantinuum Hardware Backend
      • Compilation and Execution Examples
        • Common Use Cases
        • C++ Compilation
        • Python Execution
        • Complete Workflow Example
        • Debugging and Environment Variables
        • Decoder Selection
      • Troubleshooting
        • Configuration Upload Failures (Quantinuum Backend)
    • Realtime Decoding from a Quantum Kernel or FPGA
      • Deliverables versus the example
      • Building the example
      • Running
        • QPU-kernel source (software, UDP, no hardware)
        • QPU-kernel source over real RDMA (--wire cpu_roce)
        • FPGA source (real FPGA over RoCE)
      • Ising decoder (TensorRT predecoder + PyMatching)
      • Decoders
      • Packaged Surface-Code Client
        • Build the Packaged Client
        • Generate Configurations and Select a Decoder
        • Read the Application Results
      • Source for the CMake Example
    • Realtime Decoding with the Playback Emulator
      • In-Process Repetition-Code Playback
        • Prerequisites
        • Run the Example
        • Check the Result
        • Use the Same Configuration with a Server
      • Playback Against a Decoding Server
        • Prerequisites
        • Generate the Configuration
        • Run Playback
        • Check the Result
      • Next Steps
    • AI Predecoder with CUDA-Q Realtime
      • Prerequisites
        • Hardware
        • Software
      • Data directory layout
      • Building
      • Running
        • Positional arguments
        • Named flags
        • Pipeline configurations
        • Example
      • Changing the predecoder model
      • Reading the output
        • Throughput and timing
        • Latency distribution
        • PyMatching average time
        • Syndrome density
        • Correctness verification
      • See also
    • AI Predecoder with CUDA-Q Realtime (with FPGA Data Injection)
      • Prerequisites
        • Hardware
        • Software
        • Source repositories
      • Repository layout
      • Data directory layout
      • Building
      • Emulated end-to-end test
        • Requirements
        • Running
        • Bounded decoding-server regression (software emulator)
      • FPGA end-to-end test
        • Requirements
        • Running
        • GPU selection
        • Network sanity check
      • Changing the predecoder model
      • Orchestration script reference
        • Modes
        • Actions
        • Directory options
        • Network options
        • Run options
      • See also
    • Comparing Ising and Chromobius for Color-Code Decoding
      • What the Experiment Compares
      • Prerequisites
        • Hardware
        • Software
      • Run the Comparison
      • Reading the Output
      • The Example Source
      • See Also
    • Measuring Streaming Interleaved Feed-forward Latency (SIFL)
      • Prerequisites
      • Run the Experiment
      • How the Example Runs
      • Reading the Output
      • The Example Source
      • See Also
    • See Also
  • Experiments and Noise Modeling
    • Code-Capacity Noise Modeling
      • CUDA-Q QEC Implementation
      • Code Explanation
    • Circuit-level Noise Modeling
      • CUDA-Q QEC Implementation
      • Code Explanation
    • Memory Circuit Experiments
      • Function Variants
      • Return Values
      • Example Usage
      • Additional Noise Models
  • Learning Noise and Decoding with Learned Rates
  • Creating New QEC Codes

Performance Studies

  • Overview
  • Improving Relay BP Decoding With Gamma Ensembles
    • Performance Comparison
    • Latency Distribution
    • Logical Error Rate Under Hard Deadlines
    • See Also
  • Sweeping Relay BP Stopping Criteria From a Single Run
    • Recording a run
    • Example: RelayBP-N on the gross code
    • Practical notes
    • See Also
  • Improving BP+OSD Decoding With Min-LLR OSD Initialization
    • Column Ordering Importance and Sensitivity
    • Experiment
    • Results
    • Controls: Ordering Versus Iteration Count
    • See Also
  • Accuracy and Latency of TCBP+JOBS
  • Bounding realtime decode latency with NV-Fusion
    • What Is Streaming Tail Latency?
    • Experiment Configuration
    • Streaming Tail Latency
    • Latency With Concurrent Decoders
    • See Also
  • Learning Noise From Detector Data and Decoding With the Learned Rates

API Reference

  • CUDA-Q QEC Namespaces and Core Library C++ API
    • Namespaces
    • Core
  • CUDA-Q QEC C++ API
    • Code
    • Detector Error Model
    • Dynamic DEM
    • Detector Error Model (DEM) Sampling
    • Decoder Interfaces
    • Decoding Task Graph
      • I/O types
      • Graph
    • Built-in Decoders
      • NVIDIA QLDPC Decoder
        • nv_qldpc_decoder
      • NVIDIA Fusion Decoder
        • nv_fusion_decoder
      • Sliding Window Decoder
        • sliding_window
      • TensorRT Decoder
        • trt_decoder
      • PyMatching Decoder
        • pymatching
      • Chromobius Decoder
        • chromobius
    • Realtime Decoding
      • Core Decoding Functions
      • Configuration API
      • Helper Functions
    • Realtime Pipeline API
      • Configuration
      • GPU Stage
      • CPU Stage
      • Completion
      • Ring Buffer Injector
      • Pipeline
    • Parity Check Matrix Utilities
    • Logger
    • Common
  • CUDA-Q QEC Python API
    • Code
      • Code
        • Code.contains_operation
        • Code.get_num_ancilla_qubits
        • Code.get_num_ancilla_x_qubits
        • Code.get_num_ancilla_z_qubits
        • Code.get_num_data_qubits
        • Code.get_num_x_stabilizers
        • Code.get_num_z_stabilizers
        • Code.get_observables_x
        • Code.get_observables_z
        • Code.get_operation_one_qubit
        • Code.get_operation_two_qubit
        • Code.get_parity
        • Code.get_parity_x
        • Code.get_parity_z
        • Code.get_pauli_observables_matrix
        • Code.get_stabilizer_round
        • Code.get_stabilizer_schedule_x
        • Code.get_stabilizer_schedule_z
        • Code.get_stabilizers
    • Surface code layout
      • stabilizer_grid
        • stabilizer_grid.data_coords
        • stabilizer_grid.data_indices
        • stabilizer_grid.distance
        • stabilizer_grid.format_data_grid
        • stabilizer_grid.format_stabilizer_coords
        • stabilizer_grid.format_stabilizer_grid
        • stabilizer_grid.format_stabilizer_indices
        • stabilizer_grid.format_stabilizers
        • stabilizer_grid.get_cnot_schedule_pairs_x
        • stabilizer_grid.get_cnot_schedule_pairs_z
        • stabilizer_grid.get_cnot_schedule_x
        • stabilizer_grid.get_cnot_schedule_z
        • stabilizer_grid.get_spin_op_observables
        • stabilizer_grid.get_spin_op_stabilizers
        • stabilizer_grid.grid_length
        • stabilizer_grid.orientation
        • stabilizer_grid.roles
        • stabilizer_grid.x_stab_coords
        • stabilizer_grid.x_stab_indices
        • stabilizer_grid.x_stabilizers
        • stabilizer_grid.z_stab_coords
        • stabilizer_grid.z_stab_indices
        • stabilizer_grid.z_stabilizers
    • Detector Error Model
      • DetectorErrorModel
        • DetectorErrorModel.canonicalize_for_rounds
        • DetectorErrorModel.canonicalize_for_rounds_with_boundary
        • DetectorErrorModel.detector_error_matrix
        • DetectorErrorModel.error_ids
        • DetectorErrorModel.error_rates
        • DetectorErrorModel.num_detectors
        • DetectorErrorModel.num_error_mechanisms
        • DetectorErrorModel.num_observables
        • DetectorErrorModel.observables_flips_matrix
      • DecoderContext
        • DecoderContext.full_component
        • DecoderContext.num_measurements
        • DecoderContext.x_component
        • DecoderContext.z_component
      • dem_from_memory_circuit()
      • x_dem_from_memory_circuit()
      • z_dem_from_memory_circuit()
      • decoder_context_from_memory_circuit()
      • dem_from_stim_text()
      • d_sparse()
    • Dynamic DEM
      • DemChunksSpec
        • DemChunksSpec.connections
        • DemChunksSpec.detectors_of
        • DemChunksSpec.get_phase
        • DemChunksSpec.has_D_sparse
        • DemChunksSpec.has_repeating_phase
        • DemChunksSpec.is_empty
        • DemChunksSpec.measurements_of
        • DemChunksSpec.measurements_per_round
        • DemChunksSpec.minimum_rounds
        • DemChunksSpec.num_observables
        • DemChunksSpec.num_rounds
        • DemChunksSpec.observable_names
        • DemChunksSpec.phase_sequence
        • DemChunksSpec.phases
        • DemChunksSpec.phases_supply_D_sparse
        • DemChunksSpec.repeating_phase
        • DemChunksSpec.seam
        • DemChunksSpec.validate
      • PhaseSpecEntry
        • PhaseSpecEntry.id
        • PhaseSpecEntry.spec
      • PhaseConnection
        • PhaseConnection.from_phase
        • PhaseConnection.is_self
        • PhaseConnection.to_phase
      • SeamConnection
        • SeamConnection.from_seam
        • SeamConnection.to_seam
      • DemChunkSpec
        • DemChunkSpec.D_sparse
        • DemChunkSpec.H_sparse
        • DemChunkSpec.O_sparse
        • DemChunkSpec.error_rates
        • DemChunkSpec.expand
        • DemChunkSpec.is_empty
        • DemChunkSpec.m2o_sparse
        • DemChunkSpec.num_faults
        • DemChunkSpec.num_measurements
        • DemChunkSpec.seam_specs
        • DemChunkSpec.validate
      • SeamSpecEntry
        • SeamSpecEntry.id
        • SeamSpecEntry.spec
      • DemSeamSpec
        • DemSeamSpec.H_sparse
        • DemSeamSpec.O_sparse
      • SeamId
        • SeamId.value
      • seam_name
      • phase_name
    • Decoder Interfaces
      • Decoder
        • Decoder.decode
        • Decoder.decode_async
        • Decoder.decode_batch
        • Decoder.get_block_size
        • Decoder.get_syndrome_size
        • Decoder.get_version
    • Decoding Task Graph
      • DecodingTaskGraph
        • DecodingTaskGraph.clear_corrections
        • DecodingTaskGraph.combine
        • DecodingTaskGraph.enqueue_syndrome
        • DecodingTaskGraph.from_spec
        • DecodingTaskGraph.from_topology
        • DecodingTaskGraph.get_logical_measurements
        • DecodingTaskGraph.get_num_logical_measurements
        • DecodingTaskGraph.get_num_msyn_per_decode
        • DecodingTaskGraph.get_num_msyn_per_round
        • DecodingTaskGraph.get_num_observables
        • DecodingTaskGraph.get_obs_corrections
        • DecodingTaskGraph.output_names
        • DecodingTaskGraph.reset_decoder
        • DecodingTaskGraph.run
        • DecodingTaskGraph.run_all
        • DecodingTaskGraph.run_batch
        • DecodingTaskGraph.streaming_incompatibility_reason
        • DecodingTaskGraph.streaming_result
        • DecodingTaskGraph.supports_streaming
      • TaskGraphNodeConfig
        • TaskGraphNodeConfig.d_sparse
        • TaskGraphNodeConfig.decoder_type
        • TaskGraphNodeConfig.dem
        • TaskGraphNodeConfig.ensemble
        • TaskGraphNodeConfig.h_sparse
        • TaskGraphNodeConfig.id
        • TaskGraphNodeConfig.kind
        • TaskGraphNodeConfig.max_in_flight
        • TaskGraphNodeConfig.node_params
        • TaskGraphNodeConfig.o_sparse
        • TaskGraphNodeConfig.params
        • TaskGraphNodeConfig.stim_dem
        • TaskGraphNodeConfig.windows
      • TaskGraphEnsembleSpec
        • TaskGraphEnsembleSpec.add_member
        • TaskGraphEnsembleSpec.join_params
        • TaskGraphEnsembleSpec.join_strategy
        • TaskGraphEnsembleSpec.num_members
      • TaskGraphOptions
        • TaskGraphOptions.async_coordinator_cpu
        • TaskGraphOptions.async_num_workers
        • TaskGraphOptions.async_queue_capacity
        • TaskGraphOptions.async_spin_pause_iters
        • TaskGraphOptions.async_streaming
        • TaskGraphOptions.async_worker_cpus
      • TaskGraphStreamingResult
        • TaskGraphStreamingResult.closure
        • TaskGraphStreamingResult.completed_operations
        • TaskGraphStreamingResult.error
        • TaskGraphStreamingResult.generation
        • TaskGraphStreamingResult.operation_completed
        • TaskGraphStreamingResult.outputs
        • TaskGraphStreamingResult.result_revision
        • TaskGraphStreamingResult.shot_epoch
        • TaskGraphStreamingResult.status
        • TaskGraphStreamingResult.values
      • TaskGraphOutputProgress
        • TaskGraphOutputProgress.closure
        • TaskGraphOutputProgress.coverage_begin_round
        • TaskGraphOutputProgress.coverage_end_round
        • TaskGraphOutputProgress.generation
        • TaskGraphOutputProgress.name
        • TaskGraphOutputProgress.released
        • TaskGraphOutputProgress.status
        • TaskGraphOutputProgress.value_offset
        • TaskGraphOutputProgress.value_width
      • TaskGraphStreamingStatus
      • TaskGraphClosure
      • DecoderResult
        • DecoderResult.converged
        • DecoderResult.opt_results
        • DecoderResult.result
      • BatchDecoderResult
        • BatchDecoderResult.batch_opt_results
        • BatchDecoderResult.converged
        • BatchDecoderResult.opt_results
        • BatchDecoderResult.result
      • AsyncDecoderResult
        • AsyncDecoderResult.get
        • AsyncDecoderResult.ready
      • get_decoder()
    • Built-in Decoders
      • NVIDIA QLDPC Decoder
        • nv_qldpc_decoder
        • Relay Solutions Post-Processing
      • NVIDIA Fusion Decoder
        • nv_fusion_decoder
      • Sliding Window Decoder
        • sliding_window
      • TensorRT Decoder
        • trt_decoder
      • Tensor Network Decoder
        • cudaq_qec.plugins.decoders.tensor_network_decoder.TensorNetworkDecoder
      • PyMatching Decoder
        • pymatching
      • Chromobius Decoder
        • chromobius
    • Realtime Decoding
      • Core Decoding Functions
        • cudaq_qec.qec.enqueue_syndromes()
        • cudaq_qec.qec.enqueue_syndromes_mapped()
        • cudaq_qec.qec.get_corrections()
        • cudaq_qec.qec.get_logical_measurements()
        • cudaq_qec.qec.reset_decoder()
      • Configuration API
        • Decoder Parameters
        • Deprecated Typed Configuration Classes
        • Configuration Functions
      • Helper Functions
        • cudaq_qec.pcm_to_sparse_vec()
        • cudaq_qec.pcm_from_sparse_vec()
        • cudaq_qec.d_sparse()
    • Common
      • sample_memory_circuit()
      • x_sample_memory_circuit()
      • z_sample_memory_circuit()
      • sample_code_capacity()
    • Detector Error Model (DEM) Sampling
      • dem_sampling()
    • Parity Check Matrix Utilities
      • generate_random_pcm()
      • generate_timelike_sparse_detector_matrix()
      • get_pcm_for_rounds()
      • get_sorted_pcm_column_indices()
      • pcm_extend_to_n_rounds()
      • pcm_is_sorted()
      • pcm_to_sparse_vec()
      • reorder_pcm_columns()
      • shuffle_pcm_columns()
      • simplify_pcm()
      • sort_pcm_columns()

Releases

  • Release History
    • 0.9.1 — Current Version
    • Published Releases
NVIDIA CUDA-Q QEC
  • Search


© Copyright 2025, NVIDIA Corporation & Affiliates.

Built with Sphinx using a theme provided by Read the Docs.