Table of Contents
Fetching ...

Hyper-optimized Quantum Lego Contraction Schedules

Balint Pato, June Vanlerberghe, Kenneth R. Brown

TL;DR

The paper tackles the computational challenge of quantum weight enumerator polynomials for stabilizer codes by integrating Quantum LEGO with hyper-optimized tensor-network contraction via Cotengra and introducing a Sparse Stabilizer Tensor (SST) cost function. SST leverages the inherent sparsity of stabilizer-tensor intermediates to provide exact polynomial-time estimates of contraction cost, improving both accuracy and stability over dense-tensor assumptions. Applied to PlanqTN-enabled QL layouts (including MSP and Tanner networks across concatenated, holographic, and 2D grid codes), SST-based scheduling delivers substantial speedups—up to orders of magnitude in some cases—and aids in deciding when QL-based WEP calculation is advantageous over brute force. The results support hyper-optimized contraction as a practical tool for exploring QEC code design spaces and guiding the selection of layouts for efficient WEP computation.

Abstract

Calculating the quantum weight enumerator polynomial (WEP) is a valuable tool for characterizing quantum error-correcting (QEC) codes, but it is computationally hard for large or complex codes. The Quantum LEGO (QL) framework provides a tensor network approach for WEP calculation, in some cases offering superpolynomial speedups over brute-force methods, provided the code exhibits area law entanglement, that a good QL layout is used, and an efficient tensor network contraction schedule is found. We analyze the performance of a hyper-optimized contraction schedule framework across QL layouts for diverse stabilizer code families. We find that the intermediate tensors in the QL networks for stabilizer WEPs are often highly sparse, invalidating the dense-tensor assumption of standard cost functions. To address this, we introduce an exact, polynomial-time Sparse Stabilizer Tensor (SST) cost function based on the rank of the parity check matrices for intermediate tensors. The SST cost function correlates perfectly with the true contraction cost, providing a significant advantage over the default cost function, which exhibits large uncertainty. Optimizing contraction schedules using the SST cost function yields substantial performance gains, achieving up to orders of magnitude improvement in actual contraction cost compared to using the dense tensor cost function. Furthermore, the precise cost estimation from the SST function offers an efficient metric to decide whether the QL-based WEP calculation is computationally superior to brute force for a given QL layout. These results, enabled by PlanqTN, a new open-source QL implementation, validate hyper-optimized contraction as a crucial technique for leveraging the QL framework to explore the QEC code design space.

Hyper-optimized Quantum Lego Contraction Schedules

TL;DR

The paper tackles the computational challenge of quantum weight enumerator polynomials for stabilizer codes by integrating Quantum LEGO with hyper-optimized tensor-network contraction via Cotengra and introducing a Sparse Stabilizer Tensor (SST) cost function. SST leverages the inherent sparsity of stabilizer-tensor intermediates to provide exact polynomial-time estimates of contraction cost, improving both accuracy and stability over dense-tensor assumptions. Applied to PlanqTN-enabled QL layouts (including MSP and Tanner networks across concatenated, holographic, and 2D grid codes), SST-based scheduling delivers substantial speedups—up to orders of magnitude in some cases—and aids in deciding when QL-based WEP calculation is advantageous over brute force. The results support hyper-optimized contraction as a practical tool for exploring QEC code design spaces and guiding the selection of layouts for efficient WEP computation.

Abstract

Calculating the quantum weight enumerator polynomial (WEP) is a valuable tool for characterizing quantum error-correcting (QEC) codes, but it is computationally hard for large or complex codes. The Quantum LEGO (QL) framework provides a tensor network approach for WEP calculation, in some cases offering superpolynomial speedups over brute-force methods, provided the code exhibits area law entanglement, that a good QL layout is used, and an efficient tensor network contraction schedule is found. We analyze the performance of a hyper-optimized contraction schedule framework across QL layouts for diverse stabilizer code families. We find that the intermediate tensors in the QL networks for stabilizer WEPs are often highly sparse, invalidating the dense-tensor assumption of standard cost functions. To address this, we introduce an exact, polynomial-time Sparse Stabilizer Tensor (SST) cost function based on the rank of the parity check matrices for intermediate tensors. The SST cost function correlates perfectly with the true contraction cost, providing a significant advantage over the default cost function, which exhibits large uncertainty. Optimizing contraction schedules using the SST cost function yields substantial performance gains, achieving up to orders of magnitude improvement in actual contraction cost compared to using the dense tensor cost function. Furthermore, the precise cost estimation from the SST function offers an efficient metric to decide whether the QL-based WEP calculation is computationally superior to brute force for a given QL layout. These results, enabled by PlanqTN, a new open-source QL implementation, validate hyper-optimized contraction as a crucial technique for leveraging the QL framework to explore the QEC code design space.

Paper Structure

This paper contains 22 sections, 21 equations, 15 figures, 2 tables.

Figures (15)

  • Figure 1: Quantum LEGO building blocks used in the paper. Stoppers (a) are single-qubit states, stabilized by Pauli-$X$ (red) or Pauli-$Z$ (blue) operators. The identity stopper (gray) is the "free qubit", which is only stabilized by the $I$ operator, and thus is a subspace LEGO. The Hadamard LEGO (b) is stabilized by $\langle XZ, ZX\rangle$. The identity LEGO (c) or Bell-state is stabilized by $\langle XX, ZZ\rangle$. The 3, 4, and 5-legged examples of bit-flip-code d) (phase-flip-code e)) encoding tensors stabilized by all weight-two $ZZ$ ($XX$) operators and the $X^{\otimes n}$ ($Z^{\otimes n}$) operator. The subspace LEGO of the $[\![5,1,3]\!]$ code stabilized by $\langle XZZXI,IXZZX,XIXZZ,ZXIXZ\rangle$ (f) equals the $[\![6,0,4]\!]$ perfect encoding tensor traced on the logical leg with an identity stopper. Similarly, the $[\![5,1,2]\!]$ code stabilized by $\langle XXXXI,ZZZZI,XXIIX,ZIZIZ\rangle$ (g) equals the $[\![6,0,3]\!]$ encoding tensor for the $[\![4,2,2]\!]$ code.
  • Figure 2: Cotengra contraction tree overlayed over a 3x3 rotated surface code quantum LEGO network. The $X$ and $Z$-stoppers are conjoined first with the $[\![5,1,2]\!]$ subspace LEGOs, and thus the Cotengra contraction only considers the resulting 9 qubit-wise tensors.
  • Figure 3: Concatenated layout for Shor's code. The blue LEGO is the encoding tensor of the $d=3$ phase-flip code with a single logical leg, while the red LEGOs are the $d=3$ bitflip codes with a single logical leg.
  • Figure 4: The HaPPY pastawskiHolographicQuantumErrorcorrecting2015a code with perfect encoding tensors of the $[\![5,1,3]\!]$ code. The logical legs are omitted, making these LEGOs subspace LEGOs.
  • Figure 5: The MSP network for the $[\![4,2,2]\!]$ code. Logical degrees of freedom are the gray LEGOs, physical ones are the dangling legs off of the identity LEGOs (white) circles. This encoding map has a non-trivial kernel. The $ZZZZ$ stabilizer of the encoding map is highlighted through operator pushing and matching.
  • ...and 10 more figures