Coded Computing Meets Quantum Circuit Simulation: Coded Parallel Tensor Network Contraction Algorithm

Jin Lee, Zheng Zhang, Sofía González-García, Haewon Jeong

Abstract

Parallel tensor network contraction algorithms have emerged as the pivotal benchmarks for assessing the classical limits of computation, exemplified by Google's demonstration of quantum supremacy through random circuit sampling. However, the massive parallelization of the algorithm makes it vulnerable to computer node failures. In this work, we apply coded computing to a practical parallel tensor network contraction algorithm. To the best of our knowledge, this is the first attempt to code tensor network contractions. Inspired by matrix multiplication codes, we provide two coding schemes: 2-node code for practicality in quantum simulation and hyperedge code for generality. Our 2-node code successfully achieves significant gain for $f$-resilient number compared to naive replication, proportional to both the number of node failures and the dimension product of sliced indices.

Introduction: The Challenge of Scale

To demonstrate "quantum supremacy," researchers utilize massive classical supercomputers to simulate quantum circuits. This simulation is fundamentally a task of tensor network contraction. Because these contractions can be decomposed into millions of independent sub-tasks, the process is "embarrassingly parallel," ideally suited for distributed computing environments.

Basic tensor network contraction operations: (a) edge contraction, (b) triangle contraction, and (c) star contraction.

However, operating at the scale of thousands of CPUs or GPUs introduces a significant bottleneck: the "straggler" or failure problem. In a system with millions of concurrent threads, some nodes will inevitably crash or experience latency. Traditional Operating System-level management is often too slow or inefficient for these high-performance tasks. While "naive replication"—running the same task on multiple nodes—is a common fallback, it is prohibitively wasteful of computational resources.

Methods: Bridging Tensor Networks and Coded Computing

This work introduces the first framework for applying coded computing (Algorithm-Based Fault Tolerance) to parallel tensor network contractions. The core idea is to move beyond simple replication by encoding data into polynomials, allowing the system to recover the final result from a subset of successful worker nodes.

1. Tensor Slicing

The standard approach to parallelizing a tensor network is "slicing." By selecting a specific index (an edge in the network graph), the problem is partitioned into $L$ smaller sub-problems based on the dimension of that index. These slices are then distributed across worker nodes.

The process of slicing a tensor network by index 'k' to create parallelizable sub-problems.

2. Polynomial Coding Schemes

Instead of distributing raw slices, the researchers propose encoding these slices into polynomials. If the computation is represented as a polynomial of degree $d$, the full result can be reconstructed using any $d+1$ successful results (interpolation). The paper introduces two primary schemes:

  • 2-node Code: Optimized for standard tensor networks (such as PEPS structures) where edges connect exactly two tensors. This scheme provides the highest efficiency and resilience gain.
  • Hyperedge Code: A generalized version for complex networks where an index may be shared by more than two tensors (hyperedges). While more flexible, it requires higher-degree polynomials and is slightly less efficient.

Key Insights

A major contribution of this research is the generalization of matrix codes. The authors recognized that tensor network contraction is essentially high-dimensional linear algebra, allowing them to adapt existing "MatDot" and "PolyDot" codes for complex, multi-dimensional tensor graphs.

Furthermore, the framework assumes non-adjacent slicing—where sliced indices do not share a common node. This assumption aligns with current heuristics used in quantum simulation optimization and makes the underlying mathematics tractable. Crucially, the codes are designed for compute-bound scenarios; they ensure the computational complexity for each worker remains identical to the uncoded version, adding no overhead to individual nodes.

Results and Resilience

The effectiveness of the proposed methods is measured by the Gain ($\Delta$), representing the number of workers saved compared to naive replication.

  • Resilience: The authors proved that for $n$ sliced indices, the 2-node code achieves an $f$-resilient number of $f + 2\prod L_i - 1$.
  • Efficiency: In practical examples, such as a simulation sliced into $N$ parts, the 2-node code requires significantly fewer workers than the $N(f+1)$ required by replication. For instance, in a specific case with two sliced edges, the coded approach required only 23 workers to handle failures that would have otherwise demanded much higher overhead.

Conclusion

This work establishes a theoretical foundation for resilient quantum circuit simulation. While currently focused on non-adjacent slicing, future research will explore codes for adjacent indices and seek to prove the absolute lower bounds for resilience. The next practical step involves deploying these algorithms on high-performance computing (HPC) clusters to evaluate real-world "wall-clock" time improvements in quantum supremacy benchmarks.

Summary updated

BibTeX
@inproceedings{lee2024coded,
  author = {Jin Lee and Zheng Zhang and Sofía González-García and Haewon Jeong},
  title = {{Coded Computing Meets Quantum Circuit Simulation: Coded Parallel Tensor Network Contraction Algorithm}},
  booktitle = {ISIT},
  year = {2024},
}
Figure