Table of Contents
Fetching ...

Distributed Tensor Network Library for Quantum Computing Emulation

Jakub Adamski, Oliver Thomson Brown

TL;DR

This work tackles the challenge of classically emulating quantum circuits where memory grows exponentially with qubit count. It introduces Quantum Tensor Network Hub (QTNH), a distributed tensor-network library that scatters individual tensors across MPI ranks and uses fixed broadcast patterns, enabling multi-level parallelism beyond traditional circuit slicing. By leveraging ScaLAPACK for contractions and MPI for communication, QTNH demonstrates QFT and RCS emulations and includes a large-scale MPS tensor-factorisation pathway, highlighting accuracy gains and new contraction strategies. The results show QTNH can store and manipulate very large tensors and explore varied contraction orders, providing a flexible, portable alternative for quantum-emulation research with potential extensions to GPU backends and optimised contraction planning.

Abstract

Tensor networks offer an adaptable and efficient approach to emulation of quantum computers. Their usage relies on partitioning circuits into small tensors, which are contracted together to form the final result. While this approach intends to minimise the problem size, exceeding the locally available memory is sometimes unavoidable due to the exponential nature of quantum systems. Most HPC tensor network packages tackle this issue with a procedure called circuit slicing, which distributes the entire network onto multiple ranks, recombining it back when necessary. In this study, we present a novel alternative approach, where individual tensors are both broadcast and scattered to harness multiple levels of parallelism. The technique is abstracted behind a fixed distribution pattern, and actualised in a new portable tensor network library, QTNH, built on top of MPI and ScaLAPACK. We showcase its capabilities on ARCHER2, by emulating two well-known algorithms - the Quantum Fourier Transform and Random Circuit Sampling. This is accomplished by leveraging the implemented operations to realise various contraction strategies, including a unique distributed MPS tensor factorisation approach. We thus demonstrate that our library can be used to advance the accuracy of quantum emulation, while offering a simple and flexible interface to tensor distribution.

Distributed Tensor Network Library for Quantum Computing Emulation

TL;DR

This work tackles the challenge of classically emulating quantum circuits where memory grows exponentially with qubit count. It introduces Quantum Tensor Network Hub (QTNH), a distributed tensor-network library that scatters individual tensors across MPI ranks and uses fixed broadcast patterns, enabling multi-level parallelism beyond traditional circuit slicing. By leveraging ScaLAPACK for contractions and MPI for communication, QTNH demonstrates QFT and RCS emulations and includes a large-scale MPS tensor-factorisation pathway, highlighting accuracy gains and new contraction strategies. The results show QTNH can store and manipulate very large tensors and explore varied contraction orders, providing a flexible, portable alternative for quantum-emulation research with potential extensions to GPU backends and optimised contraction planning.

Abstract

Tensor networks offer an adaptable and efficient approach to emulation of quantum computers. Their usage relies on partitioning circuits into small tensors, which are contracted together to form the final result. While this approach intends to minimise the problem size, exceeding the locally available memory is sometimes unavoidable due to the exponential nature of quantum systems. Most HPC tensor network packages tackle this issue with a procedure called circuit slicing, which distributes the entire network onto multiple ranks, recombining it back when necessary. In this study, we present a novel alternative approach, where individual tensors are both broadcast and scattered to harness multiple levels of parallelism. The technique is abstracted behind a fixed distribution pattern, and actualised in a new portable tensor network library, QTNH, built on top of MPI and ScaLAPACK. We showcase its capabilities on ARCHER2, by emulating two well-known algorithms - the Quantum Fourier Transform and Random Circuit Sampling. This is accomplished by leveraging the implemented operations to realise various contraction strategies, including a unique distributed MPS tensor factorisation approach. We thus demonstrate that our library can be used to advance the accuracy of quantum emulation, while offering a simple and flexible interface to tensor distribution.
Paper Structure (22 sections, 13 equations, 15 figures, 2 tables)

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

Figures (15)

  • Figure 1: Example $5$-qubit QFT diagram. Magenta lines correspond to controlled phase gates, where the phase angle is $\phi = \frac{2\pi}{2^k}$, and $k$ is given above the gate.
  • Figure 2: Example RCS diagram of a quantum processor with $3 \times 3$ qubit layout. Each layer has a sequence of random gates (selected from $\hat{X}^{1/2}, \hat{Y}^{1/2}, \hat{W}^{1/2}$), and a sequence of two-qubit fSim gates (iSWAP followed by a controlled phase shift by $\frac{\pi}{6}$) according to one of four patterns ($A, B, C, D$). The layer pattern sequence used is $ABCDCDAB$.
  • Figure 3: Example network with 7 tensors and 11 bonds.
  • Figure 4: Tensor distribution in QTNH of a $\left(2,3,4,2\right)$ tensor. Fig. \ref{['fig:mem-layout']} shows the process of scattering the first two indices. Fig. \ref{['fig:bcast-pattern']} visualises different broadcast patterns -- here each colour indicates a different copy of the tensor.
  • Figure 5: Examples of permuting indices of a $\left(2;2,4,2\right)$ tensor. Moving the 4-dimensional local index to the distributed position is an asymmetric permutation and requires more MPI ranks than the original tensor.
  • ...and 10 more figures