Manuscript Offprint
arXiv:2610.31554ArcTN: Efficient Tensor-Network Contraction Planning for Quantum Circuit Simulation
Zhengyi Liu , Li Liu , Songtao Liu , Xianglong Liu , Xiangzhen Zhou , Mingyu Huang , Dingchao Gao , Shenggang Ying , Ji Guan , and Bolong Chen
Arclight Quantum Computing Inc.
HYGON
Institute of Software, Chinese Academy of Sciences
Nanjing Tech University
Abstract. Efficient tensor-network simulation of quantum circuits critically depends on finding contraction orders that minimize computational cost without excessive optimization overhead or large intermediate tensors. We present ArcTN, a contraction-order optimization framework that addresses these challenges through adaptive search and memory-aware slicing. ArcTN provides two complementary search presets, Light and Heavy, that combine diversified initial orders, adaptive randomized-greedy search, selective subtree reconfiguration, and parallel tempering with stage-specific stopping criteria. Light prioritizes low planning overhead, whereas Heavy performs more extensive refinement to obtain lower-cost contraction orders. The framework also supports Fixed and Dynamic slicing to control intermediate tensor sizes, together with numerical execution using optimized contraction orders. We evaluate ArcTN on QC32, a benchmark comprising 32 quantum-circuit tensor networks, against established contraction optimizers. On the 30 circuits completed by all eight main configurations, ArcTN Light reduces contraction FLOPs by 61.32% with a 1.62× planning-time speedup over Cotengra Auto/CMA-ES. ArcTN Heavy reduces FLOPs by 43.83% with a 7.21× planning-time speedup over Cotengra AutoHQ/Optuna, and by 11.85% with a 1.33× speedup over OMECO TreeSA-8. For memory-constrained contractions, Dynamic slicing satisfies the prescribed intermediate-tensor size limits in all 90 runs on the 18 common scalar-output instances and reduces total sliced FLOPs by 31.99% relative to Fixed slicing, at the cost of additional planning time. Experiments with a common NumPy executor further demonstrate that ArcTN Heavy achieves the lowest combined planning and execution time among five evaluated configurations on their shared successful cases. On 672 additional networks built from 320 MQT Bench circuits for amplitude, expectation-value, and state tasks, ArcTN Heavy obtains the lowest geometric-mean FLOPs on the 142 large networks while planning 3.1× and 31× faster than Cotengra AutoHQ and Hyper128.
Keywords: Tensor networks · Contraction order optimization · Quantum circuit simulation · Slicing.
1 Introduction
Classical simulation supports the development of quantum algorithms, the validation of quantum devices, and the study of quantum dynamics [2]. Many simulation tasks require
Z. Liu et al.
only selected quantities, such as a circuit amplitude or an expectation value, rather than the complete quantum state. Tensor networks (TNs) provide a common representation for these computations. Tensors encode operations and states, and contraction evaluates the requested quantity by multiplying tensor entries and summing over non-output indices [17,8]. This representation allows a simulator to exploit the structure of the circuit and the requested output without explicitly constructing the full state vector.
However, a tensor-network representation does not by itself ensure efficient simulation. The same network can be contracted in many different orders, with substantially different arithmetic costs and intermediate tensor sizes [17,19,8]. An unsuitable order can make a contraction unnecessarily expensive or produce tensors too large to store. Efficient simulation therefore depends on contraction planning, which selects an order that reduces computational cost while accounting for the resources needed to find and execute it.
The difficulty is that contraction planning must balance three coupled concerns. First, the returned order should have low computational cost. Second, finding that order should not require excessive planning time. More extensive search may improve an order, but its additional cost must be justified by the execution savings, either for one expensive contraction or across repeated contractions with the same network structure. Third, the plan must accommodate tensor-size constraints. Slicing selected indices splits a contraction into smaller tasks and reduces individual tensor sizes, but can increase the total computation across those tasks [8]. These concerns cannot be treated independently, because the order determines which tensors become large, while slicing changes the costs of alternative orders. A good unsliced order is therefore not necessarily a good starting point for a low-cost sliced computation.
Existing optimizers, including Cotengra [8], OMECO [14], and TNCO [16], provide techniques for constructing and improving contraction orders. The practical challenge is not simply to search more extensively, but to coordinate these techniques. Which initial orders should be explored, which candidates deserve further refinement, when should a search stage stop, and how should the order be revised when slicing is required? Moreover, improvements in modeled operation count must be assessed alongside actual execution time, since fewer operations do not by themselves guarantee faster execution on a particular backend.
We present ArcTN, a contraction-planning tool that addresses these concerns through adaptive search and tensor-size-aware slicing. Its two complementary search presets, Light and Heavy, organize established construction and refinement techniques with different levels of planning effort. Both use the cross-entropy method to adapt random-greedy candidate generation, retain multiple starting orders, and selectively refine candidates through subtree reconfiguration and parallel tempering. Retaining multiple starting points allows refinement to explore orders whose initial costs may not reflect their eventual quality. Stage-specific stopping criteria, together with overall time- and rate-based checks, control the effort spent on construction and refinement. Light prioritizes low planning overhead, whereas Heavy devotes more effort to obtaining lower-cost orders.
For tensor-size constraints, ArcTN provides Fixed and Dynamic slicing. Fixed selects sliced indices while preserving the chosen contraction order. Dynamic additionally alternates slice selection with local order refinement, retaining the feasible plan with the lowest modeled total cost across all slices. This allows the order to be reconsidered as slicing changes the computation, rather than treating slicing solely as a postprocessing step. Both modes target a user-specified bound on the size of each contraction result within a slice.
ArcTN implements this workflow in Rust with Python interfaces. Given a tensor-network description, it validates the input, searches for an order, optionally constructs a sliced plan, and supports numerical execution through a native CPU executor or an external array backend. Execution plans can be retained and reused with new tensor values without repeating the order search, connecting planning to both one-off and repeated computations.
In summary, the main contributions of this tool paper are:
-
A coordinated planning framework. We organize adaptive candidate generation, selective refinement, and stopping control into the Light and Heavy search presets, complemented by Fixed and Dynamic slicing for tensor-size constraints.
-
An executable contraction tool. We provide a Rust implementation with Python interfaces that connects order search and slicing to numerical execution, reusable execution plans, and integration with external tensor-network workflows.
-
An evaluation of planning and execution benefits. We evaluate ArcTN on QC32, the 32 quantum-computing instances from Einsum Benchmark [3], and on 672 networks built from 320 MQT Bench circuits [20]. On QC32, Light reduces modeled FLOPs by 61.32% with a 1.62× planning-time speedup over Cotengra Auto/CMA-ES, while Heavy reduces FLOPs by 43.83% with a 7.21× speedup over Cotengra AutoHQ/Optuna. With a common NumPy executor, Heavy also achieves the lowest combined planning–execution time among five configurations. Dynamic reduces total sliced FLOPs by 31.99% relative to Fixed for scalar outputs. On the large MQT Bench networks, Heavy obtains the lowest geometric-mean FLOPs while planning 3.1× and 31× faster than Cotengra AutoHQ and Hyper128.
The remainder of this paper is organized as follows. Section 2 introduces tensor networks and formalizes contraction planning, its cost model, and tensor-size constraints. Section 3 presents the architecture and capabilities of ArcTN, including execution and plan reuse. Section 4 describes the contraction-order search framework and the Fixed and Dynamic slicing methods. Section 5 describes the exact integer cost arithmetic of ArcTN's dynamic programs. Section 6 evaluates planning efficiency, contraction quality, numerical execution, and slicing under tensor-size constraints, and planning on circuits from MQT Bench. Section 7 discusses related tools, and Section 8 concludes the paper.
2.1 Tensor Networks and Contraction
A tensor-network contraction problem specifies input tensors , an ordered tuple of index labels for each tensor , a positive integer dimension for
Z. Liu et al.
every label , and an ordered tuple of distinct output labels [4]. The tuple assigns one index label to each axis of the input tensor , in axis order. Each label denotes a variable , and all axes with that label have dimension and use the same variable. Let be the set of distinct labels in , let , and let be the set of labels in . The contraction computes
Here, lists variable values in the axis order of . The sum ranges over all assignments to non-output labels, while output labels are retained in the order specified by , yielding a scalar when is empty. Because explicitly determines which labels remain in the result, even a label shared by several inputs can be retained. More generally, a label may occur in any number of tensors, and if it appears on multiple axes of the same tensor, those axes use the same variable value, selecting the corresponding diagonal entries.
In quantum circuit simulation, local gates and initial states can be represented as tensors, with connected indices expressing the composition of operations [17], as in Figure 1. The requested quantity determines the remaining connections and output labels. For example, fixing all final basis indices yields an amplitude, while retaining selected indices yields a tensor of amplitudes. Figure 2 shows these and other common constructions. Once this network has been constructed, contraction planning depends on its labels, dimensions, and requested output. Numerical tensor entries are needed only for execution.
(a) Three-qubit circuit
(b) Tensor network

