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`
TensorNetworkIndices
​
TensorNetworkIndices
[tn]
returns the per-tensor index specifications for the tensor network
tn
, with each index labeled
Superscript
[v,k]
where
v
is the 1-based tensor position and
k
is the local slot identifier from the hyperedge specification.
​
​
TensorNetworkIndices
[net]
returns the per-vertex index lists annotated on the graph form
net
produced by
ToTensorNetworkGraph
.
​
Details and Options
Examples  
(4)
Scope  
(2)
A 3-site matrix product state  
(1)
A structured network exposes the same per-tensor labeling:
In[1]:=
SeedRandom[42];​​mps=RandomTensorNetwork["MPS"[3,2,2]];
In[2]:=
TensorNetworkIndices[mps]
Out[2]=
{{
1
1
,
4
1
},{
1
2
,
2
2
,
5
2
},{
2
3
,
6
3
}}
The two boundary tensors have rank 2 (one bond, one physical leg); the bulk tensor has rank 3 (two bonds, one physical leg). The slot label
1
is shared by tensors 1 and 2, and label
2
by tensors 2 and 3 -- these are the two MPS bonds. The labels
4,5,6
appear only once and are the physical legs.
Graph form  
(1)

Applications  
(1)

Properties & Relations  
(1)

SeeAlso
TensorNetwork
 
▪
TensorNetworkData
 
▪
TensorNetworkContractions
 
▪
TensorNetworkFreeIndices
 
▪
TensorNetworkIndexDimensions
 
▪
ToTensorNetworkGraph
 
▪
Superscript
 
▪
Subscript
TechNotes
▪
Building Tensor Networks
RelatedGuides
▪
TensorNetworks
Get the per-tensor index specifications for a tensor network:
In[1]:=
tn=TensorNetwork[{RandomReal[{-1,1},{2,3}],RandomReal[{-1,1},{3,4}]},{{i,j},{j,k}}];
In[2]:=
TensorNetworkIndices[tn]
Out[2]=

i
1
,
j
1
,
j
2
,
k
2

Each inner list holds the slot labels of one tensor; every label carries the tensor's 1-based position as its
Superscript
tag. The shared hyperedge
j
appears in both tensors as
j
1
and
j
2
; the free indices
i
and
k
carry a single labeled occurrence.
The property syntax exposes the same value:
In[3]:=
tn["Indices"]
Out[3]=

i
1
,
j
1
,
j
2
,
k
2

""

© 2026 Wolfram. All rights reserved.

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