Portfolio · tensor-network-contraction

Tensor-network contraction

Simulation desk

Tensor-network contraction stores a quantum state as connected tensors and sums out the bonds between them. The simulation desk uses it when a circuit from the quantum circuit model is too wide for a state vector but not fully entangled.

Tensors instead of one array

Each qubit, or each gate, becomes a tensor. Shared indices are bonds. Contracting a bond means summing that index, which merges two tensors into one. The final number, if every index is summed, can be a single amplitude or an expectation.

A state-vector simulation keeps every amplitude even when most are implied by a simple circuit. A tensor network drops that redundancy only while the bonds stay small. A layer of gates that spreads entanglement across the whole register makes the bonds grow until the network is no cheaper than the array.

Order is the result

The arithmetic result does not depend on the order of sums. The intermediate size does. The desk records the contraction order next to the gate list so a later reader can see why a run stayed small or blew up.

Contracted values are then read out with the same Born rule as any other simulation. That step is measurement and sampling, not a separate physics.

Finding from this desk

When entanglement stays local, the desk can replace the full amplitude list with a network of smaller tensors. The discovery in the notes is the contraction order: a poor order rebuilds the exponential state the method was meant to avoid.