Tensor-network slicing
The decomposition of a tensor contraction into a sum over fixed values of selected internal indices to trade memory for work.
On this page
Definition, purpose and input assumptions
Slicing fixes selected internal indices, contracts smaller subnetworks, and sums the results. It can reduce peak intermediate memory and expose independent computational tasks. The total arithmetic may increase because shared work is repeated. It is a classical simulation technique, not a change to the quantum circuit being represented.
Mathematical mechanism
If an exact contraction is Z=sum_s Z_s over a sliced index s of dimension d, computing all d slices and summing reproduces the original result. Dropping slices is an approximation unless their contribution is rigorously bounded. Parallel workers can evaluate independent slices, but their final complex amplitudes must be summed before probabilities are taken when they represent coherent alternatives.
Fully solved reference example
Suppose two slices contribute amplitudes Z0=1/2 and Z1=-1/2. Their total amplitude is 0 and the corresponding probability is 0. Summing the slice probabilities instead gives 1/4+1/4=1/2, which is wrong because it removes destructive interference.
For Z0=1/2 and Z1=i/2, the total probability is |1/2+i/2|^2=1/2. In this special case the probability sum happens to agree because the cross term vanishes. Agreement on that example does not validate an algorithm that always adds probabilities.
Limitations and classical comparison
A memory-saving decomposition must report the number of slices, repeated work and summation precision. Distributed speedup depends on communication and load balance. Slicing cannot guarantee polynomial cost for every hard network.
Scientific relationships
Tensor slicing complements contraction-order optimization in tensor-network simulation. It is distinct from sampling measurement branches, where probabilities may be combined incoherently.
A slicing example with exact arithmetic and storage counts
Consider the open tensor T_abc = sum from s = 0 to 3 of A_as B_bs C_cs, with A of shape 6 by 4, B of shape 5 by 4, and C of shape 7 by 4. The output has 6 times 5 times 7 = 210 entries. Forming D_abs = A_as B_bs stores 120 entries and uses 120 scalar multiplications. Contracting it with C uses 840 further multiplications and 630 additions, because each output sums four terms. The total is 960 multiplications and 630 additions under this explicit scalar-operation convention.
Slice the index s instead. Each of four slices forms a 6-by-5 outer product using 30 multiplications, then multiplies by the seven-element C column to produce 210 output contributions. That is 240 multiplications per slice, or the same 960 total. Accumulating four contributions for each output again uses 630 additions. If slices are processed sequentially, the intermediate outer product shrinks from 120 to 30 entries, while the required 210-entry output accumulator remains.
This is an example where slicing saves intermediate storage without increasing the stated arithmetic count. It is not a universal property. Other contraction trees can share work across slice values, and separate evaluation may repeat that work. Running four slices simultaneously also creates four output contributions unless they are reduced as they are produced, increasing aggregate storage even if each worker's intermediate is smaller. Peak local memory, total memory, and arithmetic must be distinguished.
Output selection changes the contraction task
If only one specified T_abc entry is needed, it can be computed from four products A_as B_bs C_cs using eight multiplications and three additions. Materializing all 210 entries is unnecessary for that output contract. Conversely, an algorithm promising the entire tensor cannot report the single-entry cost as its total complexity. Open output indices and sliced internal indices play different roles: one determines what is returned, while the other partitions a sum used to compute it.
Slicing several internal binary indices creates one task per joint assignment, potentially two to the number of sliced indices. Removing those indices from intermediates can reduce peak width, but the slice count grows multiplicatively. A complete plan identifies the sliced set, contraction order within a slice, output accumulation, and repeated subexpressions. The number of slices alone does not reveal whether the overall calculation is faster or whether enough memory is saved to make it feasible.
Cancellation and numerical conditioning
Suppose four slice amplitudes are 1 + delta, -1, i/4, and -i/4, with delta = 10 to the minus eight. The exact total amplitude is delta. The ratio of the sum of slice magnitudes to the magnitude of the total is approximately 250,000,001. This cancellation condition number indicates that small relative errors in individual slices can become large relative errors in their sum.
If each slice has absolute error at most 10 to the minus twelve, the total amplitude error is at most four times ten to the minus twelve by the triangle inequality. Relative to delta, that is four times ten to the minus four. For total amplitude Z and error e, the probability error obeys ||Z + e| squared - |Z| squared | <= 2|Z||e| + |e| squared. This converts an amplitude guarantee into a probability guarantee without assuming that summing probabilities is valid.
Compensated summation or a better reduction order can reduce rounding error in the final sum, but cannot recover accuracy already lost inside individual slice contractions. When exact cancellation is expected, a relative error criterion on the near-zero answer may be unsuitable; an absolute criterion tied to the intended observable is more informative. The example is a synthetic conditioning calculation, not a claim about a particular simulator's floating-point error.
Randomly sampling slices requires an estimator analysis
If slice s is sampled with probability p_s and returns W = Z_s/p_s, then E(W) = Z. Averaging M independent samples gives an unbiased amplitude estimator. Squaring that estimate does not generally give an unbiased probability: E(|W_bar| squared) = |Z| squared + Var(W)/M, where the complex variance means E(|W - Z| squared).
For four equally likely slices with amplitudes (1, -1, i, -i)/4, the total amplitude is zero, while W takes the four unit phases. The expected squared sample-mean magnitude is 1/M, not zero. Two independent amplitude estimates can be combined through the real part of their product with one conjugated to obtain an unbiased probability estimator, but it can be negative on individual draws and may have large variance. Random slicing therefore changes a deterministic contraction into a statistical problem requiring its own error guarantee.
Sources
Verification scope
Selected source text checked ·
Efficient simulation relies on controlled entanglement or bond dimensions; no universal small-memory guarantee.
Verification scope
Full-text source check ·
ArXiv metadata verifies authors, first submission, revision, journal volume and DOI. Contraction-tree and slicing framework inspected; finite examples here independently derived. Publisher page independently confirms publication on 2021-03-15; slicing section 4.7.1 inspected.
No published benchmark is reproduced or extrapolated to the reference examples. PDF text date March 12 differs from arXiv revision March 11 and journal publication date March 15; these date types are kept separate.