Fig. 1. A quantum circuit and its tensor-network representation.
2.2 Contraction Orders and Their Costs
For , a binary contraction order consists of steps. At step , two current tensors and are replaced by a result . A label in either operand is retained if it occurs in another current tensor outside the pair or belongs to . All other labels of the operands are summed over. This rule ensures that an index shared by several tensors is not eliminated prematurely. An order can be represented by a rooted binary tree whose
(a) Full state vector

(b) Single amplitude

(c) Expectation value

(d) Reduced density matrix
Fig. 2. Tensor-network constructions for common circuit outputs, illustrated for a two-qubit state. Here denotes the circuit tensor network and its complex conjugate. (a) Retain physical output indices to obtain a state tensor. (b) Attach computational-basis bras to all outputs to obtain a single amplitude. (c) Contract the ket and bra networks through an observable to obtain an expectation value. (d) Trace out qubit while retaining subsystem indices to obtain a reduced density matrix.
leaves are input tensors and whose internal nodes are contraction results. A concrete execution order additionally specifies the sequence in which independent subtrees are evaluated.
Different orders compute the same expression in exact arithmetic, but their costs can differ considerably. Consider
Contracting and first produces a tensor, whereas contracting and first produces an tensor. Table 1 compares the resulting orders using the cost model below. Both produce the same output, but the second order requires four times as many modeled operations and a fourfold larger maximum result tensor.
Table 1. Two orders for Eq. (2). Step costs and total cost count modeled scalar multiplications, and counts elements, including the final output.
| Order | First result | Step costs | ||
|---|---|---|---|---|
| (AB)C | 64 | 16 | ||
| A(BC) | 256 | 64 |
Let denote the set of distinct index labels of a tensor , and let denote its number of elements. We define the modeled cost of a binary step and of a complete order as follows:
The count uses operand labels before elimination, including one-sided reductions, and excludes separate costs for unary preprocessing and backend-specific operations.
Z. Liu et al.
Each distinct label contributes one dimension factor. Throughout this paper, FLOPs refers to this scalar-multiplication count convention. This count is computed from the network structure and index dimensions, whereas the operations performed during execution depend on the backend.
Each result has one axis per retained label, so its size is , with an empty product equal to one. The largest contraction result is
This metric gives the number of elements in the largest individual contraction result, including the final output. To assess total process memory, we must also account for input storage, all simultaneously live results, element type, execution order, and backend workspace.
2.3 Planning Objectives and Practical Tradeoffs
Using the cost model above, the unsliced order optimization problem is
where N denotes the network description, including input index-label tuples, index dimensions, and ordered output labels, and denotes the set of all valid binary contraction orders for N.
In practice, finding a low-cost order also takes time, so the planner must balance search effort against the expected execution savings. More extensive search may be worthwhile for an expensive contraction or when a plan is reused across many contractions with the same structure and shapes. For a small contraction, however, the search itself can dominate the total time. These differences motivate configurable search effort and stopping criteria that limit planning overhead.
Although provides a common objective for comparing orders, execution time also depends on data layout, memory traffic, and the shapes of individual operations. We therefore evaluate both planning time and numerical execution time to assess the practical benefit of the returned orders. In addition, intermediate tensor sizes determine the storage needed to execute a plan, which motivates the constrained formulation below.
2.4 Slicing under Tensor-Size Constraints
When a contraction result exceeds the available tensor-size budget, slicing can reduce its size by fixing selected index variables and evaluating the resulting smaller contractions separately [8]. Enumerating all assignments to the selected variables produces
slice tasks, where denotes the set of sliced labels. Because each selected variable has a fixed value within a slice, its dimension is effectively one when evaluating that slice's cost and tensor sizes. The size requirement is then
(7) where denotes order evaluated with the sliced variables fixed, and is the maximum allowed number of elements in any result tensor within a slice, including its output.
For example, the order in Eq. (2) forms a 64-element intermediate. Slicing b instead gives eight contractions indexed by :
Each has eight elements and each partial output has 16, so the sliced plan meets a limit of 16. However, its modeled total cost remains , excluding the final accumulation, whereas the unsliced order already meets the same limit at cost 64. This example shows why the contraction order and slice set should be considered together when seeking a low-cost feasible plan.
To compare such plans, we account for the work across all slices. Under a fixed dense schedule, every slice has the same modeled cost, giving
This expression assumes that slices are executed independently and excludes final accumulation and output assembly. Consequently, a contraction independent of a sliced variable may be repeated for each of its values, increasing the total work. We therefore seek an order and slice set that minimize this total while satisfying the size constraint:
where denotes the set of labels eligible for slicing. Each candidate plan is thus a pair , evaluated by its total cost and its per-slice size .
To recover the final output, slice results are assembled according to the labels in S. When internal indices are sliced, the partial results are summed as in Eq. (8), whereas slicing output indices produces distinct blocks of the final result. If both types are sliced, the partial results are summed within each output block. Although output slicing reduces the size of each block, materializing the complete output still requires storage for all its elements. This storage must be included when assessing total process memory, together with the other factors discussed in Section 2.2.
3 ArcTN: Architecture and Capabilities
ArcTN takes the network description from an upstream application and turns it into a contraction plan. Figure 3 outlines this workflow. Planning uses the network structure and dimensions, while execution additionally consumes the numerical tensors. This separation allows the same planning interface to support direct contraction, integration with an external executor, and reuse with new tensor values.
Z. Liu et al.

