Table of Contents
Fetching ...

Smarter k-Partitioning of ZX-Diagrams for Improved Quantum Circuit Simulation

Matthew Sutcliffe

TL;DR

This work tackles the challenge of strong classical simulation of quantum circuits by leveraging ZX-diagrams and introducing an optimised k-partitioning approach. It combines GPU-accelerated reduction, parameterised state precomputation, and pairwise regrouping to dramatically reduce the number of terms and cross-references required to obtain the scalar amplitude of a circuit. The authors formalise the ZX-Partitioner, which balances precompute and cross-reference costs to select an optimal partitioning and demonstrates orders-of-magnitude speedups in regimes with shallow, highly interconnected circuits. The approach is complemented by a public Python tool and a discussion of practical trade-offs, including memory overhead and potential enhancements via ZX-calculus-informed partitioning rules.

Abstract

We introduce a novel method for strong classical simulation of quantum circuits based on optimally k-partitioning ZX-diagrams, reducing each part individually, and then efficiently cross-referencing their results to conclude the overall probability amplitude of the original circuit. We then analyse how this method fares against the alternatives for circuits of various size, shape, and interconnectedness and demonstrate how it is often liable to outperform those alternatives in speed by orders of magnitude.

Smarter k-Partitioning of ZX-Diagrams for Improved Quantum Circuit Simulation

TL;DR

This work tackles the challenge of strong classical simulation of quantum circuits by leveraging ZX-diagrams and introducing an optimised k-partitioning approach. It combines GPU-accelerated reduction, parameterised state precomputation, and pairwise regrouping to dramatically reduce the number of terms and cross-references required to obtain the scalar amplitude of a circuit. The authors formalise the ZX-Partitioner, which balances precompute and cross-reference costs to select an optimal partitioning and demonstrates orders-of-magnitude speedups in regimes with shallow, highly interconnected circuits. The approach is complemented by a public Python tool and a discussion of practical trade-offs, including memory overhead and potential enhancements via ZX-calculus-informed partitioning rules.

Abstract

We introduce a novel method for strong classical simulation of quantum circuits based on optimally k-partitioning ZX-diagrams, reducing each part individually, and then efficiently cross-referencing their results to conclude the overall probability amplitude of the original circuit. We then analyse how this method fares against the alternatives for circuits of various size, shape, and interconnectedness and demonstrate how it is often liable to outperform those alternatives in speed by orders of magnitude.
Paper Structure (17 sections, 10 equations, 11 figures, 1 table, 1 algorithm)

This paper contains 17 sections, 10 equations, 11 figures, 1 table, 1 algorithm.

Figures (11)

  • Figure 1: The complete jeandel2020completenessbackens2016completenesszxcalculuswang2023completenesszxcalculus set of fundamental rewriting rules van2020zx in ZX-calculus, where $\alpha,\beta,\ldots\in\mathbb{R}$ and $a,b,\ldots\in\mathbb{B}$ (and $n$ is the number of output wires). These rules likewise hold with all colours inverted.
  • Figure 2: The cutting decomposition, which converts an arbitrary Z-spider into a sum of two Clifford X-spiders (or an arbitrary X-spider into a sum of two Clifford Z-spiders). The approximation symbol ($\approx$) denotes 'equal up to a scalar', meaning there is a global scalar factor neglected here for brevity. Note that this decomposition, in conjunction with introducing a $0$-phase spider upon an edge (as is in the rules of figure \ref{['fig:zxrules']}), allows also for edges to be cut into two terms.
  • Figure 3: A ZX-diagram may be partitioned into two or more disconnected parts (or segments) at the cost of $2^c$ terms, given $c$ cuts.
  • Figure 4: An example of a segment connectivity hypergraph, generated via the ZX-Partitioner.
  • Figure 5: The precomputed segments of a partitioned ZX-diagram may be regrouped pairwise (selecting the cheapest pair to regroup at each step) until one segment remains. The steps in this figure are shown chronologically in row-major order. In each case, the local edges among the cheapest pair are highlighted, with the sum of their weights, $w$, giving the computational cost of regrouping, $2^w$. Regrouping the final remaining pair will provide the overall scalar result. (Note that the edge colours are random and exist for visual clarity but bear no meaning.)
  • ...and 6 more figures