NVIDIA CUDA-QX
0.8.0

Getting Started

  • Installation Guide
    • Installation Methods
      • pip install
      • Docker Container
      • Building from Source
    • Installing PyTorch

Libraries

  • CUDA-Q QEC - Quantum Error Correction Library
    • QEC Codes
      • 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
      • Pre-built QEC Codes
        • Steane Code
        • Repetition Code
        • Surface Code
    • QEC Decoders
      • Decoder Framework cudaq::qec::decoder
        • Class Structure
        • Implementing a New Decoder in C++
        • Example: Lookup Table Decoder
        • Implementing a Decoder in Python
        • Key Features
        • Usage Example
      • Detector Error Model
        • Decoding from Stim DEM Text
        • DEM Sampling
      • 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
    • Realtime Decoding
      • Workflow
      • Terminology and Data Flow
      • See Also
    • Experiments and Noise Modeling
      • Code-Capacity Noise Modeling
      • Circuit-level Noise Modeling
      • Memory Circuit Experiments
    • Conventions

Examples

  • CUDA-Q QEC by Example
    • Creating New QEC Codes
    • 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
    • Decoders
      • Decoding From Stim DEM Text
      • Generating a Multi-Round Parity Check Matrix
      • DEM Sampling — Monte-Carlo Sampling from Detector Error Models
        • Example
        • GPU Acceleration
        • Input Types and Backend Selection
        • See Also
      • Getting Started with the NVIDIA QLDPC Decoder
        • Belief Propagation Methods
        • Usage Example
      • 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
    • Realtime Decoding
      • Getting Started with Realtime Decoding
        • Configuration
        • Backend Selection
        • Compilation and Execution Examples
        • Troubleshooting
      • AI Predecoder with CUDA-Q Realtime
        • Prerequisites
        • Data Directory Layout
        • Building
        • Running
        • Changing the Predecoder Model
        • Reading the Output
        • See Also
      • AI Predecoder with CUDA-Q Realtime (with FPGA Data Injection)
        • Prerequisites
        • Repository Layout
        • Data Directory Layout
        • Building
        • Emulated End-to-End Test
        • FPGA End-to-End Test
        • Changing the Predecoder Model
        • Orchestration Script Reference
        • See Also
      • Relay BP Decoding with CUDA-Q Realtime
        • Decode dispatch architecture
        • Hardware
        • Software
        • Obtaining the proprietary components
        • Source Repositories
        • Build the HSB bridge and playback tools
        • Using the orchestration script
        • Requirements
        • Running the Emulated Test
        • FPGA Requirements
        • Running the FPGA Test
        • GPU Selection
        • Network Sanity Check
        • Modes
        • Actions
        • Build Options
        • Network Options
        • Run Options
        • Ring buffer depth (num_pages)
      • See Also

Performance Studies

  • Performance Studies
    • 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
    • Bounding Real-Time Decode Latency With NV-Fusion
      • What Is Streaming Tail Latency?
      • Experiment Configuration
      • Streaming Tail Latency
      • Latency With Concurrent Decoders
      • See Also

API Reference

  • CUDA-QX Namespaces and Core Library C++ API
    • Namespaces
    • Core
  • CUDA-Q QEC C++ API
    • Code
    • Detector Error Model
    • Detector Error Model (DEM) Sampling
    • Decoder Interfaces
    • 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()
    • Decoder Interfaces
      • Decoder
        • Decoder.decode
        • Decoder.decode_async
        • Decoder.decode_batch
        • Decoder.get_block_size
        • Decoder.get_syndrome_size
        • Decoder.get_version
      • 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.get_corrections()
        • 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()
NVIDIA CUDA-QX
  • CUDA-Q QEC by Example
  • Realtime Decoding
  • View page source
Previous Next

Realtime Decoding

Realtime decoding runs CUDA-Q QEC decoders concurrently with quantum execution, applying corrections within qubit coherence times. For how it works, the four-stage workflow, and terminology, see Realtime Decoding.

The examples below cover realtime decoding end to end — start with Getting Started, then explore the specialized predecoding and decoding workloads:

  • Getting Started with Realtime Decoding
    • Configuration
    • Backend Selection
    • Compilation and Execution Examples
    • Troubleshooting
  • AI Predecoder with CUDA-Q Realtime
    • Prerequisites
    • Data Directory Layout
    • Building
    • Running
    • Changing the Predecoder Model
    • Reading the Output
    • See Also
  • AI Predecoder with CUDA-Q Realtime (with FPGA Data Injection)
    • Prerequisites
    • Repository Layout
    • Data Directory Layout
    • Building
    • Emulated End-to-End Test
    • FPGA End-to-End Test
    • Changing the Predecoder Model
    • Orchestration Script Reference
    • See Also
  • Relay BP Decoding with CUDA-Q Realtime
    • Decode dispatch architecture
    • Hardware
    • Software
    • Obtaining the proprietary components
    • Source Repositories
    • Build the HSB bridge and playback tools
    • Using the orchestration script
    • Requirements
    • Running the Emulated Test
    • FPGA Requirements
    • Running the FPGA Test
    • GPU Selection
    • Network Sanity Check
    • Modes
    • Actions
    • Build Options
    • Network Options
    • Run Options
    • Ring buffer depth (num_pages)

See Also

  • Example source code: libs/qec/unittests/realtime/app_examples

  • Realtime Decoding C++ API

  • Realtime Decoding Python API

Previous Next

© Copyright 2025, NVIDIA Corporation & Affiliates.

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