Fig. 3. The ArcTN workflow. Upstream software constructs the tensor network from a circuit and a simulation task. ArcTN searches for a contraction order, optionally slices the network, and executes the contraction on its native CPU executor or an external array backend.
3.1 Planning Interfaces and Controls
The Python interfaces expose the workflow at different levels. For applications that manage numerical execution themselves, arctn_path returns a contraction path, while arctn_schedule also reports its costs, sliced indices, and planning metadata. Applications that need an executable object can use arctn_plan, and arctn_contract provides a direct route to the numerical result. In addition, ArcTNOptimizer and arctn_tree support integration through paths and Cotengra contraction trees.
Within these interfaces, Light and Heavy provide two levels of search effort. Light emphasizes low planning overhead, whereas Heavy devotes more work to candidate refinement. Users can also specify a random seed, a cooperative search-time limit, and a rate-based stopping condition. These controls allow the planning effort to reflect the expected cost and reuse of the contraction.
When a size target is requested, Fixed or Dynamic slicing augments the selected order with a slice set. The target_size option specifies in Eq. (7), and allow_output_slicing determines whether output labels are eligible. This option defaults to False. The direct execution interface supports both internal- and output-index slicing and assembles the complete result according to Section 2.4.
3.2 Numerical Execution and Plan Reuse
The native CPU executor follows the contraction path and expresses each binary contraction as batched matrix multiplication. Shared labels retained in the current contraction result form batch dimensions, while eliminated shared labels form the matrix multiplication's inner dimension. After any one-sided reductions, axis permutations and reshapes expose these groups, and the executor calls the real or complex kernels of matrixmultiply. Alternatively, a fixed expression prepared by opt_einsum [23] delegates execution to an explicitly selected array backend, such as NumPy, CuPy, PyTorch, or JAX.
For repeated computations, ArcTNExecutionPlan stores the network structure, contraction path, and optional sliced indices. Because this object is serializable, a saved plan can be loaded and executed without repeating the search. For reuse within a running process, ArcTNCompiledContraction provides a compiled object for a fixed network and contraction path. This interface currently supports unsliced contractions and keeps its compiled state within the process. These two forms of reuse accommodate applications that either persist plans between runs or repeatedly execute one structure during a calculation.
3.3 Availability
The repository and documentation are available at https://github.com/Quill-ArcLight/ArcTN. The public repository also contains all benchmark scripts, input manifests, and recorded results so that returned paths and reported costs can be inspected independently.
4 Contraction Planning in ArcTN
ArcTN first constructs several candidate orders, then improves selected candidates and returns the lowest-cost order found. Keeping multiple starting points allows refinement to explore orders whose initial costs may not reflect their eventual quality. The framework combines random-greedy construction [8], subtree reconfiguration [6], and parallel tempering [24,10], with separate controls for the work spent at each stage.
4.1 Candidate Generation
Both Light and Heavy generate multiple initial contraction orders using random-greedy construction [8]. To guide later attempts, both use the cross-entropy method (CEM) to adjust how construction parameters are sampled based on the costs of previously generated orders [21]. Light additionally generates orders through recursive partitioning [8].
To obtain different starting points, both presets search the network supplied by the user (the original network) and a version produced by preprocessing (the simplified network). An order found for the simplified network is converted into a complete sequence of contractions for the original input tensors. All resulting orders can therefore be compared using the same cost on the original network, and the most promising ones are selected for refinement. Heavy also keeps the orders found on the simplified network as starting points for an additional search, described next.
Random-greedy construction builds an order one contraction at a time. At each step, it assigns a local heuristic cost to each pair of current tensors to guide the choice of the next contraction, with lower values preferred. One such cost is
Z. Liu et al.
where C is the result of combining A and B, counts tensor elements, and controls the weight given to the input sizes. This local heuristic cost favors a smaller result relative to its inputs. To generate different orders across attempts, the planner randomly chooses the next pair from at most eight pairs that share an index and have the lowest local heuristic costs, using
where denotes the set of pairs considered, is the local heuristic cost of pair , and is the lowest such cost in that set. The parameter controls randomness. For , pairs are sampled according to Eq. (12), with smaller values favoring lower-cost pairs more strongly. For , the planner follows the greedy rule and selects a pair with the minimum local heuristic cost, breaking ties arbitrarily. If the remaining tensors share no indices, it combines them by outer products, starting with the smallest tensors. Once the order is complete, its cost is evaluated using from Eq. (3).
4.2 Selective Refinement
After generating initial orders, the planner selects low-cost orders for improvement. It first changes small parts of each selected contraction tree, a procedure called subtree reconfiguration [6]. The input tensors and output indices of the selected part remain fixed, while dynamic programming (DP) compares alternative ways to combine those inputs by reusing solutions to smaller subproblems. The replacement is accepted only if it lowers . Heavy applies this refinement to more candidates than Light, as summarized in Table 2.
Local changes can stop improving an order even when better orders exist elsewhere in the search space. To explore further, the planner uses the best candidates to start an initial parallel-tempering search [24,10]. This method runs several search sequences, or chains, at different temperatures. Temperature controls the willingness to accept a temporary cost increase, and chains can exchange their current orders. This allows the search to explore alternatives beyond those reached by local improvement alone. To decide whether further exploration is worthwhile, the planner checks how much this initial search has reduced the best cost from its value at the start of the search. If the reduction meets the requirement set by the chosen preset, it continues the same search to seek further improvements, keeping the lowest-cost order found throughout.
Heavy also searches the simplified network through parallel tempering, followed by optional fixed-leaf-order dynamic programming. This procedure keeps the input tensors in the same left-to-right order and searches for a lower-cost way to combine them in pairs. For example, it can change to while preserving the sequence A, B, C, D. The resulting candidates are converted into orders for the original input tensors and compared using , after which the better order can receive a final subtree reconfiguration. Table 2 summarizes the refinement stages, and Algorithm 1 gives their execution conditions.
Algorithm 1 High-level scheduling of Light and Heavy order search
Input: Network N, preset
Output: Lowest-cost complete order found on N
Checks: TIMEREMAINS is true before the time limit. SEARCHALLOWED additionally checks the optional rate rule described in Section 4.3.
1: Generate candidates under p on N and its simplified version
2: distinct complete candidates converted to N and evaluated by F
3: distinct initial orders on
4: if then
5: Construct and evaluate a greedy order on N, then add it to C
6: end if
7: up to two (Light) or eight (Heavy) lowest-cost orders from C
8: while and SEARCHALLOWED do
9: Remove an order P from R
10: Apply subtree reconfiguration to P and add the returned order to C
11: end while
12: if and SEARCHALLOWED then
13: Run an initial parallel-tempering search from the two best orders in C, adding its best order to C
14: if the initial search reduces the best cost sufficiently under p and SEARCHALLOWED then
15: Continue the same parallel-tempering chains and add their best order to C
16: end if
17: end if
18: if , , and SEARCHALLOWED then
19: best order from parallel tempering on using candidates selected under p from Q
20: Convert Q to P on N and evaluate
21: if TIMEREMAINS and has at most 5000 tensors then
22: Apply fixed-leaf-order dynamic programming to Q
23: if a complete order is returned then
24: Convert the result to on N and evaluate
25: if then
26:
27: end if
28: end if
29: end if
30: if TIMEREMAINS then
31: order returned by subtree reconfiguration of P
32: end if
33: Add P to C
34: end if
35: return
Z. Liu et al.
Table 2. Search structure of the two presets. Algorithm 1 specifies the checks that control entry to each stage.
| Stage | Light | Heavy |
|---|---|---|
| Initial orders | Random-greedy with CEM and recursive partitioning | Random-greedy with CEM |
| Selected subtree refinement | Up to 2 candidates | Up to 8 candidates |
| Parallel tempering on the original network | Initial search with conditional continuation | Initial search with conditional continuation |
| Additional refinement | — | Simplified-network tempering, optional fixed-leaf-order DP, final subtree reconfiguration |
4.3 Search Control
The planner controls search effort at two levels. Each refinement stage stops when it no longer makes sufficient progress, allowing a later stage to try a different way of improving the order. The overall search is also bounded by a user-specified time limit and an optional rate rule that relates planning effort to the expected execution cost.
Following Cotengra [6], the rate rule estimates execution time as , where denotes the current best order and is an assumed number of modeled operations per second. Once elapsed search time exceeds this estimate, the rule prevents further work at the checks shown in Algorithm 1. Thus, finding a cheaper order can also shorten the remaining search. Section 6.1 gives the rate values and time limits used in the experiments.
Algorithm 1 schedules candidate generation and refinement as described in Sections 4.1 and 4.2. Here, a complete order contracts all inputs to the requested output, and “best” means lowest modeled cost on the network being searched. All orders added to C are complete and evaluated using F on the original network. For the candidate sets C and Q, denotes the number of orders.
4.4 Fixed and Dynamic Slicing
After choosing a contraction order, the planner can apply slicing to meet the tensor-size limit from Section 2. The Fixed slicing mode keeps that order unchanged and starts with no sliced labels. It progressively selects labels from results that exceed , aiming to bring all results within the limit. The Boolean option allow_output_slicing controls whether labels of the final output may be selected for slicing.
Because slicing changes tensor sizes, an order chosen before slicing may no longer be a good choice for each slice. Dynamic therefore alternates slice selection with local changes to the order. It first applies the Fixed procedure to the given contraction order , selecting a slice set such that meets the size limit. It then represents one slice by setting the selected index dimensions to one and applies subtree reconfiguration. A revised order is accepted when it does not increase the cost of that slice, that is, . With this revised order, the next round selects labels again from an empty slice set and checks the size limit. Since a new slice set can change the number of tasks, Dynamic compares the resulting feasible plans by their total cost and retains the cheapest one.
The two modes therefore offer different levels of planning effort. Fixed selects slices for an existing order, while Dynamic also revises the order to reduce the total sliced cost. Section 6.4 compares them from the same initial orders and reports the settings used in the experiments.
5 Implementation Design
This section describes how ArcTN evaluates candidate costs in the dynamic programs of Section 4.2.
Exact integer costs. Subtree reconfiguration and fixed-leaf-order DP compare many candidate pairwise contractions. Because costs grow exponentially with the number of indices, a floating-point implementation compares them as base-2 logarithms, and adding two costs then requires a logarithm and an exponential. When every index has dimension two, as in all quantum-circuit networks evaluated here, ArcTN instead represents these costs as exact 128-bit unsigned integers. A tensor with k indices then has elements, obtained by a bit shift, and costs are combined by integer addition. Integer costs also compare tied orders exactly instead of up to rounding. In our tests, integer costs make the subtree-reconfiguration DP about 7% faster and fixed-leaf-order DP 13–19% faster without changing the results.
Overflow guard and fallback. Before using integer costs, ArcTN checks a conservative bound on the cost of every complete order, for the FLOPs objective, where is the number of input tensors and is the number of distinct indices or the largest number of axes of any input tensor, whichever is greater. Integer costs are used only if this bound fits in 128 bits, so they cannot overflow. Otherwise, or if some index has another dimension, the dynamic programs use the logarithmic arithmetic, so every network remains supported.
6 Evaluation
We evaluate how quickly ArcTN finds low-cost orders, whether those orders reduce numerical execution time, how effectively slicing meets tensor-size limits, and whether these results carry over to accelerator hardware and to a larger collection of circuits. The experiments compare planning performance, execution through a shared numerical backend, and the costs of sliced plans.
6.1 Experimental Setup
Benchmarks. We use QC32, the 32 quantum-computing instances in Einsum Benchmark [3], comprising 20 scalar-output and 12 tensor-output networks (Appendix A). These include random circuits, circuits for combinatorial optimization, and quantum Fourier transforms. All methods receive the same network descriptions, with every index having dimension two.
Z. Liu et al.
Baselines and configurations. We compare Light and Heavy with six baseline configurations from three tools. For Cotengra [8], we test Auto with CMA-ES [9] and AutoHQ with Optuna [1] for search-parameter tuning, along with Hyper128, which combines greedy construction, KaHyPar [22] network partitioning, and subtree reconfiguration. OMECO's TreeSA [14,15,12] improves contraction trees through simulated annealing (SA) [13]. Google TNCO [16] also uses simulated annealing, and we test it with and without tensor fusion. These configurations cover different ways of constructing and refining contraction orders.
Table 3 gives the search budgets and stopping rules for all eight configurations. All target low FLOPs and are run five times per instance, with Light and Heavy using the rate rule from Section 4.3. We compare Light, which limits planning overhead, with Cotengra Auto, the other low-overhead preset, which uses the same rate value. We compare Heavy, which spends more effort on refinement, with AutoHQ, which uses the same rate value, and with Hyper128, OMECO, and TNCO, which search for low-cost orders until fixed trial or step limits. Figure 4 shows all eight configurations together.
Table 3. Main contraction-order search configurations. The planners check the listed time limits internally. Rate values are modeled operations per second.
| Configuration | Search settings | Limits and stopping |
|---|---|---|
| ArcTN Light | Light preset | 3600 s, rate |
| ArcTN Heavy | Heavy preset | 3600 s, rate |
| Cotengra Auto/CMA-ES | Auto preset with CMA-ES | Up to 128 trials, rate |
| Cotengra AutoHQ/Optuna | AutoHQ preset with Optuna | Up to 128 trials, rate |
| Cotengra | Greedy and KaHyPar with | Up to 128 trials, 3500 s |
| Hyper128/Optuna | Optuna, subtree size 12 | |
| OMECO TreeSA-8 | Simulated annealing | 8 trials, 50 iterations |
| Google TNCO SA | No fusion or decomposition of indices shared by more than two tensors | 8 trials, 1000 steps |
| Google TNCO SA (fuse=4) | Fusion enabled with the same SA settings | 8 trials, 1000 steps |
Environment and timing. Experiments ran on a server equipped with Intel Xeon Platinum 8253 processors at 2.20 GHz and approximately 2.95 TiB of memory. Every configuration used a fixed set of eight physical cores per run and a 3600-s external time limit. We ran up to 12 experiments concurrently on the server, with a limit of eight for TNCO. Table 4 lists the software versions.
Planning time is measured from calling the planner until it returns, excluding numerical execution. We evaluate all returned plans on the original networks using the same cost model from Section 2.
For TNCO, later reconstruction and selection of orders are excluded from this time. Tensor fusion is included in both planning time and reported cost.
Table 4. Software versions used in the evaluation. quimb constructs the MQT Bench networks of Section 6.6.
| Software | Version | Software | Version |
|---|---|---|---|
| Python | 3.12.3 | NumPy | 2.2.6 |
| ArcTN | 1.0.0 | opt_einsum | 3.4.0 |
| Cotengra | 0.8.2 | Optuna | 4.9.0 |
| cotengrust | 0.2.1 | CMA-ES package | 0.13.0 |
| OMECO | 0.2.6 | KaHyPar | 1.3.5 |
| Google TNCO | 0.4.0 | OpenBLAS | 0.3.29 |
| quimb | 1.15.0 |
Metrics and aggregation. Besides FLOPs and largest-result size , we report total output writes , the total number of result elements produced across all contraction steps. Peak live elements measure the maximum combined size of input tensors and contraction results stored at the same time, in elements.
In the planning experiment (Section 6.2), the median of five runs gives a representative value for each instance. We then take the geometric mean of these values across instances for which every configuration completed all five runs. Speedup is the baseline planning time divided by ArcTN's planning time. In the execution experiment (Section 6.3), we take geometric means over runs for the same instances and repeats that all compared configurations completed. In the slicing experiments (Section 6.4), we first take the geometric mean over five runs per instance and then across instances. Section 6.6 defines the ratios reported for MQT Bench.
6.2 Planning Efficiency and Contraction Quality
OMECO completed 152 of 160 planning runs, while every other compared configuration completed all 160. To compare all configurations on the same instances, we exclude the two instances for which OMECO did not complete all five runs. The comparison therefore covers the remaining 30 instances, each with five successful runs per configuration.
Figure 4 summarizes planning time and contraction cost on these 30 instances. Light spends less time planning than Heavy, while Heavy achieves the lowest modeled FLOPs among all eight configurations. Light improves on all three Cotengra configurations in both planning time and FLOPs, and Heavy improves on AutoHQ and Hyper128 in both. Table 5 quantifies these benefits. Light is faster than Cotengra Auto and reduces FLOPs by , while Heavy is faster than Cotengra AutoHQ with fewer FLOPs and also outperforms OMECO on both measures. Compared with TNCO, Heavy spends longer searching and obtains substantially lower FLOPs.
Heavy has the lowest geometric mean for all four reported cost and storage measures among the compared configurations. However, a lower modeled cost does not directly establish an execution-time benefit, so we next execute the returned orders using the same numerical backend.
Z. Liu et al.

