Wolfram/ TensorNetworks

(1.0.4) current version: 1.0.6 »

Tensor networks, index contraction and path optimization

Contributed by: Nik Murzin

Installation Instructions

To install this paclet in your Wolfram Language environment, evaluate this code:
PacletInstall["Wolfram/TensorNetworks"]


To load the code after installation, evaluate this code:
Needs["Wolfram`TensorNetworks`"]

Examples

Basic Examples

In[1]:=
net = ToTensorNetworkGraph[RandomGraph[{10, 20}], Method -> "RandomComplex"]
Out[1]=
In[2]:=
TensorNetworkContract[net] // AbsoluteTiming
Out[2]=
In[3]:=
path = OptimalContractionPath[net, Method -> "max"]
Out[3]=
In[4]:=
Activate /@ AssociationMap[
  TensorNetworkContraction[net, path, Method -> #] &, $TensorNetworkContractionMethods]
Out[4]=
In[5]:=
ActivateTensor@
 EinsteinSummation[TensorNetworkGraphData[net]["ContractionIndices"], TensorNetworkTensors[net]]
Out[5]=

Disclosures

Compatibility

Wolfram Language Version 14.3

Version History

  • 1.0.6 – 03 June 2026
  • 1.0.5 – 25 May 2026
  • 1.0.4 – 23 May 2026
  • 1.0.0 – 07 December 2025

License Information

MIT License

Paclet Source

See Also