Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

TensorNetworks

Guides

  • TensorNetworks

Tech Notes

  • Building Tensor Networks
  • Contraction Paths and Execution
  • Matrix Product States
  • Tensor Networks Overview
  • Young Tableaux and Tensor Symmetries

Symbols

  • ActivateTensors
  • BinaryTensorNetwork
  • BinaryTensorNetworkQ
  • CanonicalPath
  • CanonicalPathQ
  • ContractIndices
  • ContractionTree
  • EinsteinSummation
  • GreedyContractionPath
  • HookFactor
  • HookLength
  • HookLengths
  • IndexedMultiply
  • InitializeTensorNetwork
  • MetricTensor
  • MetricTensorQ
  • MPSCanonicalForm
  • MPSCanonicalQ
  • MPSEntanglementEntropy
  • MPSNormalize
  • MPSNorm
  • MPSOverlap
  • MPSSchmidtValues
  • MPSTruncate
  • OptimalContractionPath
  • PartitionQ
  • PathIndexContractions
  • PathQ
  • PathToTreePath
  • RandomTensorNetwork
  • SparseTensorNetwork
  • TableauColumns
  • TableauDimension
  • TableauRows
  • TableauShape
  • TableauSize
  • TensorNetworkAdd
  • TensorNetworkContraction
  • TensorNetworkContractions
  • TensorNetworkContract
  • TensorNetworkData
  • TensorNetworkDelete
  • TensorNetworkFreeIndices
  • TensorNetworkGraphData
  • TensorNetworkGraphQ
  • TensorNetworkIndexDimensions
  • TensorNetworkIndexGraph
  • TensorNetworkIndices
  • TensorNetwork
  • TensorNetworkQ
  • TensorNetworkRemoveCycles
  • TensorNetworkReplaceIndices
  • TensorNetworkSize
  • TensorNetworkTensors
  • TensorNetworkToNetGraph
  • ToTensorNetworkGraph
  • TransposePartition
  • TreePathQ
  • TreePathToPath
  • YoungProject
  • YoungSymmetrize
  • YoungTableau
  • YoungTableauQ
Wolfram`TensorNetworks`
GreedyContractionPath
​
GreedyContractionPath
[tn]
finds a contraction path through the TensorNetwork
tn
using a greedy cost-minimization heuristic.
​
​
GreedyContractionPath
[graph]
finds a path for a TensorNetwork
Graph
.
​
​
GreedyContractionPath
["Dimensions"dims,"Indices"inds,"Contractions"cs]
finds a path from explicit network data in association form.
​
​
GreedyContractionPath
[expr]
finds a path for an
Inactive
TensorContract
of a
TensorProduct
.
​
​
GreedyContractionPath
[inputs,output,sizeDict]
low-level form taking explicit per-tensor index lists, the output indices, and a size-per-index
Association
.
​
Details and Options
​
Examples  
(16)
Basic Examples  
(1)
Find a greedy contraction path for a small random network:
In[1]:=
tn=BlockRandom[SeedRandom[42];RandomTensorNetwork[{4,5},3]]
Out[1]=
TensorNetwork
Tensors: 4
Binary: Yes
Free indices: 2
Sparse: No
Output dimension: 4
​

In[2]:=
GreedyContractionPath[tn]
Out[2]=
{{3,4},{1,3},{1,2}}
Scope  
(4)

Options  
(6)

Applications  
(2)

Properties & Relations  
(3)

SeeAlso
OptimalContractionPath
 
▪
TensorNetworkContract
 
▪
TensorNetworkContraction
 
▪
CanonicalPath
 
▪
PathQ
 
▪
ContractionTree
 
▪
BinaryTensorNetwork
TechNotes
▪
Contraction Paths and Execution
RelatedGuides
▪
TensorNetworks
""

© 2026 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com