Fig. 4. Planning time (horizontal axis) and FLOPs (vertical axis) averaged over all 30 instances. Points in the bottom left indicate better performance.
Table 5. Planning comparisons on the same 30 instances, with five completed runs per configuration on each instance. Reductions are percentages relative to the baseline. Writes, largest, and peak denote , , and .
| Comparison | Search | Reduction (%) | |||
|---|---|---|---|---|---|
| ArcTN / baseline | speedup | FLOPs | Writes | Largest | Peak |
| Light / Auto | 1.62× | 61.32 | 64.16 | 59.39 | 61.30 |
| Heavy / AutoHQ | 7.21× | 43.83 | 34.96 | 39.85 | 38.81 |
| Heavy / Hyper128 | 48.64× | 34.15 | 37.04 | 42.57 | 42.50 |
| Heavy / OMECO | 1.33× | 11.85 | 6.89 | 16.88 | 18.72 |
| Heavy / TNCO | 0.16× | 80.93 | 35.86 | 80.16 | 78.31 |
| Heavy / TNCO (fuse=4) | 0.22× | 70.07 | 21.51 | 67.01 | 68.38 |
6.3 Numerical Execution Benefits
We execute unsliced orders from the five configurations with the lowest aggregate FLOPs, using opt_einsum with NumPy and the same saved input arrays. The inputs comprise 20 complex128 and 12 complex64 instances. Each run uses eight physical cores and eight OpenBLAS threads for one measured contraction without warm-up.
For each configuration, all 32 instances are scheduled to run five times, resulting in 160 runs per configuration. Across the five configurations, 747 of the 800 runs completed. The others exceeded storage limits, lacked a saved order, or reached the one-hour limit. All five configurations successfully completed the same 134 runs across 29 instances. We use only these runs to calculate the geometric means of FLOPs and execution times in Table 6.
Table 6 reports contraction time (Contraction column) and the sum of the times for the planning and execution stages, including their overhead (Total column). Heavy achieves the lowest geometric mean for both measures, reducing total time by relative to Light, relative to OMECO, and relative to AutoHQ. Thus, its execution benefits also translate into lower total time when planning is included.
Table 6. Numerical execution results. Completed runs are counted out of 160 planned runs per configuration. FLOPs and times are geometric means over the 134 runs completed by all five configurations. The last column gives the reduction in Total achieved by Heavy relative to each row.
| Configuration | Completed FLOPs runs | Contraction (109) | (s) | Total (s) reduction (%) | Heavy's |
|---|---|---|---|---|---|
| ArcTN Heavy | 155/160 | 9.425 | 43.98 | 67.80 | — |
| ArcTN Light | 150/160 | 12.394 | 61.92 | 78.83 | 13.99 |
| OMECO TreeSA-8 | 148/160 | 9.885 | 50.84 | 86.88 | 21.97 |
| Cotengra AutoHQ | 146/160 | 16.175 | 60.74 | 146.34 | 53.67 |
| Cotengra Hyper128 | 148/160 | 13.536 | 57.55 | 408.32 | 83.40 |
6.4 Planning under Tensor-Size Constraints
The preceding experiments use unsliced orders. We now require every contraction result to fit a size limit. We compare four planning configurations on 18 scalar-output and all 12 tensor-output QC32 instances, with five runs per configuration on each instance. The scalar set contains the 18 of 20 instances for which every configuration completed all five runs. Table 7 lists the settings. Fixed and Dynamic start from the same saved Heavy order for each instance and repeat.
The size limit is elements per contraction result for scalar outputs and for tensor outputs, where is the output size. The tensor-output
We skip a run if any contraction result is expected to require more than 64 GiB, or the final output more than 32 GiB. The limit is 128 GiB for all tensors stored at once, and also for the two inputs and result of any single contraction combined.
Z. Liu et al.
Table 7. Order-search and slicing configurations.
| Configuration | Initial order | Slicing stage |
|---|---|---|
| ArcTN Fixed | Saved Heavy path | Select indices to slice; keep the order unchanged |
| ArcTN Dynamic | Same saved Heavy path | 3 rounds, size-8 subtree reconfiguration |
| Cotengra AutoHQ | Optuna, FLOPs objective, 128 trials, 8 workers | Slice the returned tree with its order fixed |
| OMECO | TreeSA with 8 trials and 50 iterations | TreeSASlicer with 8 trials, 10 iterations, optimization ratio 2.0, and sc_target = |
experiment allows all four configurations to slice output indices. The two groups use different size targets and are reported separately.
Table 8 reports total sliced FLOPs and full planning time, including order search and slicing. Values are geometric means over five runs within each instance and then across instances. These experiments generate and validate plans without executing numerical sliced contractions. FLOPs exclude final accumulation and output assembly.
Table 8. Slicing results for the evaluated configurations. Percentage changes are for Dynamic relative to the configuration in each row. Negative values indicate lower FLOPs or shorter full planning time.
| Instances | Configuration | FLOPs change (%) | Time change (%) |
|---|---|---|---|
| 18 scalar outputs | ArcTN Fixed | -31.99 | +17.40 |
| OMECO | +1.06 | -29.51 | |
| Cotengra AutoHQ | -92.43 | -94.26 | |
| 12 tensor outputs | ArcTN Fixed | -27.04 | +17.25 |
| OMECO | -49.71 | +11.08 | |
| Cotengra AutoHQ | -71.18 | -82.21 |
All retained plans meet their size limits. Dynamic reduces total FLOPs relative to Fixed by 31.99% for scalar outputs and 27.04% for tensor outputs, with additional planning time. Compared with OMECO, its scalar-output FLOPs are 1.06% higher with 29.51% less planning time, and its tensor-output FLOPs are 49.71% lower with 11.08% more planning time. The last two experiments vary the hardware and the circuits. Section 6.5 executes the returned orders on accelerator hardware, and Section 6.6 compares the planners on a larger collection of circuits.
6.5 Deployment and Evaluation on the Hygon Cluster
To assess ArcTN on accelerator hardware, we compare Light and Heavy with Cotengra on a server in the Hygon cluster, using QC32 and a tensor network library jointly developed by Arclight and Sugon on top of Sugon's tensor library. The server is equipped with two Hygon C86 7490 64-core CPUs (2.7 GHz) and eight Hygon BW200 Deep Computing Unit (DCU) accelerators, each with 64 GiB of device memory. All experiments use a single DCU. All configurations use complex128 and seed 0. Cotengra's HyperOptimizer minimizes FLOPs with up to 16 trials. We report planning time for finding an order (Planning), numerical contraction time (Contraction), and total time including planning, execution, and associated overhead (Total). Total is measured once per circuit and configuration, while Contraction is measured separately as the median of five runs after two warm-ups.
Both ArcTN presets completed the same 14 of 32 circuits. Cotengra was evaluated on these 14 and completed six, which we use for all performance comparisons. Table 9 shows that both presets reduce planning and contraction time, achieving speedups in total time of for Light and for Heavy. Although Heavy spends longer planning than Light, it achieves the lowest contraction and total times on these six circuits.
Table 9. Hygon server results: geometric means over the six circuits completed by all three configurations. Contraction uses per-circuit medians. Logical FLOPs count two operations per multiply-add. Speedup is Cotengra's Total divided by each configuration's Total.
| Metric | Cotengra | ArcTN Light | ArcTN Heavy |
|---|---|---|---|
| Total (s) | 57.95 | 9.81 | 8.87 |
| Planning (s) | 33.19 | 1.10 | 3.30 |
| Contraction (s) | 1.716 | 0.670 | 0.563 |
| Logical FLOPs () | 13.829 | 4.141 | 3.073 |
| Speedup (Total) | 1.00× | 5.91× | 6.53× |
6.6 Evaluation on Additional Realistic Quantum Circuits
To test whether the QC32 results extend to other circuits and simulation tasks, we compare the same planners on tensor networks built from MQT Bench [20]. Appendix B gives further details and complete results.
Circuits. We take 320 circuits of MQT Bench v1.1.9 at the target-independent level. For the 14 families provided at every qubit count up to 130, such as amplitude estimation, phase estimation, and quantum neural networks, we take (182 circuits). The other 14 families, such as QAOA, VQE, Grover search, and quantum walks, encode specific problem instances at a few sizes between 2 and 31 qubits, and we take all
We only compare against Cotengra here (rather than all configurations considered elsewhere) because the Hygon machine natively provides Cotengra as the tensor contraction planning stack.
Z. Liu et al.
138 of their circuits. MQT Bench fixes each circuit's depth by its algorithm and qubit count. Table 13 lists the qubit counts, depths, and gate counts of each family.
Tasks and networks. For a circuit on qubits, we build four networks with the constructions of Figure 2. The amplitude network gives . The two expectation networks give and with . The state network keeps all qubits open for , and otherwise keeps 20 evenly spaced qubits open and fixes the rest to . quimb 1.15 [7] constructs each network and simplifies it, which can produce indices shared by more than two tensors. All planners, including TNCO, receive the same simplified network, and construction and simplification are excluded from planning time.
Table 10 counts the networks by their number of tensors after simplification. Networks with at most two tensors need no search, 14 networks of the Grover and quantum-walk families without ancillas were not constructed within 3600 s, and we leave out the 197 networks with 5000 or more tensors. We plan the remaining 672 networks, 530 small ones with fewer than 1000 tensors and 142 large ones. The tasks keep different numbers of networks. Simplification often reduces an amplitude network, with both ends fixed to , to one or two tensors, whereas an expectation network contains gates from both and and a state network keeps its open indices.
Table 10. MQT Bench networks by task. Parentheses give the number of tensors after simplification, or the construction time for Timeout. Only small and large networks are planned.
| Task | Networks | Trivial (1–2) | Small (3–999) | Large (1000–4999) | Very large (≥ 5000) | Timeout (> 3600 s) |
|---|---|---|---|---|---|---|
| Amplitude | 320 | 191 | 66 | 19 | 40 | 4 |
| 320 | 101 | 113 | 47 | 56 | 3 | |
| 320 | 98 | 115 | 48 | 56 | 3 | |
| State | 320 | 7 | 236 | 28 | 45 | 4 |
| Total | 1280 | 397 | 530 | 142 | 197 | 14 |
Configurations. We use the configurations of Table 3 with three changes. First, rate-based stopping is disabled, because on small networks it would stop the search almost immediately, at the cost of higher FLOPs. Each planner then stops at its trial or iteration limit, at the end of its schedule, or at its time limit (3600 s for Light and Heavy, 3500 s for Cotengra). Second, OMECO TreeSA-8 also runs with 200 iterations, because 50 iterations return much worse orders on large networks. Third, we report one run per configuration and network. For each metric, we divide a configuration's value on each network by that of Heavy and report the geometric mean of these ratios across networks. All runs returned a valid order.
Results. On the 530 small networks, Heavy, AutoHQ, Hyper128, and OMECO with 200 iterations are within of each other in geometric-mean FLOPs, while Heavy plans
, , and faster than the other three (Tables 11 and 14). On the 142 large networks, Heavy has the lowest geometric-mean FLOPs. AutoHQ and Hyper128 require and its FLOPs with and its planning time, and Light requires its FLOPs in about half its time.
Table 11. MQT Bench results relative to Heavy. Entries are geometric means, over networks, of each configuration's FLOPs or planning time divided by that of Heavy, so values above one favor Heavy. Numbers of networks are given in parentheses, and expectation combines and . Tables 14 and 15 in Appendix B add writes, largest result, and peak live elements.
| Configuration | FLOPs ratio | Time ratio | |||||
|---|---|---|---|---|---|---|---|
| All (672) | Small (530) | Large (142) | Ampl. (85) | Expect. (323) | State (264) | All (672) | |
| ArcTN Heavy | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 |
| ArcTN Light | 1.12 | 1.07 | 1.29 | 1.17 | 1.13 | 1.09 | 0.39 |
| Cotengra Hyper128 | 1.04 | 0.99 | 1.23 | 1.72 | 0.80 | 1.22 | 52.7 |
| Cotengra AutoHQ | 1.07 | 1.01 | 1.34 | 1.82 | 0.84 | 1.22 | 1.53 |
| Cotengra Auto | 34.3 | 2.51 | 23.4 | 262 | 3.23 | 0.45 | |
| OMECO TreeSA-8 (50 iter.) | 11.8 | 1.08 | 3.03 | 96.5 | 1.39 | 0.51 | |
| OMECO TreeSA-8 (200 iter.) | 5.08 | 1.03 | 2.10 | 20.7 | 1.21 | 1.91 | |
| TNCO | 207 | 3.97 | 10.7 | 18.3 | 0.33 | ||
| TNCO (fuse=4) | 42.6 | 2.69 | 6.74 | 414 | 4.76 | 0.33 | |
By task, Heavy has the lowest geometric-mean FLOPs on amplitude and state networks, whereas on expectation networks AutoHQ and Hyper128 reach and its FLOPs with and its planning time (Table 15). With 200 iterations, OMECO returns lower FLOPs than Heavy on 96 of the 142 large networks, but its geometric mean on them is times that of Heavy ( with 50 iterations). Cotengra Auto and both TNCO configurations plan quickly but return orders with several orders of magnitude more FLOPs on the large networks.
7 Related Tools
Existing contraction planners also combine initial order construction with later improvement. Cotengra constructs orders using greedy choices or partitions of the network, automatically tunes the construction parameters, and supports local tree changes, simulated annealing, and slicing [8]. OMECO provides a Rust implementation of OMEinsumContractionOrders [15] with Python interfaces. Its TreeSA method [12] improves contraction trees through simulated annealing, while TreeSASlicer selects slices to control tensor sizes [14]. Google TNCO similarly provides Python interfaces to a native implementation and searches contraction trees through simulated annealing, with an option to combine tensors before searching [16]. We compare against these tools because they address the same practical tasks of finding contraction orders and managing their computational or storage costs.
Z. Liu et al.
Other libraries connect contraction planning to applications and execution. For example, quimb constructs tensor networks for quantum calculations and can ask external optimizers to find contraction orders [7], while opt_einsum prepares reusable contraction expressions for different numerical libraries [23]. For execution on other hardware, cuTensorNet combines planning with GPU computation [18], and TNC distributes tensor contractions across processes using the Message Passing Interface (MPI) [5]. ArcTN supports these kinds of workflows by exposing orders as paths or trees and by providing executable plans that can use its own executor or an external numerical library. Its engineering contribution combines candidate generation, selected-order refinement, stopping rules, and slicing in one configurable tool.
8 Conclusion
We presented ArcTN, a tool that integrates contraction-order search, slicing, and reusable execution plans through Python interfaces to a Rust implementation. Its Light and Heavy presets coordinate candidate generation and refinement with controls on search effort, while Fixed and Dynamic slicing support tensor-size constraints. Together, these capabilities connect planning and numerical execution in a configurable workflow for quantum circuit simulation.
On QC32, ArcTN finds lower-cost orders in less planning time than several baseline configurations. When the returned orders are executed with the same NumPy backend, Heavy achieves the lowest geometric-mean contraction time and total planning-execution time among the five tested configurations. Dynamic reduces total sliced FLOPs relative to Fixed for both scalar and tensor outputs, with additional planning effort, and both modes meet every requested size limit. On networks built from MQT Bench circuits, Heavy also obtains the lowest geometric-mean FLOPs on the large networks, with much less planning time than Cotengra AutoHQ and Hyper128. These results demonstrate the practical benefits of coordinating order search and slicing to balance planning effort, contraction cost, and tensor size. Future work includes improving Heavy on expectation-value networks and extending the native executor to accelerators.
References
-
Akiba, T., Sano, S., Yanase, T., Ohta, T., Koyama, M.: Optuna: A next-generation hyperparameter optimization framework. In: Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining. pp. 2623–2631 (2019). https://doi.org/10.1145/3292500.3330701
-
Bayraktar, H., et al.: cuQuantum SDK: A high-performance library for accelerating quantum science. In: Proc. IEEE Int. Conf. Quantum Comput. Eng. (QCE). pp. 1050–1061 (2023). https://doi.org/10.1109/QCE57702.2023.00119
-
Blacher, M., et al.: Einsum Benchmark: Enabling the Development of Next-Generation Tensor Execution Engines. In: Advances in Neural Information Processing Systems. vol. 37, pp. 98033–98048 (2024). https://doi.org/10.52202/079017-3111
-
Bridgeman, J.C., Chubb, C.T.: Hand-waving and interpretive dance: An introductory course on tensor networks. Journal of Physics A: Mathematical and Theoretical 50(22), 223001 (2017). https://doi.org/10.1088/1751-8121/aa6dc3
-
Geiger, M., Huang, Q., Mendl, C.B.: TNC: Distributed Tensor Network Contractions in Rust. Journal of Open Source Software 11(122), 9598 (2026). https://doi.org/10.21105/joss.09598
-
Gray, J.: cotengra. software repository, version 0.8.2, https://github.com/jcmgray/cotengra/tree/v0.8.2, released: Jun. 22, 2026. Accessed: Oct. 13, 2026
-
Gray, J.: quimb: A Python package for quantum information and many-body calculations. Journal of Open Source Software 3(29), 819 (2018). https://doi.org/10.21105/joss.00819
-
Gray, J., Kourtis, S.: Hyper-optimized tensor network contraction. Quantum 5, 410 (2021). https://doi.org/10.22331/q-2021-03-15-410
-
Hansen, N., Ostermeier, A.: Completely derandomized self-adaptation in evolution strategies. Evolutionary Computation 9(2), 159–195 (2001). https://doi.org/10.1162/106365601750190398
-
Hukushima, K., Nemoto, K.: Exchange Monte Carlo method and application to spin glass simulations. Journal of the Physical Society of Japan 65(6), 1604–1608 (1996). https://doi.org/10.1143/JPSJ.65.1604
-
Javadi-Abhari, A., et al.: Quantum computing with Qiskit. arXiv:2405.08810 (2024)
-
Kalachev, G., Panteleev, P., Yung, M.H.: Multi-tensor contraction for XEB verification of quantum circuits. arXiv:2108.05665 (2021)
-
Kirkpatrick, S., Gelatt, Jr., C.D., Vecchi, M.P.: Optimization by simulated annealing. Science 220(4598), 671–680 (1983). https://doi.org/10.1126/science.220.4598.671
-
Liu, J.G.: omeco. software repository, version 0.2.6, https://github.com/GiggleLiu/omeco/tree/v0.2.6, released: Jul. 10, 2026. Accessed: Oct. 13, 2026
-
Liu, J.G., Gao, X., Samuelson, R.: OMEinsumContractionOrders: A Julia package for tensor network contraction order optimization. Journal of Open Source Software 11(119), 9886 (2026). https://doi.org/10.21105/joss.09886
-
Mandrà, S.: Tensor Network Contraction Optimizer (TNCO). software repository, version 0.4.0, https://github.com/google-research/tnco/tree/v0.4.0, accessed: Oct. 13, 2026
-
Markov, I.L., Shi, Y.: Simulating quantum computation by contracting tensor networks. SIAM Journal on Computing 38(3), 963–981 (2008). https://doi.org/10.1137/050644756
-
NVIDIA: cuTensorNet: Overview. cuQuantum documentation, https://docs.nvidia.com/cuda/cuquantum/latest/cutensornet/overview.html, accessed: Oct. 13, 2026
-
Pfeifer, R.N.C., Haegeman, J., Verstraete, F.: Faster identification of optimal contraction sequences for tensor networks. Physical Review E 90(3), 033315 (2014). https://doi.org/10.1103/PhysRevE.90.033315
-
Quetschlich, N., Burgholzer, L., Wille, R.: MQT Bench: Benchmarking software and design automation tools for quantum computing. Quantum 7, 1062 (2023). https://doi.org/10.22331/q-2023-07-20-1062
-
Rubinstein, R.: The Cross-Entropy Method for Combinatorial and Continuous Optimization. Methodology and Computing in Applied Probability 1(2), 127–190 (1999). https://doi.org/10.1023/A:1010091220143
-
Schlag, S., Heuer, T., Gottesbüren, L., Akhremtsev, Y., Schulz, C., Sanders, P.: High-quality hypergraph partitioning. ACM Journal of Experimental Algorithms 27, 1–39 (2022). https://doi.org/10.1145/3529090
-
Smith, D.G.A., Gray, J.: opt_einsum—A Python package for optimizing contraction order for einsum-like expressions. Journal of Open Source Software 3(26), 753 (2018). https://doi.org/10.21105/joss.00753
-
Swendsen, R.H., Wang, J.-S.: Replica Monte Carlo simulation of spin-glasses. Physical Review Letters 57(21), 2607–2609 (1986). https://doi.org/10.1103/PhysRevLett.57.2607
Z. Liu et al.
A QC32 Circuit Set
Table 12 lists all 32 QC32 networks, including the two MaxCut instances omitted from the common planning comparison set. Instance identifiers omit the common qc_ prefix.
Two pairs of instances have identical input labels, dimensions, output labels, and tensor shapes, namely circuit_n53_m20_s5_e22_pABCDCDAB and circuits-14, and circuits-42 and circuits-7. In each pair, the former uses complex128 and the latter complex64, with different numerical arrays. The 32 instances therefore contain 30 distinct structural descriptions, and the 30-instance main comparison contains 28. We retain the archived instances and give each included instance equal weight in the planning aggregates.
The output ranks describe the saved contraction problems and do not uniquely identify the original physical tasks. In particular, the grid instances have more open output indices than qubits, so their tensor outputs should not be interpreted as full state vectors.
The numbered instances retain their benchmark identifiers because their original gate-level circuits are unavailable. For the named families, filenames provide additional information. MaxCut identifiers give the vertex count n, regular-graph degree r, and QAOA depth p. In rand_google53, “53” belongs to the generator name, and the following numbers give the qubit count and depth. For grid instances, the first two numbers specify the layout and the last gives the depth.
B MQT Bench Benchmark Details
This appendix gives the details of the evaluation in Section 6.6.
B.1 Circuit selection
We downloaded the complete pre-generated archive of MQT Bench v1.1.9 and selected circuits by file name only, before any planning run. We use the target-independent level, compiled with Qiskit [11]. The circuit files were generated with MQT Bench 1.1.0 and Qiskit 1.0.2. Every family of this level is included. MQT Bench provides 14 families at every qubit count from 2 (3 for graph states) to 130. They are amplitude estimation (ae), Deutsch-Jozsa (dj), GHZ-state, graph-state, and W-state preparation (ghz, graphstate, wstate), the quantum Fourier transform with and without entangled input (qft, qftentangled), quantum neural networks (qnn), exact and inexact phase estimation (qpeexact, qpeinexact), random circuits (random), and three variational ansätze with random parameters (realamprandom, su2random, twolocalrandom). For these, we take . The other 14 families encode specific problem instances and are provided only at a few sizes between 2 and 31 qubits, so we take all of their circuits. They comprise Grover search and quantum walks, each with and without ancilla qubits (grover-noancilla, grover-v-chain, qwalk-noancilla, qwalk-v-chain), QAOA and VQE (qaoa, vqe), portfolio optimization with QAOA or VQE (portfolioqaoa, portfoliovqe), option pricing for call and put options (pricingcall, pricingput), the traveling salesperson problem (tsp), a routing problem (routing), Shor's algorithm with two instances (shor), and ground-state estimation in three sizes (groundstate). Table 13 lists all families. Depth
Table 12. Circuit types, sources, and output shapes in QC32
| Type/source (count) | Instance identifiers (without qc_) | Output (rank ) |
|---|---|---|
| Google/Sycamore random circuits (9) | ||
| Named instances (6) | circuit_n47_m14_s0_e0_pEFGH | Scalar |
| circuit_n49_m14_s9_e6_pEFGH_simplified | ||
| circuit_n53_m12_s2_e8_pABCDCDAB_simplified | ||
| circuit_n53_m20_s5_e22_pABCDCDAB | ||
| circuit_patch_n53_m16_s10_e28_pABCDCDAB | ||
| circuit_patch_n53_m16_s19_e28_pABCDCDAB_simplified | ||
| Yao rand_google (53 (3) | rand_google53_25_50 | Tensor |
| rand_google53_26_15 | ||
| rand_google53_27_20 | 26, 27 | |
| Numbered benchmark circuits (8) | circuits-1, circuits-2, circuits-7, circuits-8, circuits-14, circuits-18, circuits-35, | Scalar |
| circuits-42 | ||
| MaxCut QAOA (6) | maxcut_n18_r17_p100 | Scalar |
| maxcut_n24_r20_p10 | ||
| maxcut_n25_r4_p4 | ||
| maxcut_n27_r6_p5 | ||
| maxcut_n28_r3_p3 | ||
| maxcut_n29_r4_p10 | ||
| Quantum Fourier transform (3) | qft_27, qft_28, qft_30 | Tensor |
| 28, 30 | ||
| Yao grid random circuits (3) | rand_supremacy2d_1_12_400 | Tensor |
| rand_supremacy2d_4_4_100 | ||
| rand_supremacy2d_7_2_800 | 28, 21 | |
| Yao variational circuits (3) | variational_29 | Tensor |
| variational_30 | ||
| variational_31 | 30, 31 | |
| Total (32) | 20 scalar outputs; 12 tensor outputs | |
Rank is the number of open output indices. All indices have dimension 2, giving output elements. Rank lists follow the order of the instance identifiers within each row.
Z. Liu et al.
and gate counts are taken from the circuit files after removing measurements and barriers. Depth is the number of gate layers when each gate is placed directly after the last gate on any of its qubits.
B.2 Network construction
For each circuit, we remove final measurements, barriers, and classical registers. No selected circuit contains a reset or a gate after a measurement. quimb 1.15 reads the circuit in complex128. Because quimb does not support the rzz, rxx, ch, and rccx gates used by some files, we replace the first three by exact decompositions and rccx by its definition in qelib1.inc, and we checked each replacement against the gate matrix. For the state task with n > 28, the open qubits are for . We then apply quimb's full_simplify with the sequence ADCRS (antidiagonal gauging, diagonal reduction, column reduction, rank simplification, and split simplification), tolerance , and norm equalization. Twenty-four networks, mostly amplitudes of Grover, quantum-walk, and Shor circuits, evaluate exactly to zero. Norm equalization is undefined for them, so we build them without it, and simplification then reduces each to a single tensor. Each network is built in a separate process with a 3600-s limit. The exported networks keep indices shared by more than two tensors. On small circuits, we verified that contracting the exported networks reproduces the amplitudes, expectation values, and states computed from quimb's dense state vector.
B.3 Run protocol
All runs used the server of Section 6.1, which has eight CPU sockets with 16 physical cores each, and the software versions of Table 4. A scheduler ran up to 16 planner processes, each pinned to eight physical cores of one socket, with at most eight TNCO processes at a time, and started the networks in order of increasing tensor count. Planning time is measured from entry into the planner API until it returns, and the common evaluator recomputes all metrics from the returned order on the simplified network. Cotengra checks its time limit between trials, so 45 Hyper128 runs took 3501 to 3634 s to return their orders. We report their planning times as measured and include these runs in all comparisons.
B.4 Complete results
Tables 14 and 15 report all four cost measures and planning time by network size and by task.
Table 13. MQT Bench circuit families. Qubits, Depth, and Gates give ranges over the circuits of each family, with depth and gate counts taken from the circuit files without measurements and barriers. Each circuit yields one amplitude network, two expectation networks ( and ), and one state network, so a family with circuits has at most , , and networks in the three task columns. Each task entry is the number of planned networks, which have 3 to 4999 tensors after simplification. A dash means that no network of the family is planned for that task.
| Family | Qubits | Circuits | Depth | Gates | Ampl. | Expect. | State |
|---|---|---|---|---|---|---|---|
| Families at every qubit count; | |||||||
| ae | 10–130 | 13 | 53–773 | 91–9031 | - | 26 | 13 |
| dj | 10–130 | 13 | 11–131 | 28–388 | - | - | 13 |
| ghz | 10–130 | 13 | 10–130 | 10–130 | - | - | 13 |
| graphstate | 10–130 | 13 | 6–9 | 20–260 | - | - | 13 |
| qft | 10–130 | 13 | 20–260 | 60–8580 | - | - | 13 |
| qftentangled | 10–130 | 13 | 22–262 | 70–8710 | - | - | 13 |
| qnn | 10–130 | 13 | 94–1294 | 319–50959 | 7 | 10 | 7 |
| qpeexact | 10–130 | 13 | 24–388 | 66–8708 | - | 12 | 13 |
| qpeinexact | 10–130 | 13 | 28–388 | 68–8708 | - | 26 | 13 |
| random | 10–130 | 13 | 55–1803 | 191–39761 | 6 | 8 | 6 |
| realamprandom | 10–130 | 13 | 41–521 | 175–25675 | 5 | 8 | 5 |
| su2random | 10–130 | 13 | 41–521 | 175–25675 | 5 | 8 | 5 |
| twolocalrandom | 10–130 | 13 | 41–521 | 175–25675 | 5 | 8 | 5 |
| wstate | 10–130 | 13 | 20–260 | 37–517 | - | - | 13 |
| Families at fixed sizes; all files | |||||||
| groundstate | 4–14 | 3 | 12–42 | 24–224 | 3 | 3 | 3 |
| grover-noancilla | 2–11 | 10 | 1–76676 | 2–77161 | 2 | 10 | 6 |
| grover-v-chain | 2–17 | 10 | 1–51527 | 2–52011 | 4 | 10 | 6 |
| portfolioqaoa | 3–17 | 15 | 13–69 | 21–476 | 14 | 28 | 14 |
| portfoliovqe | 3–18 | 16 | 13–73 | 21–531 | 16 | 32 | 16 |
| pricingcall | 5–25 | 11 | 35–7428 | 42–7500 | - | 18 | 11 |
| pricingput | 5–25 | 11 | 35–7434 | 42–7526 | - | 18 | 11 |
| qaoa | 3–16 | 14 | 8–10 | 15–80 | 13 | 26 | 13 |
| qwalk-noancilla | 3–13 | 11 | 19–98131 | 25–98325 | - | 8 | 6 |
| qwalk-v-chain | 3–31 | 15 | 19–1363 | 25–1453 | - | 28 | 15 |
| routing | 2–12 | 3 | 7–19 | 11–81 | 1 | 4 | 2 |
| shor | 18 | 2 | 6213 | 9875 | 1 | - | - |
| tsp | 4–16 | 3 | 17–29 | 39–171 | 3 | 6 | 3 |
| vqe | 3–16 | 14 | 7–20 | 13–78 | - | 26 | 13 |
| Total | 320 | 85 | 323 | 264 | |||
Z. Liu et al.
Table 14. MQT Bench results relative to Heavy, by network size. Entries are geometric means, over networks, of each configuration's value divided by that of Heavy, so values above one favor Heavy. Writes, Largest, and Peak denote , , and , and Time is planning time. The Heavy rows equal one by definition. Parentheses give the number of networks and, for the size classes, their number of tensors after simplification.
| Configuration | FLOPs | Writes | Largest | Peak | Time |
|---|---|---|---|---|---|
| All networks (672 in total) | |||||
| ArcTN Heavy | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 |
| ArcTN Light | 1.12 | 1.10 | 1.19 | 1.17 | 0.39 |
| Cotengra Hyper128 | 1.04 | 1.10 | 1.10 | 1.06 | 52.7 |
| Cotengra AutoHQ | 1.07 | 1.11 | 1.02 | 0.98 | 1.53 |
| Cotengra Auto | 34.3 | 35.0 | 39.7 | 34.5 | 0.45 |
| OMECO TreeSA-8 (50 iter.) | 11.8 | 12.4 | 13.7 | 13.9 | 0.51 |
| OMECO TreeSA-8 (200 iter.) | 5.08 | 5.17 | 5.59 | 5.72 | 1.91 |
| TNCO | 207 | 88.0 | 154 | 128 | 0.33 |
| TNCO (fuse=4) | 42.6 | 23.1 | 38.6 | 31.7 | 0.33 |
| Small networks (530 networks, 3–999 tensors) | |||||
| ArcTN Heavy | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 |
| ArcTN Light | 1.07 | 1.04 | 1.10 | 1.10 | 0.36 |
| Cotengra Hyper128 | 0.99 | 1.00 | 0.94 | 0.93 | 61.0 |
| Cotengra AutoHQ | 1.01 | 1.00 | 0.95 | 0.93 | 1.26 |
| Cotengra Auto | 2.51 | 2.48 | 2.67 | 2.42 | 0.64 |
| OMECO TreeSA-8 (50 iter.) | 1.08 | 1.02 | 1.11 | 1.09 | 0.59 |
| OMECO TreeSA-8 (200 iter.) | 1.03 | 0.96 | 1.02 | 1.02 | 2.25 |
| TNCO | 3.97 | 3.35 | 3.92 | 3.61 | 0.58 |
| TNCO (fuse=4) | 2.69 | 2.39 | 2.96 | 2.57 | 0.58 |
| Large networks (142 networks, 1000–4999 tensors) | |||||
| ArcTN Heavy | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 |
| ArcTN Light | 1.29 | 1.36 | 1.59 | 1.47 | 0.51 |
| Cotengra Hyper128 | 1.23 | 1.53 | 1.94 | 1.69 | 30.7 |
| Cotengra AutoHQ | 1.34 | 1.61 | 1.37 | 1.18 | 3.12 |
| Cotengra Auto | 0.12 | ||||
| OMECO TreeSA-8 (50 iter.) | 0.29 | ||||
| OMECO TreeSA-8 (200 iter.) | 1.05 | ||||
| TNCO | 0.04 | ||||
| TNCO (fuse=4) | 0.04 | ||||
Table 15. MQT Bench results relative to Heavy, by task. Columns are as in Table 14. Expectation combines and .
| Configuration | FLOPs | Writes | Largest | Peak | Time |
|---|---|---|---|---|---|
| Amplitude (85 networks) | |||||
| ArcTN Heavy | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 |
| ArcTN Light | 1.17 | 1.12 | 1.23 | 1.22 | 0.36 |
| Cotengra Hyper128 | 1.72 | 1.78 | 2.10 | 1.98 | 70.9 |
| Cotengra AutoHQ | 1.82 | 1.93 | 1.87 | 1.77 | 3.58 |
| Cotengra Auto | 23.4 | 23.8 | 30.2 | 26.5 | 0.45 |
| OMECO TreeSA-8 (50 iter.) | 3.03 | 2.98 | 3.37 | 3.66 | 0.56 |
| OMECO TreeSA-8 (200 iter.) | 2.10 | 2.05 | 2.26 | 2.48 | 2.14 |
| TNCO | 10.7 | 3.49 | 7.02 | 6.08 | 0.29 |
| TNCO (fuse=4) | 6.74 | 2.54 | 5.45 | 4.38 | 0.30 |
| Expectation (323 networks) | |||||
| ArcTN Heavy | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 |
| ArcTN Light | 1.13 | 1.13 | 1.26 | 1.21 | 0.41 |
| Cotengra Hyper128 | 0.80 | 0.86 | 0.80 | 0.76 | 61.1 |
| Cotengra AutoHQ | 0.84 | 0.87 | 0.73 | 0.69 | 3.61 |
| Cotengra Auto | 262 | 269 | 314 | 250 | 0.33 |
| OMECO TreeSA-8 (50 iter.) | 96.5 | 107 | 123 | 121 | 0.44 |
| OMECO TreeSA-8 (200 iter.) | 20.7 | 21.6 | 23.7 | 23.8 | 1.68 |
| TNCO | 0.20 | ||||
| TNCO (fuse=4) | 414 | 236 | 479 | 343 | 0.19 |
| State (264 networks) | |||||
| ArcTN Heavy | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 |
| ArcTN Light | 1.09 | 1.05 | 1.09 | 1.10 | 0.37 |
| Cotengra Hyper128 | 1.22 | 1.26 | 1.32 | 1.29 | 40.0 |
| Cotengra AutoHQ | 1.22 | 1.25 | 1.28 | 1.23 | 0.40 |
| Cotengra Auto | 3.23 | 3.26 | 3.44 | 3.33 | 0.63 |
| OMECO TreeSA-8 (50 iter.) | 1.39 | 1.39 | 1.47 | 1.51 | 0.58 |
| OMECO TreeSA-8 (200 iter.) | 1.21 | 1.21 | 1.28 | 1.31 | 2.16 |
| TNCO | 18.3 | 9.24 | 11.6 | 11.2 | 0.63 |
| TNCO (fuse=4) | 4.76 | 2.73 | 3.34 | 3.24 | 0.63 |