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
  • A Working Tour of the Symmetry Functions
  • 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
  • SchurDimension
  • SparseTensorNetwork
  • TableauColumns
  • TableauDimension
  • TableauRows
  • TableauShape
  • TableauSize
  • TableauWeylDimension
  • 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`
TensorNetworkFreeIndices
​
TensorNetworkFreeIndices
[tn]
returns the list of uncontracted (free) indices of the tensor network
tn
.
​
​
TensorNetworkFreeIndices
[indices]
returns the free indices for a list of per-tensor index lists.
​
​
TensorNetworkFreeIndices
[net]
returns the free indices of the graph form
net
.
​
Details and Options
Examples  
(5)
Scope  
(3)
Explicit index lists  
(1)
Apply directly to a list of per-tensor index lists, bypassing the TensorNetwork object:
In[1]:=
TensorNetworkFreeIndices
[{{1,2},{2,3}}]
Out[1]=
{1,3}
Indices may be symbols rather than integers; the same count rule applies:
In[2]:=
TensorNetworkFreeIndices
[{{a,b},{b,c},{b,d}}]
Out[2]=
{a,c,d}
Here the label
b
appears in three tensors, so it is contracted (a hyperedge) and is excluded from the result.
Graph form  
(1)

Periodic boundary  
(1)

Applications  
(1)

Properties & Relations  
(1)

SeeAlso
TensorNetwork
 
▪
TensorNetworkData
 
▪
TensorNetworkContractions
 
▪
TensorNetworkIndices
 
▪
TensorNetworkGraphData
 
▪
Counts
 
▪
DeleteElements
TechNotes
▪
Building Tensor Networks
RelatedGuides
▪
TensorNetworks
Get the uncontracted (free) indices in a tensor network:
In[1]:=
tn=
TensorNetwork
[{RandomReal[{-1,1},{2,3}],RandomReal[{-1,1},{3,4}]},{{i,j},{j,k}}];
In[2]:=
TensorNetworkFreeIndices
[tn]
Out[2]=
{i,k}
A fully contracted network has no free indices:
In[3]:=
TensorNetworkFreeIndices

TensorNetwork
[{RandomReal[{-1,1},{2,3}],RandomReal[{-1,1},{2,3}]},{{1,2},{1,2}}]
Out[3]=
{}
For an open-boundary matrix product state, the free indices are the physical legs at each site:
In[4]:=
SeedRandom[42];​​mps=
RandomTensorNetwork
["MPS"[4,2,2]];​​
TensorNetworkFreeIndices
[mps]
Out[4]=
{5,6,7,8}
""

© 2026 Wolfram. All rights reserved.

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